Skip to content

Latest commit

 

History

History
152 lines (89 loc) · 3.48 KB

README.md

File metadata and controls

152 lines (89 loc) · 3.48 KB

dog.ceo API

This current version is using cloudflare workers. The old PHP version can be found here.

License: MIT Maintainability Code Smells codecov CircleCI

Info

Examples

Stats

Screenshot of statistics page

Dependencies

  • npm

Develop

npm install
npm run dev:remote

Deploy

npm run deploy

Test

npm run test

Endpoints

/breeds/list/all

List all breed names including sub breeds.

/breeds/list/all/random

Get random breed including any sub breeds.

/breeds/list/all/random/10

Get 10 random breeds including any sub breeds.

/breeds/list

List all master breed names.

/breeds/list/random

Get single random master breed.

/breeds/list/random/10

Get 10 random master breeds.

/breed/{breed}/list

List sub breeds.

/breed/{breed}/list/random

List random sub breed.

/breed/{breed}/list/random/10

List 10 random sub breeds.

/breed/{breed}

Get master breed info (data is incomplete, see content folder).

/breed/{breed}/{breed2}

Get sub breed info (data is incomplete, see content folder).

/breeds/image/random

Random image from any breed.

/breeds/image/random/3

Get 3 random images from any breed (max. 50)

/breed/{breed}/images

Get all breed images.

/breed/{breed}/images/random

Get random image from a breed (and all its sub-breeds).

/breed/{breed}/images/random/4

Get 4 random images from a breed (and all its sub-breeds).

/breed/{breed}/{breed2}/images

Get all images from a sub breed.

/breed/{breed}/{breed2}/images/random

Get random image from a sub breed.

/breed/{breed}/{breed2}/images/random/5

Get 5 random images from a sub breed.

Unfinished Endpoints

These endpoints might change in the future...

Alt tags

https://dog.ceo/api/breeds/image/random/alt
https://dog.ceo/api/breeds/image/random/1/alt
https://dog.ceo/api/breeds/image/random/9/alt
https://dog.ceo/api/breed/hound/images/alt
https://dog.ceo/api/breed/hound/images/random/1/alt
https://dog.ceo/api/breed/hound/images/random/9/alt
https://dog.ceo/api/breed/hound/afghan/images/alt
https://dog.ceo/api/breed/hound/afghan/images/random/alt

XML Responses

Add 'Content-Type' request header containing 'application/xml' to any endpoint.