transantiago-client

npm package for query data from Transantiago

Showing:

Popularity

Downloads/wk

4

GitHub Stars

12

Maintenance

Last Commit

4yrs ago

Contributors

6

Package

Dependencies

4

Size (min+gzip)

265.2KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Transantiago api

Non official api for querying data from Transantiago and get closest buses to bus stop.

Install

npm install transantiago-client --save

Usage

Example: Query for buses arrival time and distance to bus stop pc155.

var tsapi = require("transantiago-client");

tsapi("pc155").then( r => {

  //do something
  console.log(JSON.stringify(r));

}).catch(err => {
    console.log(err)
});

The result is:

{
  "avail": [
    {
      "service": "401N",
      "buses": [
        {
          "bus": "CJRX99",
          "arrivaltime": "En menos de 10 min.",
          "dist": "47  mts."
        },
        {
          "bus": "FLXC69",
          "arrivaltime": "En menos de 10 min.",
          "dist": "4117  mts."
        }
      ]
    },
    {
      "service": "426",
      "buses": [
        {
          "bus": "FLXJ72",
          "arrivaltime": "Entre 07 Y 15 min.",
          "dist": "5727  mts."
        },
        {
          "bus": "WB1981",
          "arrivaltime": "Entre 22 Y 32 min.",
          "dist": "14017  mts."
        }
      ]
    }
  ],
  "outof": [
    "117",
    "117C",
    "401",
    "406",
    "407",
    "421",
    "427",
    "429C",
    "430"
  ]
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial