/advanced

Complete multiple requests in one!

This endpoint will require a POST request.

This endpoint is only on the BETA Version of the API and may be unstable.

Please report any & all bugs to the Support Server

Endpoint Headers:

  • apikey - Your Api Auth Key [String] (Required)

Endpoint Body Parameters

  • requests - All the requests to complete [Array of Objects] (Required)

Request Object

  • endpoint - Endpoint to request [String] (Required)

  • headers - Headers to send [Object] (Required)

  • body - Body parameters to send [Object] (Optional)

  • method - Method to use in request [String] (Required)

Examples:

Data API version required. Must replace <version> with either release or beta.

Bot Designer for Discord

Example usage of /advanced endpoint using BDFD

$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/advanced;{
  "requests": [
  {
  "endpoint": "/release/encode",
  "headers": {
"apikey":"<YOUR-API-KEY>"
},
    "body": {"text": "test"},
    "method": "POST"
  },
  {
  "endpoint": "/release/user",
  "headers": {
"apikey":"<YOUR-API-KEY>",
    "user-id": "672215920558604332",
    "method": "GET"
}
  
  }
]}]


$httpResult OR $httpResult[details]
Discord.js

Example usage of /advanced endpoint using Discord.js

const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/advanced', 
{
  "requests": [
  {
  "endpoint": "/release/encode",
  "headers": {
"apikey":"<YOUR-API-KEY>"
},
    "body": {"text": "test"},
    "method": "POST"
  },
  {
  "endpoint": "/release/user",
  "headers": {
"apikey":"<YOUR-API-KEY>",
    "user-id": "672215920558604332",
    "method": "GET"
}
  
  }
]}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()

Possible Responses (Codes)

Code 200

API succeeded and details were fetched.

{
    "status": 200,
    "details": [{
        "request": {
            "endpoint": "/release/encode",
            "headers": {
                "apikey": "<YOUR-API-KEY>"
            },
            "body": {
                "text": "test"
            },
            "method": "post"
        },
        "response": "l%0a7o7I%ll%0a22o22U%ll%0a8o8U%ll%0a7o7I%l"
    }, {
        "request": {
            "endpoint": "/release/user",
            "headers": {
                "apikey": "<YOUR-API-KEY>",
                "user-id": "672215920558604332"
            },
            "method": "get"
        },
        "response": {
            "id": "672215920558604332",
            "username": "ricky.js",
            "avatar": "https://cdn.discordapp.com/avatars/672215920558604332/a_ad6aaf5ba45a62c73b9cf9f82f382206.gif",
            "discriminator": "0",
            "public_flags": ["HypeSquadOnlineHouse3", "ActiveDeveloper", "NitroSubscriber"],
            "premium_type": 2,
            "flags": 4194560,
            "banner": "https://cdn.discordapp.com/banners/672215920558604332/a_734707b0151143a8801f2767e1a23ecb.gif",
            "accent_color": 4879576,
            "global_name": "Ricky",
            "avatar_decoration_data": null,
            "banner_color": "4a74d8"
        }
    }]
}
Code 400

An error occurred that stopped execution.

{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}

Last updated