AudioDownloadAPI/static/index.html
Christopher Cookman c5421e76f2
Update index.html to look good
Add rate limit of 25 per minute
Add codes.json with all status codes :)
2024-09-04 23:57:26 -06:00

176 lines
3.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Roblox Audio Asset API Documentation</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #222;
color: #fff;
}
h1 {
color: #fff;
}
pre {
background-color: #333;
color: #fff;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
}
.container {
max-width: 800px;
margin: 0 auto;
background-color: #333;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
a {
color: #00c3ca;
text-decoration: underline;
}
</style>
</head>
</head>
<body>
<div class="container">
<h1>Roblox Audio Asset API Documentation</h1>
<h2>Endpoint</h2>
<p><strong>URL:</strong> <code>POST /</code></p>
<h2>Request Format</h2>
<p>The request must be sent as JSON with the following format:</p>
<pre>
{
"type": "batching",
"data": [
"assetId1",
"assetId2",
...
],
"cookie": "optional-roblosecurity-cookie"
}
</pre>
<p><strong>Parameters:</strong></p>
<ul>
<li><code>type</code>: The type of the request. Must be <code>"batching"</code>.</li>
<li><code>data</code>: An array of asset IDs that you want to request.</li>
<li><code>cookie</code>: Optional. A <code>.ROBLOSECURITY</code> cookie. If not provided, you will only be
able to access public assets. The cookie is used once to make the request to Roblox servers and is then
discarded permanently.
You can find more information on obtaining your cookie <a
href="https://noblox.js.org/tutorial-VPS%20Authentication.html">here!</a></li>
</ul>
<h2>Rate Limit</h2>
<p>There is a limit of 25 requests per minute. If this limit is exceeded, the following error will be returned:
</p>
<pre>
{
"code": 429,
"error": "Rate limit exceeded",
"status": "error"
}
</pre>
<h2>Response Format</h2>
<p>The response will be in JSON format:</p>
<pre>
<pre>
{
"type": "batching-response",
"data": {
"assetId1": {
"status": "success",
"url": "location_of_asset",
},
"assetId2": {
"status": "failure",
"code": error_code,
"message": "error_message",
"additional": "additional_information"
}
}
}
</pre>
</pre>
<p><strong>Fields:</strong></p>
<ul>
<li><code>type</code>: Always <code>"batching-response"</code>.</li>
<li><code>data</code>: An object where each key is an asset ID and the value contains the result of the
request.</li>
<li><code>status</code>: Either <code>"success"</code> or <code>"failure"</code>.</li>
<li><code>url</code>: The location of the asset if the request was successful, or an empty string if it
failed.</li>
<li><code>additional</code>: Any additional information, such as error messages.</li>
</ul>
<h2>Example Request</h2>
<pre>
POST /
Content-Type: application/json
{
"type": "batching",
"data": [
"1837070127",
"1842241530",
"1838857104",
"123412341234",
"114870793726467"
]
}
</pre>
<h2>Example Response</h2>
<pre>
{
"type": "batching-response",
"data": {
"1837070127": {
"status": "success",
"url": "https://c6.rbxcdn.com/bfe94941622e26b7a7553ebd31cdbbd4"
},
"1838857104": {
"status": "success",
"url": "https://c4.rbxcdn.com/fa7eef8201e25978df17cccc955849b8"
},
"1842241530": {
"status": "success",
"url": "https://c1.rbxcdn.com/d12b63528d0039017313f0ee8eeb2f88"
},
"123412341234": {
"status": "failure",
"code": 404,
"message": "Not Found",
"additional": "The requested page could not be found but may be available again in the future."
},
"114870793726467": {
"status": "failure",
"code": 403,
"message": "Forbidden",
"additional": "The request was a legal request, but the server is refusing to respond to it."
}
}
}
</pre>
</div>
</body>
</html>