codeforboston / mbta-ninja

MBTA Ninja!
http://mbta.ninja
MIT License
81 stars 46 forks source link

Add open API for accessing our data #46

Open geoffreylitt opened 9 years ago

geoffreylitt commented 9 years ago

We should make sure event structures are somewhat standardized before exposing an API, but we should make this data accessible to other apps.

radhikamalik commented 9 years ago

https://github.com/xcv58/meteor-collectionapi seemed promising in initial investigations

patrickgreenwell commented 9 years ago

I took a look into collectionApi using https://github.com/kahmali/meteor-restivus as it looks like its more extensible. Collection API gives basic CRUD functionality, and it's got the basics around what needs to be there, stuff like:

GET /api/reports/{id} //gets a specific report GET /api/reports/ //gets all non-expired reports

But if we' ever think about expanding it to more RESTful style we'd need the routing in restivus that comes in by default. It'd let us do things like: GET /api/reports/line/{line} //gets non-expired reports by line GET /api/reports/stop/{station} //gets non-expired reports by station quite easily as well as allowing us to build out the base collections quickly as it's built on top of collectionapi

I'll see if I can get something put together tomorrow night at hacknight.