Programming Quotes API
It wouldn't be a very good programmers resources if it didn't have an API now, would it?
You can request a JSON feed for all quotes, popular quotes and each individual quote. The results can be returned as JSONP by supplying a callback query parameter.
To get the full list:
GET http://quotes.stormconsultancy.co.uk/quotes.json
That will give you an array of quote objects like so:
[ { id: 1, author: "Anon", quote: "Lorem ipsum..." }, { id: 2, author: "Anon", quote: "Lorem ipsum..." }, .... ]
Popular Quotes
To sort the collection by popularity, request:
GET http://quotes.stormconsultancy.co.uk/popular.json
Single Quote
For an individual quote, request:
GET http://quotes.stormconsultancy.co.uk/quotes/1.json
This will give you a single object for the quote:
{ id: 1, author: "Anon", quote: "Lorem ipsum....", permalink: "http://quotes.stormconsultancy.co.uk/quotes/1" }
Random
You can also get a random quote by requesting:
GET http://quotes.stormconsultancy.co.uk/random.json
JSONP
Any of the results can be returned as JSONP by supplying the `callback` parameter.
GET http://quotes.stormconsultancy.co.uk/quotes/1.json?callback=my_method
That will return:
my_method({ id: 1, author: "Anon", quote: "Lorem ipsum....", permalink: "http://quotes.stormconsultancy.co.uk/quotes/1" })