Sha256: 632110a7e6b82a10eac6cbcb314dc1731f81107de072cd11988c4ef369ebbf56

Contents?: true

Size: 1.35 KB

Versions: 2

Compression:

Stored size: 1.35 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
=============

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

usage
=====

```ruby
>>> require './lib/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>"
]
```

todo
====

* Package it as a gem
* Add latitude and longitude to Station
* Less crude interface in Station

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bikepoa-tools-0.2.0 README.md
bikepoa-tools-0.1.0 README.md