Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,21 @@ task 'build', 'Build project from src/*.coffee to lib/*.js', ->
throw err if err
console.log 'test.js removed from lib...'

exec 'rm -f lib/test-feeds.js', (err, stdout, stderr) ->
throw err if err
console.log 'test-feeds.js removed from lib...'

exec 'coffee --compile --output ./ src/app.coffee', (err, stdout, stderr) ->
throw err if err
console.log 'app.js placed in lib...'

exec 'coffee --compile --output test/ src/test.coffee', (err, stdout, stderr) ->
throw err if err
console.log 'test.js placed in lib...'
console.log 'test.js placed in test...'

exec 'coffee --compile --output test/ src/test-feeds.coffee', (err, stdout, stderr) ->
throw err if err
console.log 'test-feeds.js placed in test...'

exec 'cson2json src/config.cson > lib/config.json', (err, stdout, stderr) ->
throw err if err
Expand Down
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# allbikes API [![NPM Version](http://img.shields.io/npm/v/allbikes.svg)](https://www.npmjs.org/package/allbikes) [![BuildStatus](http://img.shields.io/travis/SJAnderson/allbikes.svg)](https://travis-ci.org/SJAnderson/allbikes)

allbikes is an API that provides live station information for Bixi-built Bike Share programs around the world.
allbikes is an API that provides live station information for Bixi-built Bike Share programs around the world.

Stations currently supported and their respective API reference codes (city code).

| Bike Share | City | city_id |
| ----- | ------ |------ |
| Aspen WE-cycle| Aspen, CO | ASE |
| Barclay's Cycle Hire| London, UK| LHR |
| Bay Area Bike Share| San Francisco, CA | SFO |
| Bike Chattanooga | Chattanooga, TN | CHA |
| Capital Bike Share| Washington, D.C.| DCA |
| Citi Bike| New York City, NY | JFK |
| CoGo | Columbus, OH | CMH |
| Divvy | Chicago, IL | ORD |
| Hubway | Boston, MA | BOS |
| Melbourne Bike Share| Melbourne, Vic | MEL |
| Montreal Bixi | Montreal, QC | YUL |
| Nice Ride| Minneapolis, MN| MSP |
| Ottawa Bixi| Ottawa, Ont| YOW |
| Toronto Bixi|Toronto, Ont | YYZ |
| Bike Share | City | city_id | Active
| ------ | ------ | ------ | ------ |
| Aspen WE-cycle | Aspen, CO | ASE | Yes
| Barclay's Cycle Hire | London, UK| LHR | Yes
| Bay Area Bike Share | San Francisco, CA | SFO | Yes
| Bike Chattanooga | Chattanooga, TN | CHA | Yes
| Capital Bike Share | Washington, D.C.| DCA | Yes
| Citi Bike | New York City, NY | JFK | Yes
| Citi Bike | Miami, FL| MIA | Yes
| CoGo | Columbus, OH | CMH | Yes
| Deco Bike | San Diego, CA| SAN | Yes
| Divvy | Chicago, IL | ORD | Yes
| Hubway | Boston, MA | BOS | Yes
| Melbourne Bike Share| Melbourne, Vic | MEL | Yes
| Montreal Bixi | Montreal, QC | YUL | Yes
| Nice Ride | Minneapolis, MN| MSP | Yes
| Ottawa Bixi | Ottawa, Ont| YOW | No
| Pronto Cycle Share | Seattle, WA| SEA | Yes
| Toronto Bixi |Toronto, Ont | YYZ | Yes

# goal
While every Bike Share program has a live JSON or XML feed, the data is presented differently thus making a universal bike share app difficult to create. This project aims to provide a easy-to-use solution for all bike-share data queries from around the world.
Expand Down Expand Up @@ -62,5 +65,3 @@ Returns a JSON array of stations from a city sorted by closest to farthest.

## contact
Twitter: [@SJAndersonLA](twitter.com/sjandersonla)


26 changes: 15 additions & 11 deletions app.js
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 61 additions & 54 deletions lib/bikeShare.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion lib/config.json
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
{"mongo":{"host":"localhost","port":27017},"statusKey":{"inService":1,"notInService":3}}
{ "mongo":
{ "host": "localhost"
, "port": 27017
}
, "statusKey":
{ "inService": 1
, "notInService": 3
}
}
Loading