Sha256: 57ec882425ed7545de65a4f2bad6b56b7367f78858af810dbe871f98487bb5fe

Contents?: true

Size: 1.69 KB

Versions: 3

Compression:

Stored size: 1.69 KB

Contents

[![Build Status](https://travis-ci.org/fmobus/bikepoa-tools.png)](https://travis-ci.org/fmobus/bikepoa-tools)
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/fmobus/bikepoa-tools)

bikepoa-tools
=============

Gem containing a simple API to interact with information systems of [BikePOA](http://mobilicidade.com.br/bikepoa/), the
bicycle-sharing program of Porto Alegre, Brazil.

installation
============

To install the version that was released as a gem most recently, simply use

```
~$ gem install bikepoa-tools
```

If you want to be on top of things and use the latest github version, use

```
~$ git clone git@github.com:fmobus/bikepoa-tools.git
~$ cd bikepoa-tools
~/bikepoa-tools$ rake build
~/bikepoa-tools$ rake install
```


usage
=====

```ruby
>>> require 'bikepoa'
>>> client = BikePOA::Client.new
>>> client.stations
[
  <BikePOA::Station:0x007fd60191aeb8
    @id="1", @online="A", @status="EO", @size="12", @available="6"
    @name="Mercado", @address="Rua Marechal Floriano, 66, entre a ...">,
  ...
]
>>> s.select(&:active?).map(&:to_s)
[
  "<Station:Mercado, 0/12>",
  "<Station:Pra\xE7a da Alf\xE2ndega, 1/12>",
  "<Station:Casa de Cultura Mario Quintana, 4/12>",
  "<Station:Usina do Gas\xF4metro, 0/12>",
  "<Station:C\xE2mara de Vereadores, 5/12>",
  "<Station:Largo Zumbi, 3/14>",
  "<Station:Gin\xE1sio Tesourinha, 6/12>",
  "<Station:Shopping Praia de Belas, 3/12>",
  "<Station:Hospital M\xE3e de Deus, 5/14>",
  "<Station:Terminal Azenha, 3/12>",
  "<Station:Barra Shopping, 7/14>",
  "<Station:Escola Parob\xE9, 3/12>",
  "<Station:Regi\xE3o dos Tribunais, 5/12>"
]
```

Wishlist
====

* Add latitude and longitude to Station
* Less crude interface in Station

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bikepoa-tools-0.4.0 README.md
bikepoa-tools-0.3.1 README.md
bikepoa-tools-0.3.0 README.md