BuzzAPI is a JavaScript API that simplifies folder management on BuzzHeavier. With BuzzAPI, you can seamlessly create, retrieve, and delete folders directly from your application or script. This README provides full usage details, examples, response structures, and troubleshooting tips.
Created by Its3rr0rsWRLD.
- Create Folder: Quickly create a new folder on BuzzHeavier with a specified name.
- Get Folders: Retrieve a list of your existing folders, including names and IDs.
- Delete Folder: Delete folders by specifying either folder ID or name.
Clone the repository and install dependencies:
git clone https://github.com/Its3rr0rsWRLD/BuzzAPI.git
cd BuzzAPI
npm installEnsure you have:
- Node.js installed for running and testing the API locally.
- API Key (Session Cookie): Required for authenticated access to BuzzHeavier’s API.
-
Create a
.envfile in the root directory and add your session cookie in the following format:API_KEY=your_api_key
-
Verify that your API key (session cookie) has permissions for folder creation, retrieval, and deletion.
To interact with BuzzAPI, use the test.js script, which prompts you to select an action:
node test.jsThe script will guide you to:
- Create Folder: Enter a folder name to create a new folder.
- Get Folders: Retrieve a list of your folders.
- Delete Folder: Delete a folder by specifying either its name or ID.
Here’s a detailed guide to each API endpoint, including example requests, response structures, and error handling.
This endpoint allows you to create a new folder on BuzzHeavier by specifying a folder name.
Example Request with curl:
curl -X POST https://buzz.3rr0r.lol/api/buzzheavier/folder/create \
-H "Content-Type: application/json" \
-H "Cookie: session=YOUR_API_KEY" \
-d '{"name": "New Folder"}'Expected Success Response (201 Created):
{
"message": "Folder created successfully.",
"data": {
"id": "GbgGV7OwoAA",
"name": "New Folder",
"createdAt": "2024-11-03T16:49:57Z"
}
}id: Unique identifier for the folder.name: Name of the newly created folder.createdAt: Timestamp of when the folder was created.
Error Responses:
-
400 Bad Request: Missing or invalid data (e.g., empty folder name).
{ "error": "Folder name is required." } -
401 Unauthorized: Invalid or missing session cookie.
{ "error": "Authentication required." } -
500 Internal Server Error: Unexpected error during creation.
{ "error": "Failed to create folder." }
This endpoint retrieves a list of all folders associated with your account, including folder IDs, names, and creation dates.
Example Request with curl:
curl -X GET https://buzz.3rr0r.lol/api/buzzheavier/getFolders \
-H "Cookie: session=YOUR_API_KEY"Expected Success Response (200 OK):
{
"folders": [
{
"id": "GajgOmgMEAA",
"name": "Other",
"createdAt": "2024-10-22T23:26:13Z"
},
{
"id": "GYsgBUfOgAA",
"name": "SteamDL",
"createdAt": "2024-09-30T03:50:30Z"
},
{
"id": "GbgGV7OwoAA",
"name": "New Folder",
"createdAt": "2024-11-03T16:49:57Z"
}
]
}id: Unique identifier for the folder.name: Name of the folder.createdAt: Timestamp of when the folder was created.
Error Responses:
-
401 Unauthorized: Invalid or missing session cookie.
{ "error": "Authentication required." } -
500 Internal Server Error: Unexpected error retrieving folders.
{ "error": "Failed to retrieve folders." }
This endpoint deletes a folder specified by either its ID or name. If a name is provided, the endpoint will locate the folder’s ID automatically.
Request with Folder ID:
curl -X DELETE https://buzz.3rr0r.lol/api/buzzheavier/folder/delete \
-H "Content-Type: application/json" \
-H "Cookie: session=YOUR_API_KEY" \
-d '{"id": "GbgGV7OwoAA"}'Request with Folder Name:
curl -X DELETE https://buzz.3rr0r.lol/api/buzzheavier/folder/delete \
-H "Content-Type: application/json" \
-H "Cookie: session=YOUR_API_KEY" \
-d '{"name": "New Folder"}'Expected Success Response (200 OK):
{
"message": "Folder deleted successfully."
}Error Responses:
-
400 Bad Request: Missing folder ID or name.
{ "error": "Folder ID or name is required." } -
404 Not Found: Folder name does not match any existing folder.
{ "error": "Folder with name 'NonExistentFolder' not found." } -
500 Internal Server Error: Unexpected error during deletion.
{ "error": "Failed to delete folder." }
- Invalid Session Cookie: Ensure that the
API_KEYin your.envfile is correct and active. Without a valid session cookie, the API will return401 Unauthorized. - Network Errors: If requests fail with network-related errors, verify your internet connection and that BuzzHeavier’s servers are accessible.
- Invalid Folder ID: Double-check folder IDs or names before deletion. Deleting a folder that doesn’t exist will result in a
404 Not Founderror.
Contributions are welcome! Here’s how you can get involved:
- Fork the repository.
- Create a new branch (
feature/new-feature). - Commit your changes.
- Push to your branch.
- Open a pull request.
Please ensure any new code is thoroughly tested.
This project is open-source and available under the MIT License. See the LICENSE file for more information.