List Badges
List badges owned by an address
Endpoint: /game/badge/list
Method: GET
{
plyrId: string; // PLYR[ID]
gameId: string; // Game ID / PLYR[ID] of game
}[
{
gameId: string,
slug: string,
tokenId: string,
plyrId: string,
owner: string,
metaJson: {
name: string,
slug: string,
image: string,
attributes: [
{ trait_type: string, value: string },
]
},
createdAt: string,
}
]{
error: string;
details?: any;
}Example Usage
// Setup request parameters
const timestamp = Date.now().toString();
const params = {
plyrId: 'fennec',
gameId: 'zoono',
};
// Generate HMAC signature
const hmac = generateHmacSignature(timestamp, params, secretKey);
// Make the API request
const response = await axios.get(apiEndpoint + '/game/badge/list', {
params,
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
Last updated