Documentation ¶
Overview ¶
Package petfinder provides an interface to the petfinder.com REST API
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingAPIKey is returned if there is an attempt to create an api instance without a key ErrMissingAPIKey = errors.New("Missing API Key") )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { BaseURL string // contains filtered or unexported fields }
func NewAPI ¶
NewAPI creates a new API object from an API key and secret key
Note: secret is ignored for now
func (*API) RandomPets ¶
RandomPet fetches a list of random Pets
type Pet ¶
type Pet struct { ID int Age string Animal Animal Breeds []Breed Contact struct { Email string Address1, Address2, City, State, Zip string Fax, Phone string } Description string LastUpdate string // TODO: make time.Time Media struct { Photos []struct { ID string T string Size string } } Mix string Name string Options string Sex string ShelterId int ShelterPetId int Size string Status string }
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
listbreeds
program listbreeds lists animal breeds with the petfinder API
|
program listbreeds lists animal breeds with the petfinder API |
randompets
program listpets lists random pets from the petfinder API
|
program listpets lists random pets from the petfinder API |
Click to show internal directories.
Click to hide internal directories.