Installation

gem install 'multicity'

Example

require 'multicity'

# Get all cars
agent = Multicity::Agent.new
cars = agent.get_cars
cars.each do |car| 
    puts car.id # => "1234"
    puts car.license_plate # => "B-MC 1694"
    puts car.model # => "Citroën C-Zero"
    puts car.position # => {:lat => '52.5359483', :lon => '13.4432250'}
end

# get the price
Multicity::Agent.price 25 # => {:unit => 'EUR', :price => 7.50, :rate => :starter}
Multicity::Agent.price 25, :vielnutzer # => {:unit => 'EUR', :price => 6.00, :rate => :vielnutzer}

# get operation area
agent.get_operation_area # => array of lat/lon coordinates "[[52.464874, 13.405852], [52.466625, 13.425508], [52.467854, 13.435678],...]"

# get loading spots
agent.get_loading_spots

Contribute

Fork, implement, create tests and a pullrequest :)