# Blagues

{% hint style="info" %}
API Base : <https://api.naosandco.me/v1/blague.php>
{% endhint %}

{% hint style="info" %}
Texts in <mark style="color:purple;">**purple**</mark> can be clicked for more information.
{% endhint %}

## The API return 3 JSON datas :&#x20;

* "status" : Le statut de l'API
* "blague" : La blague
* "chute" : La chute de la blague

### INFO : "joke" and "fall" contain the error message if there is one

| Param                                                               | Method                                          | Example                                       |
| ------------------------------------------------------------------- | ----------------------------------------------- | --------------------------------------------- |
| [<mark style="color:purple;">**id**</mark>](#user-content-fn-1)[^1] | <mark style="background-color:blue;">GET</mark> | <https://api.naosandco.me/v1/blague.php?id=1> |

| Code Status | Type   | Definition                                                                                          |
| ----------- | ------ | --------------------------------------------------------------------------------------------------- |
| 200         | String | Status 200 tells you that the desired request was completed without errors.                         |
| 500         | String | Code 500 indicates a server error.                                                                  |
| 503         | String | Status 503 tells you that the site is inaccessible, this may be due to a site downtime for example. |

[^1]: the given parameter must be a number, if the given number is too big or is not valid, a random joke will be returned
