ca-highway-conditions-fetcher

2.0.1 • Public • Published

ca-highway-conditions-fetcher

NPM Version

Installation

$ npm install --save ca-highway-conditions-fetcher

Usage

Parsing

import fetch from 'ca-highway-conditions-fetcher';
 
fetch(17, 80).then(
  (results) => console.log(results),
  (error) => console.error(error)
);

Output

{
    "17": [
      {
          "ok": false,
          "status": 404,
          "statusText": "Not Found",
          "payload": {
            "type": "I",
            "number": "17"
          }
      },
      {
          "ok": true,
          "status": 200,
          "statusText": "OK",
          "payload": {
            "type": "SR",
            "number": "17",
            "body": ""
          }
      },
      {
          "ok": false,
          "status": 404,
          "statusText": "Not Found",
          "payload": {
            "type": "US",
            "number": "17"
          }
      }
    ],
    "80": [
      {
          "ok": true,
          "status": 200,
          "statusText": "OK",
          "payload": {
            "type": "I",
            "number": "80",
            "body": ""
          }
      },
      {
          "ok": false,
          "status": 404,
          "statusText": "Not Found",
          "payload": {
            "type": "SR",
            "number": "80"
          }
      },
      {
          "ok": false,
          "status": 404,
          "statusText": "Not Found",
          "payload": {
            "type": "US",
            "number": "80"
          }
      }
    ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i ca-highway-conditions-fetcher

Weekly Downloads

0

Version

2.0.1

License

MIT

Last publish

Collaborators

  • cameronhunter