All Projects → cascadiacollections → citibike

cascadiacollections / citibike

Licence: other
A Node.js library for Citibike's REST API

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to citibike

currency-api
A demo project on how to test a node/express app with Mocha, Nock and proxyquire (MNP) and code coverage with nyc/istanbul.
Stars: ✭ 19 (-48.65%)
Mutual labels:  nyc
nyc-crash-mapper
React Redux web application for viewing, filtering, & comparing trends of automobile collision data published by the NYPD.
Stars: ✭ 15 (-59.46%)
Mutual labels:  nyc
subwayclock
Display clock for NYC subways
Stars: ✭ 29 (-21.62%)
Mutual labels:  nyc
nyc-infosec
Mapping the NYC Infosec Community
Stars: ✭ 41 (+10.81%)
Mutual labels:  nyc
ts-node-starter
GitHub template to get started with Node.js & TypeScript. ⚡
Stars: ✭ 28 (-24.32%)
Mutual labels:  nyc
ACCESS-NYC
Find help in NYC with food, money, housing, work, and more on ACCESS NYC. Maintained by @NYCOpportunity
Stars: ✭ 27 (-27.03%)
Mutual labels:  nyc
nycmesh.net
NYC Mesh Website
Stars: ✭ 33 (-10.81%)
Mutual labels:  nyc
meetup
For organizing the design systems meetup in NYC.
Stars: ✭ 23 (-37.84%)
Mutual labels:  nyc
tenants
JustFix.nyc is a tool to document, organize, and take action in getting repairs made on your apartment.
Stars: ✭ 15 (-59.46%)
Mutual labels:  nyc
citibike-trips
Visualizing citibike trips with webgl
Stars: ✭ 54 (+45.95%)
Mutual labels:  citibike
labs-factfinder
New York City Census Reporting Tool
Stars: ✭ 34 (-8.11%)
Mutual labels:  nyc
goodservice
Website that detects headway discrepancy on New York City Subway system using live countdown clocks
Stars: ✭ 26 (-29.73%)
Mutual labels:  nyc
nyc-mta-arrival-notify
A basic python script that reads the NYC MTA realtime feed API for subway data and outputs when the next arrival is for a given station.
Stars: ✭ 45 (+21.62%)
Mutual labels:  nyc
theweekendest
Real-time New York City subway service map
Stars: ✭ 51 (+37.84%)
Mutual labels:  nyc
NYCOpenRecords
A web application to submit and view Freedom of Information Law requests
Stars: ✭ 38 (+2.7%)
Mutual labels:  nyc
ACCESS-NYC-PATTERNS
ACCESS NYC Pattern library and design system documentation for https://access.nyc.gov. Maintained by @NYCOpportunity
Stars: ✭ 14 (-62.16%)
Mutual labels:  nyc
istanbul-badges-readme
Creates and updates README testing coverage badges with your json-summary
Stars: ✭ 77 (+108.11%)
Mutual labels:  nyc
data-analysis-using-python
Data Analysis Using Python: A Beginner’s Guide Featuring NYC Open Data
Stars: ✭ 81 (+118.92%)
Mutual labels:  nyc
subway-time
A nice NYC Subway time table.
Stars: ✭ 25 (-32.43%)
Mutual labels:  nyc
nycbikemap
A web-based, unified, interactive bike map for NYC that combines information from NYC OpenData, Citi Bike and other sources.
Stars: ✭ 15 (-59.46%)
Mutual labels:  nyc

Citibike

npm version

A node.js wrapper for Citibike's REST API.

Now available in PHP!

Installation

Install using the node.js package manager npm:

  $ npm install citibike

Or...

Install via git clone:

  $ git clone git://github.com/cascadiacollections/citibike.git
  $ cd citibike
  $ npm install

Requirements

You can install citibike and its dependencies with npm:

  $ npm install citibike

Dependencies

Examples

Demos of the citibike module are located in: ./examples

API Documentation

  • Stations - .getStations( params, callback )
citibike.getStations({ updateOnly: true }, function(data) {
    console.log(data);
});
  • Sample JSON Response
{
    "ok": true,
    "meta": [],
    "results": [
        {
            "id": 72,
            "status": "Active",
            "latitude": 40.76727216,
            "longitude": -73.99392888,
            "label": "W 52 St & 11 Ave",
            "stationAddress": "",
            "availableBikes": 12,
            "availableDocks": 22,
            "nearbyStations": [
                {
                    "id": 480,
                    "distance": 0.17780736685282
                },
                {
                    "id": 513,
                    "distance": 0.28502152791732
                },
                {
                    "id": 508,
                    "distance": 0.30285853404336
                },
                {
                    "id": 495,
                    "distance": 0.3196273377671
                },
                {
                    "id": 530,
                    "distance": 0.3430221582592
                }
            ]
        },
        // ... more stations ...
    ],
    "activeStations": 308,
    "totalStations": 313,
    "lastUpdate": 1371908767
}
  • Branches - .getBranches( params, callback )
citibike.getBranches(null, function(data) {
    console.log(data);
});
  • Sample Branches JSON Response
{
    "ok": true,
    "meta": [],
    "results":[
        { "id": 1, "latitude": 40.7086647301912, "longitude": -74.0108752995729, "label": "120 Broadway" },
        { "id": 2, "latitude": 40.7533264160156, "longitude": -73.9794006347656, "label": "330 Madison Ave" },
        { "id": 3, "latitude": 40.7042541503906, "longitude": -74.0070037841797, "label": "111 Wall St" },
        // ... more branches ...
    ],
    "lastUpdate": 1367853735
}
  • Helmets - .getHelmets( params, callback )
citibike.getHelmets(null, function(data) {
    console.log(data);
});
  • Sample Helmets JSON Response
{
    "ok": true,
    "meta": [],
    "results":[
        { "id": 5002, "address": "571 Courtlandt Av", "latitude": 40.8170769363642, "longitude": -73.9193703979254, "label": "Neighborhood Cycle, Inc." },
        { "id": 5008, "address": "178 Graham Av", "latitude": 40.7078323364258, "longitude": -73.9429473876953, "label": "Graham Bicycle Discount Center" },
        { "id": 5000, "address": "4055 White Plains Rd", "latitude": 40.8901315927505, "longitude": -73.8593445718288, "label": "Arrow Cycle, Inc" },
        { "id": 5001, "address": "33 E 170th St", "latitude": 40.8400574326515, "longitude": -73.9171025902033, "label": "Crosstown Bicycles" },
        // ... more helmet locations ...
    ],
    "lastUpdate": 1367853737
}

Testing

You can test citibike:

  $ npm test

Contributors

LICENSE

Citibike: Copyright (c) 2014-2016 Kevin T. Coughlin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].