Code Monkey home page Code Monkey logo

vitrapp's Introduction

A JavaScript wrap of Vitrasa wsdl api.

๐Ÿšง under construction ๐Ÿšง

๐ŸšŒ VITRASA - Public transportation in Vigo

Endpoints

Get all stops

GET /stops

Example:

GET /stops/all

{
    "id": 280,
    "name": "Arquitecto Antonio Cominges, 38",
    "location": {
        "lng": -8.80731148602987,
        "lat": 42.1897563491201
    }
},
{
    "id": 290,
    "name": "Arquitecto Gomez Roman, 35",
    "location": {
        "lng": -8.8038689924564,
        "lat": 42.1899936938779
    }
},
...

Get stops nearby

GET /stops/nearby/:latitude/:longitude

Example:

GET /stops/nearby/42.215625/-8.747444/

[
    {
        "_attributes": {
            "idparada": "1320",
            "nombre": "Avda. Castelao- 87",
            "distancia": "532.5505",
            "latitud": "42.2173022236201",
            "longitud": "-8.75110475205119"
        }
    },
    {
        "_attributes": {
            "idparada": "1310",
            "nombre": "Avda. Castelao- 73",
            "distancia": "348.73",
            "latitud": "42.2177055282635",
            "longitud": "-8.74775332453754"
        }
    }
]

Get stop estimations

GET stops/:id/estimations

Example:

GET /stops/14901/estimations

[
    {
        "line": "10",
        "route": "cemiterio de teis",
        "minutes": "1",
        "distance": "624"
    },
    {
        "line": "15A",
        "route": "r. nieto - cabral",
        "minutes": "10",
        "distance": "2748"
    }
]

Get estimations by coordinates

GET /stops/location/:lat/:lng/estimations

Example:

GET /stops/location/42.2346052506693/-8.6711950590708/estimations

[
    {
        "line": "9A",
        "route": "peinador - aeroporto",
        "minutes": "4",
        "distance": "2383"
    },
    {
        "line": "9B",
        "route": "rabadeira por rinxela",
        "minutes": "23",
        "distance": "5938"
    }
]

For a python implementation visit --> Time for Vbus API

vitrapp's People

Contributors

jenni avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.