Add api and usage page
This commit is contained in:
36
api-usage.html
Normal file
36
api-usage.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>API Usage</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="api-container">
|
||||
<h2>API Usage</h2>
|
||||
<div class="text">
|
||||
|
||||
<p>Parameters</p>
|
||||
<ol>
|
||||
<li>Binary: <code>binary</code></li>
|
||||
<li>Decimal: <code>decimal</code></li>
|
||||
<li>Hexadecimal: <code>hexadecimal</code></li>
|
||||
</ol>
|
||||
|
||||
<p>Usage and Response</p>
|
||||
<ol class="no-dots">
|
||||
<li>GET request to <code>https://dev.nevets.tech/calculator/hexdecbin/api.php?(parameter)=(value)</code></li>
|
||||
<li>API responds with a json string similar to below</li>
|
||||
<pre>
|
||||
{
|
||||
"binary":1101011,
|
||||
"decimal":107,
|
||||
"hexadecimal":"6B"
|
||||
}
|
||||
</pre>
|
||||
<li><b>Reminder: </b>Only use one parameter, more than one will return a 422 error!</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user