{
plyrIds: string[]; // Array of player unique identifiers
}
{
[plyrId: string]: string; // Map of plyrId to avatarUrl
}
const timestamp = Date.now().toString();
const body = {
plyrIds: ['player123', 'player456', 'player789'] // Array of PLYR IDs
};
const hmac = generateHmacSignature(timestamp, body, secretKey);
const response = await axios.post(apiEndpoint + '/user/avatar', body, {
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
// Response will contain avatar URLs for each PLYR ID
const { avatars } = response.data;
// Process avatar URLs
Object.entries(avatars).forEach(([plyrId, avatarUrl]) => {
console.log(`Avatar URL for ${plyrId}:`, avatarUrl);
// Use avatarUrl in your application (e.g., display avatar image)
});