"So, how does it work?" I hear you ask. At BarfAndBel.ch/api/quote.php you can generate a random quote in JSON every time the code is run. Since that's probably not enough for what you want, there are a few extra expressions you can use to customise the output a bit. Here are those arguments:
|?id=[quote id]||Lets you specify which exact quote to be shown. Quote ids can be found in the full database.||?id=1|
|?source=[movie/series title]||Lets you specify from which movie or series the quote should be from.||?source=How To Train Your Dragon|
|?viking=[viking/character name]||Lets you specify by whom the quote should be said.||?viking=Hiccup|
|?limit=[amount of quotes]||Lets you limit the amount of quotes. Standard set to 1, set to none for all quotes.||?limit=none|
|?order=[database row]||Lets you order the output. Standard is set to random order.||?order=id&limit=20|
|?length=[max characters]||Lets you put a maximum on the amount of characters quotes are allowed to have.||?length=10|
|?imgur=[true/false]||Decides whether an imgur URL is necessary for a quote to appear. By default: true.||?imgur=false|
If you use an argument, the default setting is to show all of the quotes assiociated with that(/those) argument(s). This can be limited with &limit=.
I would love to see what you made with this API! There are several ways to get your project noticed:
BarfAndBel.ch is currently hosted on a free hosting provider called Hostinger. It's completely free, 100GB bandwidth, 2GB space, PHP and MySQL included web hosting. And yes, BarfAndBel.ch is hosted on there with a premium account. To keep this premium account, referrals are needed to renew the subscription. By signing up via this URL, you'll help BarfAndBel.ch being hosted, and get a free hosting space for your project.