Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.
/ myBus-web-service Public archive

This is a web service hosted on heroku for querying the TFL Api

Notifications You must be signed in to change notification settings

kolitiri/myBus-web-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MyBus Web Service

This is a flask API that was created to support the MyBus Garmin watch app.

It acts as a proxy service between the watch and TFL's endpoints.

Requests from the Garmin app go through this service and their responses are filtered before they return to the watch app.

This way I can control the size of the responses and avoid crashing the watch application. (It can only handle responses of limited size)

All the requests are forwarded to the TFL's unified API that can be found here

API Usage

Currently there are only to requests that are supported:

Bus stops request

  • URL: /stops

  • Method: POST

  • Data

{
	"location": {
		"latitude": "51.492628",
		"longtitude": "-0.223060",
		"radius": "200",
		"stopTypes": "NaptanPublicBusCoachTram",
		"returnLines": "False"
	}
}
  • Sample Call:
curl --header "Content-Type: application/json" --request POST --data @stops.json https://gmmybus.tk/stops

Bus predictions request

  • URL: /predictions

  • Method: POST

  • Data

{
	"stop": {
		"naptanId": "490004290L"
	}
}
  • Sample Call:
curl --header "Content-Type: application/json" --request POST --data @predictions.json https://gmmybus.tk/predictions

Acknowledgements

This application is Powered by TfL Open Data and contains OS data © Crown copyright and database rights 2016

Authors

Chris Liontos

About

This is a web service hosted on heroku for querying the TFL Api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages