requestData

Request data from the BLS public API.

requestData(options: Array): Promise
Parameters
options (Array) payload to send to the API
Returns
Promise:

singleSeries

Retrieve data for the past three years of this series.

singleSeries(): Promise
Returns
Promise:

singleSeriesWithOptions

Retrieve data for an arbitrary range of years (max 20 year span) with options to to include annual averages and change calculations. If no parameters are specified, data for the last three years will be returned. If a start year is given, an end year must also be given.

singleSeriesWithOptions(start: number, end: number, average: Boolean, calc: Boolean): Promise
Parameters
start (number) first year of data to be requested
end (number) last year of data to be requested
average (Boolean) average of each year's data
calc (Boolean) net and percent changes between months and years
Returns
Promise:

singleYear

Retrieve data for a single year, stripped of unnecessary response data.

singleYear(year: number): Promise
Parameters
year (number) the year to get data for
Returns
Promise:

singleYearCPI

Get the annual average CPI value for a single year.

singleYearCPI(year: number): Promise
Parameters
year (number) the year to get data for
Returns
Promise:

singleMonthCPI

Get the CPI value for a single month.

singleMonthCPI(year: number, month: number): Promise
Parameters
year (number) the year to get data for
month (number) the month to get data for
Returns
Promise: