47 lines
3.1 KiB
HTML
47 lines
3.1 KiB
HTML
|
<html>
|
||
|
<head>
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<link rel="stylesheet" href="github-markdown.css">
|
||
|
</head>
|
||
|
<body class="markdown-body">
|
||
|
<style>
|
||
|
.markdown-body {
|
||
|
box-sizing: border-box;
|
||
|
min-width: 200px;
|
||
|
max-width: 980px;
|
||
|
margin: 0 auto;
|
||
|
padding: 45px;
|
||
|
}
|
||
|
|
||
|
@media (max-width: 767px) {
|
||
|
.markdown-body {
|
||
|
padding: 15px;
|
||
|
}
|
||
|
}
|
||
|
</style>
|
||
|
<div class="markdown-heading"><h1 class="heading-element">Leaderboard</h1><a id="user-content-leaderboard" class="anchor" aria-label="Permalink: Leaderboard" href="#leaderboard"><span aria-hidden="true" class="octicon octicon-link"></span></a></div>
|
||
|
<p>This API endpoint retrieves the highest test data from each user and returns it as a JSON array.</p>
|
||
|
<div class="markdown-heading"><h2 class="heading-element">Endpoint</h2><a id="user-content-endpoint" class="anchor" aria-label="Permalink: Endpoint" href="#endpoint"><span aria-hidden="true" class="octicon octicon-link"></span></a></div>
|
||
|
<pre><code>GET /api/leaderboard
|
||
|
</code></pre>
|
||
|
<div class="markdown-heading"><h2 class="heading-element">Request Parameters</h2><a id="user-content-request-parameters" class="anchor" aria-label="Permalink: Request Parameters" href="#request-parameters"><span aria-hidden="true" class="octicon octicon-link"></span></a></div>
|
||
|
<p>This endpoint does not require any request parameters.</p>
|
||
|
<div class="markdown-heading"><h2 class="heading-element">Example Request</h2><a id="user-content-example-request" class="anchor" aria-label="Permalink: Example Request" href="#example-request"><span aria-hidden="true" class="octicon octicon-link"></span></a></div>
|
||
|
<div class="highlight highlight-source-shell"><pre>curl -X GET <span class="pl-s"><span class="pl-pds">"</span>https://example.com/api/leaderboard<span class="pl-pds">"</span></span></pre></div>
|
||
|
<div class="markdown-heading"><h2 class="heading-element">Response</h2><a id="user-content-response" class="anchor" aria-label="Permalink: Response" href="#response"><span aria-hidden="true" class="octicon octicon-link"></span></a></div>
|
||
|
<div class="highlight highlight-source-json"><pre>[
|
||
|
{
|
||
|
<span class="pl-ent">"userName"</span>: <span class="pl-s"><span class="pl-pds">"</span>user_1<span class="pl-pds">"</span></span>,
|
||
|
<span class="pl-ent">"wpm"</span>: <span class="pl-c1">85</span>,
|
||
|
},
|
||
|
{
|
||
|
<span class="pl-ent">"userName"</span>: <span class="pl-s"><span class="pl-pds">"</span>user_2<span class="pl-pds">"</span></span>,
|
||
|
<span class="pl-ent">"score"</span>: <span class="pl-c1">80</span>,
|
||
|
},
|
||
|
{
|
||
|
<span class="pl-ent">"userName"</span>: <span class="pl-s"><span class="pl-pds">"</span>user_3<span class="pl-pds">"</span></span>,
|
||
|
<span class="pl-ent">"wpm"</span>: <span class="pl-c1">73</span>,
|
||
|
}
|
||
|
]</pre></div>
|
||
|
</body>
|
||
|
</html>
|