1
0
mirror of https://gitlab.com/2-chainz/2-chainz-rest-site.git synced 2025-06-16 07:06:51 +00:00

added more detailed usage instructions

This commit is contained in:
Anson 2020-04-23 22:26:45 -07:00
parent b79d8a71e6
commit b5676962d4

View File

@ -105,35 +105,63 @@
<h2>Usage</h2> <h2>Usage</h2>
</header> </header>
<details open> <details open>
<summary>Getting Quotes</summary> <summary>Quote</summary>
<p> <p>
The <code>quotes</code> endpoint can be accessed here: Returns a random 2 Chainz Quote in <code>json</code> format like the
<code following example:
><a href="https://api.chainz.rest/quote"
>https://api.chainz.rest/quote</a
></code
>
</p> </p>
<p>
This endpoint returns a 2 Chainz quote, and can optionally take the <p>send a <code>get</code> request to <code></code></p>
<code>batch</code> parameter which allows requesting more than one
quote at a time. <pre><code>{
</p></details "quote": "I got a pocket full of money, it got me walking all slew-foot"
> }</code></pre>
<details style="margin-left: 5%;">
<summary>Parameters</summary>
<p>
This endpoint also supports an optional <code>batch</code> parameter
to get more than one quote per request. Maximum quotes that the
endpoint will return is the amount of quotes in
<a
href="https://gitlab.com/2-chainz/2-chainz-rest/-/blob/master/quote/quotes.py"
>quotes.py</a
>
and is subject to change. An example return from
<a href="https://api.chainz.rest/quote?batch=2"
>https://api.chainz.rest/quote?batch=2</a
>:
</p>
<pre><code class="json">{
&emsp;&emsp;"quotes": [
&emsp;&emsp;&emsp;&emsp;"I'm in the kitchen. Yams errrrrwhere.",
&emsp;&emsp;&emsp;&emsp;"Started from the trap, now I rap"
&emsp;&emsp;]
}</code></pre>
</details>
</details>
<details <details
><summary>Aliases</summary> ><summary>Alias</summary>
<p> <p>
2 Chainz has gone by many different names throughout his career and Returns a random 2 Chainz alias in <code>json</code> format. The
this endpoint lets you request a random <code>alias</code> that Tity return values are weighted and a full list can be seen in
Boi has used over the years. Can be accessed here: <a
<code href="https://gitlab.com/2-chainz/2-chainz-rest/-/blob/master/alias/aliases.py"
><a href="https://api.chainz.rest/alias" >aliases.py</a
>https://api.chainz.rest/alias</a >.
></code </p>
> <p>
</p></details send a <code>get</code> request to
> <code>https://api.chainz.rest/alias</code>
</p>
<pre><code>{
"alias": "Dos Cadenas"
}</code></pre>
</details>
<hr /> <hr />
<section> <section>
<header> <header>