https://github.com/hmarr/barclays_bikes
A Ruby library for retrieving Barclays Bike availability
https://github.com/hmarr/barclays_bikes
Last synced: over 1 year ago
JSON representation
A Ruby library for retrieving Barclays Bike availability
- Host: GitHub
- URL: https://github.com/hmarr/barclays_bikes
- Owner: hmarr
- License: mit
- Created: 2012-04-06T11:25:15.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-06T11:29:26.000Z (about 14 years ago)
- Last Synced: 2025-02-26T09:05:49.603Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 155 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# barclays_bikes
A Ruby library for retrieving Barclays Bike availability information. It may be
used as a library or as a command line tool.
### Installation
```console
$ gem install barclays_bikes
```
### Command Line Usage
Run the `bbikes` command in a shell, optionally providing a query to filter
the station that are displayed.
```console
$ bbikes hatton wall
Hatton Wall, Holborn:
14 bikes available
11 spaces available
```
### Using from Ruby
Simply require `barclays_bikes`, then use `BarclaysBikes.load_bike_data` to
fetch the availability information.
```ruby
require 'barclays_bikes'
bike_data = BarclaysBikes.load_bike_data
bike_data['Hatton Wall, Holborn']
# => {:bikes=>13, :spaces=>12}
```