Build Status Code Climate

bikepoa-tools

Gem containing a simple API to interact with information systems of 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 [email protected]:fmobus/bikepoa-tools.git
~$ cd bikepoa-tools
~/bikepoa-tools$ rake build
~/bikepoa-tools$ rake install

usage

>>> 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