Skip to content

estien/ReisekompisService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReisekompisService

Reisekompis mellomlag skrevet i Node.js

Fagdagpresentasjon finnes her

A Ruter API-abstraction service

This node.js-based application works as an abstraction layer between on-the-road mobile apps and Ruter's API.

Set up your development environment

This application is pretty easy to set up locally. You need node and npm installed, and that's about it!

If you don't have node and npm installed, you can check out these install scripts.

Once you've cloned the project, simply run npm install to fetch the dependencies.

To run, enter node app.js into your favorite terminal.

Endpoints

The application have the following JSON-producing endpoints available:

GET /search/:query

Searches Ruter's API for a stop. Returns a list of stops and the lines that stop there.

GET /poll/:stopId/:lineId

Polls a stop for a given line.

POST /poll

Polls a set of stops and lines for the next departures.

Parameter form:

[ 
    {
        id: 3010200, // Stop id
        lines: [ 1, 2 ] // Array of line IDs
    }, ...
] 

Returns a list of line departures at the specified stop.

About

Reisekompis mellomlag skrevet i Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published