0.0
No commit activity in last 3 years
No release in over 3 years
Test Gem that assists with interacting with the Petfinder REST API. For a more robust gem, see https://github.com/ehutzelman/petfinder
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.1
 Project Readme

Petfinder_Ruby

Test Gem that assists with interacting with the Petfinder REST API. For a more robust gem, see here.

Installation

To install to a gemfile:

gem 'petfinder_ruby'

And then bundle:

bundle

Or to install manually:

gem install petfinder_ruby

Rails Configuration

Create a file in your config/initializers directory:

# config/initializers/petfinder_ruby.rb
Petfinder.configure do |config|
  config.client_id = "your_client_id"
  config.client_secret = "your_client_secret"
end

This will configure Petfinder using your client ID and client secret (both of which can be obtained here. It's recommended to secure your client ID and client secret by hiding them as environment variables. See the Figaro Gem for assistance with that.

Usage

Gem currently supports two different requests for the Petfinder API.

Get Organization Info:

Petfinder::Client.get_organization("your_org_id")

Get Adoptable Animals from an organization:

Petfinder::Client.get_adoptable_animals_by_organization("your_org_id")