Skip to content

petfinder-com/petfinder_ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Petfinder API Client Libary

This client library is not officially supported and is not guaranteed to be maintained by Nestle Purina Petcare Company.

Petfinder.com API client for Elixir

Installation

If available in Hex, the package can be installed by adding petfinder to your list of dependencies in mix.exs:

def deps do
  [
    {:petfinder, "~> 0.1.0"}
  ]
end

Add application to application list

extra_applications: [:logger, :runtime_tools, :petfinder]

Configuration

base_url is optional. It will default to https://api.petfinder.com

config :petfinder,
  oauth_client: <client_id_here>,
  oauth_secret: <client_secret_here>,
  base_url: "https://api.petfinder.com"

Usage

Return a list of animals with no parameters

Petfinder.Animals.get_animals()

Provide search parameters (documented here: https://www.petfinder.com/developers/v2/docs/#get-animals)

query = %{
  "type" => "Dog",
  "gender" => "male",
  "location" => 37849
}
Petfinder.Animals.get_animals(query)

About

Elixir client for Petfinder.com API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages