From 28c2f3712275eb001cb8ead465795aa6a595ad2f Mon Sep 17 00:00:00 2001 From: Massimiliano Marcon Date: Wed, 8 Feb 2023 13:56:19 +0100 Subject: [PATCH] Refactored API playground Makes endpoint parameters easier to read and makes it easier to add new endpoints. --- index.html | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index e2de8c2..254162b 100644 --- a/index.html +++ b/index.html @@ -8,14 +8,35 @@
-
+

Welcome to the Quotes APIs!

-

The available resources are:

-
    -
  • /random: returns a random quote.
    Try it!
  • -
  • /search?q=<query>: searches for quotes that matech a certain string (with fuzzy matching).
    Try it!
  • -
-
+

API Resources

+
+

/random

+

+ The /random endpoint returns a random quote from our database. +

+

Parameters

+

This endpoint does not take any parameter.

+

+ Try it! +

+
+
+
+

/search

+

+ The /search endpoint is used to search our database for quotes that match a certain string (with fuzzy matching). +

+

Parameters

+
    +
  • q: the string to search.
  • +
+

+ Try it! +

+
+
\ No newline at end of file