0.01
No commit activity in last 3 years
No release in over 3 years
A ruby wrapper for Citibikenyc API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2.0
>= 0
~> 2.13.0
~> 1.12.3
~> 0.8.6.2

Runtime

~> 0.8.7
~> 2.0.5
~> 1.7.7
 Project Readme

Citibikenyc Build Status Dependency Status

A gem for CitibikeNYC API - citibikenyc.com

Installation

Add this line to your application's Gemfile:

gem 'citibikenyc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install citibikenyc

API Usage Examples

require "rubygems"
require "citibikenyc"

# Get a list of all stations
puts Citibikenyc.stations

# Get only the current status for all stations
puts Citibikenyc.stations_status

# Get helmets info
puts Citibikenyc.helmets

# Get branches info
puts Citibikenyc.branches

For more information about the data returned by every method please check the specs folder

Configuration

Because citibikenyc gem is based on Faraday, it supports the following adapters:

Beside the adapter, you can change the following properties:

  • endpoint
  • format
  • user_agent
  • proxy
  • debug

For instance:

require 'typhoeus/adapters/faraday' # You will need the typhoeus gem

client = Citibikenyc.client(adapter: :typhoeus, user_agent: "foobar v1", debug: true)
client.stations

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request