Skip to content

Latest commit

 

History

History
85 lines (50 loc) · 2.36 KB

README.md

File metadata and controls

85 lines (50 loc) · 2.36 KB

autoscout24_client

Build Status Code Climate

REST api client. It uses 4.1.1 REST API version. More information about API could be found at www.developergarden.com

This gem is in very early development stage.

Installation

Add this line to your application's Gemfile:

gem 'autoscout24_client', :git => '[email protected]:blackbumer/autoscout24_client.git'

And then execute:

$ bundle

Configure

There are several ways to configure gem.

via ENVIRONMENT variables:

You may specify API username and password in shell variables:

  AUTOSCOUT24_USERNAME="MyName"
  AUTOSCOUT24_PASSWORD="MyPassword"

via hash:

 Autoscout24Client.configure({
     username: "your_username",
     password: "your_password",
     culture_id: "ru-RU",
     default_search_params:
         {
             countries: %w(B CH D F I NL),
             show_with_images_only: "True",
             show_private_vehicles: "False"
         }
  })

if you use rails you may place this code into config/initializers/autoscout24.rb

via yaml file:

  Autoscout24Client.configure_with("config/autoscout24.yml")

Usage

just fetch first vehicles from remote

Autoscout24Client::Vehicle.find

fetch next page

Autoscout24Client::Vehicle.find(:page =>2)

search by brand_id and model_id Autoscout24Client::Vehicle.find(:brands =>{:brand_id => [13]}, :models => { :model_id=>[16888, 1320]})

More information about supported params could be found at www.developergarden.com

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Road map

If you have an idea please open an issue or use pivotaltracker

Trademark note

AutoScout24 is registered trademark owned by AutoScout24 GmbH