For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Badge Info

Get detailed information about a badge

Retrieves detailed information about a specific badge.

Endpoint: /game/badge/info Method: GET

{
    gameId: string;          // Game ID
    slug?: string            // Optional, specificed a slug
}
[
    {
    gameId: string,
    contractAddress: string,
    name: string,
    description: string,
    slug: string,
    image: string,
    attributes: [ { trait_type: string, value: string } ],
    createdAt: string,
    holders: number,
    count: number
  },
]
{
  error: string;
  details?: any;
}

Example Usage

// Setup request parameters
const timestamp = Date.now().toString();
const params = {
    gameId: 'zoono',
};

// Generate HMAC signature
const hmac = generateHmacSignature(timestamp, params, secretKey);

// Make the API request
const response = await axios.get(apiEndpoint + '/game/badge/info', {
    params,
    headers: {
        apikey: apiKey,
        signature: hmac,
        timestamp: timestamp
    }
});

// Process the response
console.log('Badge Info:', response.data);

Last updated