Skip to content

tintindas/quotes-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quotes API

Fetch quotes from some of my favourite authors.

Object Structure

Quote{
  _id: String,         //autogenerated
  tags: String[]
  quoteText: String,
  author: String,
  source: String
}

Base address

https://tintin-quotes-api.herokuapp.com

Get all quotes

/quotes

Returns all the quotes in the database.

Search by author

/quotes/author/<nameOfAuthor>

Returns all quotes by specified author.

Example:

/quotes/author=Neil Gaiman

Returns all quotes by Neil Gaiman.

Search by source

quotes/source/<nameOfSource>

Returns all quotes from specified source.

Example:

/quotes/source/Coraline

Returns all quotes from Coraline.

Limit returned queries

/quotes?limit=<NUMBER OF QUOTES REQUIRED>

Returns required number of quotes from the database.

 /quotes/author/<nameOfAuthor>?limit=<NUMBER OF QUOTES REQUIRED>

Get required number of quotes returned by specifying a number after author or source.

Example:

/quotes/author/Neil Gaiman?limit=20

Returns 20 quotes by Neil Gaiman.

Random Quote

/quotes/random

Returns random quote from database.

/quotes/random?limit=10

Returns 10 random quotes.

List Authors

/authors

Returns an object containing an array of authors supported by the API and the number of authors supported.

Supported Authors

  • Ursula K Le Guin

  • Neil Gaiman

  • Douglas Adams

  • Arthur C Clarke

  • Isaac Asimov

  • Haruki Murakami

  • Terry Pratchett

Try it out

https://tintin-quotes-api.herokuapp.com