📡 API Status - Documentation

Retrieve the bot's status and real-time information.

📌 Available Information

Info Description
username The bot's username
id The bot's id
status The bot's status (online or offline)
friends Array of bot's friends
party Party status
matchmaking Matchmaking status
timestamp Last update timestamp (in ms)

âš¡ Usage Examples (Using node-fetch)

🔹 GET Request (Retrieve Bot Status)


async function getUserStatus(username) {
    const response = await fetch(`https://darkdus.vercel.app/api/status?username=${encodeURIComponent(username)}`, {
        method: 'GET',
    });

    const data = await response.json();
    console.log(data);
}

getUserStatus('testUsername');
        

🔹 POST Request (Add or Update Bot Status)


async function addOrUpdateBot() {
    const response = await fetch('https://darkdus.vercel.app/api/status', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
            key: 'secretKey123',
            username: 'player1',
            id: 'user123',
            status: 'online',
            friends: ['player2', 'player3'],
            party: 'party123',
            matchmaking: 'queued',
            timestamp: Date.now(),
        }),
    });

    const data = await response.json();
    console.log(data);
}

addOrUpdateBot();
        

🔹 DELETE Request (Delete Bot Status)


async function deleteBot(username) {
    const response = await fetch('https://darkdus.vercel.app/api/status', {
        method: 'DELETE',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ key: 'secretKey123', username }),
    });

    const data = await response.json();
    console.log(data);
}

deleteBot('player1');