PublicAPI
PublicAPI copied to clipboard
stats.SkyBlock.account.selected_profile does not exist
Recently I opened an issue about adding a selected_profile entry under the player endpoint, and received this response "It's available in stats.SkyBlock.account.selected_profile".
stats.SkyBlock.account.selected_profile does not exist.
Reference of #235.
let options = {
hostname: 'api.hypixel.net',
path: `/skyblock/profiles?uuid=${UUID}`,
method: 'GET',
headers: { 'API-Key': config.hypixelKey }
};
let req = https.request(options, (res) => {
let data = ''
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
let json = JSON.parse(data)
fs.writeFile('out.json', JSON.stringify(json), function (err) {
if (err) return console.log(err);
});
json.profiles.forEach(profile => {
if (profile.selected) {
profileId = profile.profile_id;
console.log(`Profile Found: ${profile.cute_name}:${profileId}`);
}
})
});
}).end();
This worked for me
Closing this issue as we did add the selected boolean to the profiles endpoint to provide this information