1.0.3 • Published 6 years ago

scraper-pmf v1.0.3

Weekly downloads
23
License
-
Repository
-
Last release
6 years ago

Private Market Flood Insurance Scraper

Installation

npm install --save scraper-pmf

Parameters

Paramaters for the a and v flood zones can be found in /schema/index.js.

A Flood Zone

KeyTypeDescriptionCriteriaRequired
floodReadybooleanis the house prepped for a floodFalse
occupancystring/enumhow many units in the building"twotofour", "fiveplus", "other_noneresident"True
buildingCoverageAmtintamount to cover your buildingTrue
contentsCoverageAmtintamount to cover your belongingsTrue
deductiblestring/enumout of pocket cost"2000", "5000"True
effectiveDatestring/enum"before", "after"False
foundationTypestring/enumfoundation of your home"slab on ground", "basement", "split level slab", "split level basement", "elevated building with no enclosure", "elevated building with an enclosure", "walkout basement", "crawlspace", "below grade crawlspace"True
isOwnerOccupiedbooleandoes the owner live in the home for at least 292 days out of the yearTrue
isPre1984booleanwas the home created prior to 1984True
isSingleResidentialbooleanis the home only occupied by one familyTrue
premiumPeriodstring/enumhow long you would like to keep your premium"one year", "one year with one year rate lock", "one year with two year rate lock", "two years", "three years"True
statestringwhat state the home is inno abbreviations. capitalize wordsTrue
replacementCostAmtintkeep numbers even, ex. 250000True
zipCodestringzipcode of the homeTrue

V Flood Zone

KeyTypeDescriptionCriteriaRequired
occupancystring/enumunits in building"twotofour", "fiveplus", "other_nonresident"True
buildingCoverageAmtintamount to cover your buildingTrue
contentsCoverageAmtintamount to cover your belongingsTrue
deductiblestring/enumout of pocket cost"2000", "5000"True
effectiveDatestring/enum"before", "after"False
hasCrawlSpacebooleandoes the home have crawl space underneathTrue
isOwnerOccupiedbooleandoes the owner live in the home for at least 292 daysTrue
isSingleResidentialbooleanis the home only occupied by one familyTrue
numberOfFloorsstring/enumhow many floors"one", "two", "three plus"True
premiumPeriodstring/enumhow long you would like to keep your premium"one year", "one year with one year rate lock", "one year with two year rate lock", "two years", "three years"True
statestringwhat state the home is inno abbreviations. capitalize wordsTrue
replacementCostAmtintkeep numbers even, ex. 250000True
zipCodestringzipcode of the homeTrue

Making the call

const scraper = require('scraper-pmf');

const aParams = {...};
const vParams = {...};


const aTotals = scraper.aFloodZone(aParams);
const zTotals = scraper.vFloodZone(vParams);

Response

For all array values, they are int types. Index 0 is the dollar amount and index 1 is the cents amount. Response looks the same for both flood types.

    {
        total: [120, 0],
        building: [220, 20],
        contents: [1000, 0],
        icc: [5000, 20],
        state: [1050, 50],
        policy: [0, 0]
    }

Expected responses can also be found in /schema/index.js.

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago