Gem still in early development
A Ruby interface to the idealista.com API.
Add this line to your application's Gemfile:
gem 'idealista'
And then execute:
$ bundle
Or install it yourself as:
$ gem install idealista
require 'idealista'
client = Idealista::Client.new("YOUR_API_KEY")
query = {country: "es",
max_items: 5,
num_page: 1,
center: "40.4229014,-3.6976351",
distance: 100,
property_type: "bedrooms",
operation: "A",
}
properties = client.search(query)
#=> [#<Idealista::Property:0x007ff732c82d10 @price=500, ...
client.configure do |config|
config.wait_and_retry = true
config.wait_and_retry do |w|
w.sleep_time = 2
w.number_of_retries = 2
end
To contribute, get your API key from http://developers.idealista.com/access-request, and edit secret.sample.rb
. Then rename file to secret.rb
.
- Fork it ( https://github.com/[my-github-username]/idealista/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request