API Documentation: Quote API

To use the quote API, send a GET request to https://mateishome.page/api/getMHPQuote.php.

Usage

There is one optional paramater than can be passed to the API named type. This can be set to either nothing, plaintext, json, or complete. If type is set to nothing or plaintext, it will return only the quote with no quotation marks around it. If type is set to json, it will return the quote and the date in JSON format. If type is set to complete, it will return the date and the quote.

Examples

All examples are written in the best language ever, PHP.

// Method 1: Get a quote in plaintext
echo file_get_contents("https://mateishome.page/api/getMHPQuote.php"); // Will return something like `i use arch btw`

// Method 2: Get a quote in JSON format
$MHPQuote = json_decode(file_get_contents("https://mateishome.page/api/getMHPQuote.php?type=json"));
echo 'The quote at MateisHomePage on ' . $MHPQuote->date . ' is: ' . $MHPQuote->quote; // Will return something like `The quote at MateisHomePage on January 56th, 1984 is: i use arch btw`

// Method 3: Get a complete quote
echo file_get_contents("https://mateishome.page/api/getMHPQuote.php?type=complete"); // Will return something like `January 56th, 1984's quote is: 'i use arch btw'`