Ruby gem wrapper for the Petfinder API.
sudo gem install petfinder
Get your Petfinder API key at: www.petfinder.com/developers/api-key
petfinder = Petfinder::Client.new('your_api_key', 'your_api_secret')
Petfinder.configure do |config| config.api_key = 'your_api_key' config.api_secret = 'your_api_secret' end petfinder = Petfinder::Client.new
pets = petfinder.find_pets('dog', '90210') pets.count # => "25" pets.first.name # => "Petey" pets.first.shelterid # => "CA123"
shelter = petfinder.shelter('CA123') shelter.name # => "Melrose Place SPCA"
-
Implement use of security token when Petfinder requires it
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Copyright © 2010 Eric Hutzelman. See LICENSE for details.