FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

CFML DogAPI

v1.0.0 Public

CFML DogAPI

A CFML wrapper for The Dog API.
Interact with the self-proclaimed largest open source collection of dog pictures on the internet.

Feel free to use the issue tracker to report bugs or suggest improvements!

Acknowledgements

This project borrows heavily from the API frameworks built by jcberquist, such as xero-cfml and aws-cfml. Because it draws on those projects, it is also licensed under the terms of the MIT license.

Table of Contents

Quick Start

Who needs cats for demos? Looking for a random dog image? Here you go:

dogapi = new path.to.cfmldogapi.dogapi();

randomDog = dogapi.getRandomImage().data.message;

writeOutput( '<img src="#randomDog#" />' );

Reference Manual

getRandomImage()

Display a single random image from all dogs collection

listRandomImages( numeric count = 1 )

Returns multiple random images from all dogs collection

listBreeds()

Lists all available breeds (and sub-breeds)

listImagesByBreed( required string breed )

Lists all the images from a breed, e.g. hound

getRandomImageByBreed( required string breed )

Returns a random dog image from a breed, e.g. hound

listRandomImagesByBreed( required string breed, numeric count = 1 )

Returns multiple random dog images from a breed, e.g. hound

listSubBreedsByBreed( required string breed )

Lists all the sub-breeds from a breed

getRandomImageBySubBreed( required string breed, required string subbreed )

Returns a single random image from a sub-breed

listRandomImagesBySubBreed( required string breed, required string subbreed, numeric count = 1 )

Return multiple random dog images from a sub-breed, e.g. Afghan Hound

listImagesBySubBreed( required string breed, required string subbreed )

Lists all the images from the sub-breed, e.g. Boston Bulldog


Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Actions
Current
1.0.0 Sep 10 2019 05:14 AM Sep 10 2019 05:14 AM

 

No collaborators yet.
   
  • Sep 10 2019 05:14 AM
  • Sep 10 2019 05:14 AM
  • 46
  • 0
  • 0