nokey.animals package
Submodules
nokey.animals.dog_api module
- class nokey.animals.dog_api.DogAPI(use_caching=False, cache_name='dog_api_cache', backend='sqlite', expire_after=3600)[source]
Bases:
objectA class to interact with the Dog API.
- base_url
The base URL for the API.
- about
A short description of the API.
- get_all_dog_breeds()[source]
Returns a list of all the dog breeds in the Dog API.
- Parameters:
None –
- Returns:
Returns a dictionary containing a list of all the dog breeds in the Dog API.
- Return type:
dict
- get_all_subBreeds(breed)[source]
Returns a list of all sub-breeds for the specified dog breed.
- Parameters:
breed (str) – The breed of the dog.
- Returns:
Dictionary containing a list of all sub-breeds for the specified dog breed.
- Return type:
dict
- get_docs_url()[source]
Returns the URL for the Dog API documentation.
- Parameters:
None –
- Returns:
The URL for the Dog API documentation.
- Return type:
string
- get_dog_images_by_breed(breed)[source]
Returns an array of URLs for images of dogs of the specified breed.
- Parameters:
breed (str) – The breed of the dog.
- Returns:
Dictionary containing a list of URLs of images for the specified dog breed.
- Return type:
dict