Gem to read all cars from DriveNow
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
CHANGELOG.md
Gemfile
LICENSE
README.md
Rakefile
drivenow.gemspec

README.md

Installation

gem install 'drivenow'

Get API key

You need an API key for requests.

Example

require 'drivenow'

puts "Available cities: #{Drivenow::Agent.cities.keys.inspect}"

# get all available cars
cars = Drivenow::Agent.new(city: :muenchen, api_key: ENV['DRIVENOW_APIKEY']).cars

car = cars.first
puts car.json.inspect
puts car.address
puts car.name
puts car.long_name
puts car.city
puts car.address.inspect
puts car.automatic?
puts car.license_plate
puts car.model
puts car.position.inspect
puts car.fuel_state
puts car.fuel_type
puts car.transmission
puts car.clean