Skip to content

Time for Vbus API wraps the WSDL service of Vitrasa for get the stops and the buses estimates in JSON format.

Notifications You must be signed in to change notification settings

abdonrd/time-for-vbus-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time for Vbus API

Time for Vbus API wraps the WSDL service of Vitrasa for get the stops and the buses estimates in JSON format.

Endpoints

Get all stops

GET /stops

Example:

GET /stops

{
    "stops": [
        {
            "number": 20,
            "name": "Abade Juan de Bastos, (C.C.Freixo)",
            "location": {
                "lng": -8.74098135187851,
                "lat": 42.1874372819504
            }
        },
        {
            "number": 40,
            "name": "Abade Juan de Bastos, 48",
            "location": {
                "lng": -8.73182995565854,
                "lat": 42.1913070501787
            }
        }
    ]
}

Get stops around

GET /stops?lat=<latitude>&lng=<longitude>

Example:

GET /stops?lat=42.2260892&lng=-8.7254259

{
    "stops": [
        {
            "number": 14255,
            "name": "Pintor Colmeiro 23",
            "location": {
                "lng": -8.72577877618138,
                "lat": 42.2253189833775
            },
            "distance": 136.092
        },
        {
            "number": 2450,
            "name": "Barcelona,36",
            "location": {
                "lng": -8.72371600770132,
                "lat": 42.2259534895588
            },
            "distance": 212.8333
        }
    ]
}

Get stop

GET /stops/<stop_number>

Example:

GET /stops/14255

{
    "number": 14255,
    "name": "Pintor Colmeiro 23",
    "location": {
        "lng": -8.72577877618138,
        "lat": 42.2253189833775
    }
}

Get stop estimates

GET /stops/<stop_number>/estimates

Example:

GET /stops/14255/estimates

{
    "buses": [
        {
            "line": "16",
            "minutes": 11,
            "route": "HISPANIDAD - COIA"
        }
    ]
}

About

Time for Vbus API wraps the WSDL service of Vitrasa for get the stops and the buses estimates in JSON format.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages