Skip to content

heymitchfischer/petfinder_ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages