NodeJS v6+ | Download NodeJS
OpenData Service Token | Sign up in Forms and check your mail
This library is installed by npm even though you can also clone the repository.
npm install emt-bus --save
Call the library and use constructor to generate access to the service
const EMT = require('emt-bus')
EMTToken = new EMT('idClient', 'passKey')
Previously we will have to ask for the credentials here
Establish the service to request
var bus = EMTToken("bus")
or
var geo = EMTToken("geo")
We will make a basic request in the following way. the property 'today' it's the current day and datelimit is the deadline
bus.getCalendar(today, datelimit).then(function(res){
console.log(res.resultValues);
})
.catch(function(error){
console.log(error)
});
Methods | Description | Parameters |
---|---|---|
getCalendar | Get EMT Calendar for all days and line schedules for a range of dates | todayDate, dateLimit |
getGroups | Returns every line type and their details | Empty |
getListLines | Returns lines with description and groups | todayDate, numBus |
getNodesLines | Returns all stop identifiers and his coordinate, name, lines and directions | numStop |
getRouteLines | Returns a line/s route with the vertex info to build the route and coordinates for stops and axes | todayDate, numBus |
getTimeTableLines | Provices information about the requested line at travel time | todayDate, numBus |
getTimesLines | Returns current schedules for the requested lines | todayDate, numBus |
Methods | Description | Parameters |
---|---|---|
getArriveStop | Gets bus arrive info to a target stop | numStop |
getGroups | Return a list of groups | Empty |
getInfoLine | Returns line info in a target date | todayDate, numBus |
getInfoLineExtend | Returns line info in a target date | todayDate, numBus |
getPointsOfInterest | Returns a list of Points of Interest from a coordinate center with a target radius | latitude, longitude, Radius |
getPointsOfInterestTypes | Returns a list of Point of interest types | |
getStopsFromStop | Returns a list of stops from a target stop with a target radius and the lines arriving to those stops. | numStop, Radious |
getStopsFromXY | Returns a list of stops from a coordinate with a radius and the lines arriving to those stops. | latitude, longitude, Radius |
getStopsLine | Provices information about the requested line at travel time. | numBus, direction (1 = Going, 2 = Return) |
getStreet | Returns a list of EMT nodes related to a location. All EMT locations are a group of stops within a target radius and the lines related to each stop in the list. | streetNumber, description (name street) |
getStreetFromXY | Returns a list of stops from a target coordinate. | latitude, longitude, Radius |
Methods | Description | Parameters |
---|---|---|
getEstimatesIncident | Get estimate arrival time to stop and its related issues | |
getStreetRoute | Request up to three optimal routes from one place to another using bus or walking, source and destination must be in a format known for the system, which means that should have been validated by a GetStreet call | |
getRouteWithAlarm | ||
getRouteWithAlarmResponse | ||
getRoute | ||
getRouteResponse |
Methods | Description | Parameters |
---|---|---|
getStations | Obtiene la relación de todas las bases de Bicimad y su estado operacional. | |
getSingleStations | Obtiene la información de una base |
Methods | Description | Parameters |
---|---|---|
detailParking | N/A | |
detailPOI | N/A | |
iconDescription | N/A | |
infoParkingPoi | N/A | |
listFeatures | N/A | |
listParking | N/A | |
listStreetPoisParking | N/A | |
listTypesPOIs | N/A |