68 lines
2.0 KiB
HTML
68 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>COVID19 API - Docs</title>
|
|
<link rel="stylesheet" href="styles.css" />
|
|
</head>
|
|
<body>
|
|
<section class="container">
|
|
<header>
|
|
<h1>COVID19 API v1 Documentation</h1>
|
|
</header>
|
|
<p class="description">
|
|
This is the COVID19 API, which
|
|
<span class="bold"
|
|
>utilizes the third-party API from
|
|
<a href="https://www.tianapi.com" target="_blank">TianAPI</a>,
|
|
<a href="https://www.wapi.cn" target="_blank">WAPI</a>, and <a href="https://www.juhe.cn/">Juhe</a></span
|
|
>
|
|
</p>
|
|
<h4>Important details:</h4>
|
|
<ul>
|
|
<li>No need to use CORS proxy or API key</li>
|
|
<li>Only GET requests are allowed</li>
|
|
<li>No need to fetch the data by typing different endpoints, instead, nodeScheduler will do it.</li>
|
|
</ul>
|
|
|
|
<section class="divider"></section>
|
|
|
|
<h2>GET</h2>
|
|
<p class="description">Returns the data from a specific endpoints</p>
|
|
<p>Path: <code>https://covid-19-api-server.herokuapp.com</code></p>
|
|
<h3>Routes</h3>
|
|
<table>
|
|
<tr>
|
|
<th>Path</th>
|
|
<th>Required</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
<tr>
|
|
<td>/api</td>
|
|
<td>Yes</td>
|
|
<td>Fetches China Data from Tianapi</td>
|
|
</tr>
|
|
<tr>
|
|
<td>/api/abroad</td>
|
|
<td>Yes</td>
|
|
<td>Fetches World Data from Tianapi</td>
|
|
</tr>
|
|
<tr>
|
|
<td>/api/china</td>
|
|
<td>Yes</td>
|
|
<td>Fetches China Data from Wapi endpoint</td>
|
|
</tr>
|
|
<tr>
|
|
<td>/api/world</td>
|
|
<td>Yes</td>
|
|
<td>Fetches World Data from Wapi endpoint</td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
Example URL: <code>https://covid-19-api-server.herokuapp.com/api</code>
|
|
</p>
|
|
</section>
|
|
</body>
|
|
</html> |