@datafire/highwaysengland

4.0.0 • Public • Published

@datafire/highwaysengland

Client library for Highways England API

Installation and Usage

npm install --save @datafire/highwaysengland
let highwaysengland = require('@datafire/highwaysengland').create();

.then(data => {
  console.log(data);
});

Description

Actions

vversion.areas.get

Returns list of areas

highwaysengland.vversion.areas.get({
  "version": ""
}, context)

Input

  • input object
    • version required string

Output

vversion.areas.area_Ids.get

Returns details of selected area

highwaysengland.vversion.areas.area_Ids.get({
  "area_Ids": "",
  "version": ""
}, context)

Input

  • input object
    • area_Ids required string
    • version required string

Output

Quality_GetDailyDataQualityForSite

Get Site DailyQuality

highwaysengland.Quality_GetDailyDataQualityForSite({
  "siteId": "",
  "start_date": "",
  "end_date": "",
  "version": ""
}, context)

Input

  • input object
    • siteId required string
    • start_date required string: The start date of the report in the format ddmmyyyy (i.e 31012016)
    • end_date required string: The end date of the report in the format ddmmyyyy (i.e 31012016)
    • version required string

Output

Quality_GetOverallDataQualityForSites

Get Site OverallQuality

highwaysengland.Quality_GetOverallDataQualityForSites({
  "sites": "",
  "start_date": "",
  "end_date": "",
  "version": ""
}, context)

Input

  • input object
    • sites required string: Get site quality by site id delimited by ,
    • start_date required string: The start date of the report in the format ddmmyyyy (i.e 31012016)
    • end_date required string: The end date of the report in the format ddmmyyyy (i.e 31012016)
    • version required string

Output

vversion.reports.report_type.get

Get's the report.

highwaysengland.vversion.reports.report_type.get({
  "report_type": "",
  "sites": "",
  "start_date": "",
  "end_date": "",
  "page": 0,
  "page_size": 0,
  "version": ""
}, context)

Input

  • input object
    • report_type required string: Report Type Id (i.e Daily, Monthly, Annual)
    • sites required string: Comma separated list of site Ids.
    • start_date required string: The start date of the report in the format ddmmyyyy (i.e 31012016)
    • end_date required string: The end date of the report in the format ddmmyyyy (i.e 31012016)
    • page required integer: The page offset to return.
    • page_size required integer: The number of rows to return.
    • reportSubTypeId integer
    • version required string

Output

vversion.reports.start_date.to.end_date.report_type.get

Get's the report.

highwaysengland.vversion.reports.start_date.to.end_date.report_type.get({
  "report_type": "",
  "sites": "",
  "start_date": "",
  "end_date": "",
  "page": 0,
  "page_size": 0,
  "version": ""
}, context)

Input

  • input object
    • report_type required string: Report Type Id (i.e Daily, Monthly, Annual)
    • sites required string: Comma separated list of site Ids.
    • start_date required string: The start date of the report in the format ddmmyyyy (i.e 31012016)
    • end_date required string: The end date of the report in the format ddmmyyyy (i.e 31012016)
    • page required integer: The page offset to return.
    • page_size required integer: The number of rows to return.
    • reportSubTypeId integer
    • version required string

Output

vversion.sites.get

Get a list of sites

highwaysengland.vversion.sites.get({
  "version": ""
}, context)

Input

  • input object
    • version required string

Output

vversion.sites.site_Ids.get

Get selected sites

highwaysengland.vversion.sites.site_Ids.get({
  "site_Ids": "",
  "version": ""
}, context)

Input

  • input object
    • site_Ids required string: site id
    • version required string

Output

SiteTypes_Index

Return list of site types

highwaysengland.SiteTypes_Index({
  "version": ""
}, context)

Input

  • input object
    • version required string

Output

SiteTypes_GetSitesForPublicFacingAPI

Returns the layer metadata for the LayerId specified.

highwaysengland.SiteTypes_GetSitesForPublicFacingAPI({
  "siteType_Id": 0,
  "version": ""
}, context)

Input

  • input object
    • siteType_Id required integer: 1 = MIDAS, 2 = TAME, 3 = TMU, 4 = TRADS Legacy
    • version required string

Output

Definitions

Area

  • Area object
    • Description required string
    • Id string
    • Name required string
    • XLatitude required string
    • XLongitude required string
    • YLatitude required string
    • YLongitude required string

AreaResponse

  • AreaResponse object
    • areas array
    • row_count integer

DailyQualityResponse

  • DailyQualityResponse object
    • Qualities array
    • row_count integer

Object

  • Object object

OverallQualityResponse

  • OverallQualityResponse object
    • data_quality integer
    • end_date string
    • row_count integer
    • sites string
    • start_date string

Qualities

  • Qualities object
    • Date string
    • Quality integer

SiteResponse

  • SiteResponse object

SiteResult

  • SiteResult object
    • Description string
    • Id string
    • Latitude number
    • Longitude number
    • Name string
    • Status string

SiteType

  • SiteType object
    • Description string
    • Id string

SiteTypeLayer

  • SiteTypeLayer object
    • Sites array

SiteTypeResponse

  • SiteTypeResponse object
    • row_count integer
    • sitetypes array

Sites

  • Sites object
    • Active array
      • items boolean
    • Description array
      • items string
    • Id array
      • items string
    • Lattitude array
      • items number
    • Longitude array
      • items number
    • SiteId array
      • items string

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/highwaysengland

Weekly Downloads

0

Version

4.0.0

License

MIT

Unpacked Size

26.2 kB

Total Files

4

Last publish

Collaborators

  • datafire