-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS4 characters aren't returning proper ASP levels #299
Comments
I check for PS4 ASP in Auraxis Bot w/ the code below. This has the drawback of being rather slow, and not working on NSO (the item_full resolve is broken for them). It could also be checked by testing if (BR <= 100 && score > 19812398), which is the score needed for BR 101 before any boosts. This however may not be fully accurate due to boosts and any characters that got to BR 100 before BR 120 was introduced. const checkASP = async function(cName, platform){
let uri = 'https://census.daybreakgames.com/s:'+process.env.serviceID+'/get/'+platform+'/character?name.first_lower='+cName+'&c:resolve=item_full&c:lang=en';
let response = "";
try{
response = await got(uri).json();
}
catch(err){
if(err.message.indexOf('404') > -1){
return new Promise(function(resolve, reject){
reject("API Unreachable");
})
}
}
// Error handling removed for readability
let data = response.character_list[0];
let aspTitle = false;
for (x in data.items){
if(Number(data.items[x].item_id) == 6004399){
aspTitle = true;
break;
}
}
return new Promise(function(resolve, reject){
resolve(aspTitle);
})
} |
@microwavekonijn do you know if you fixed this upstream? |
No, decided not to go down that rabbit hole. Data returned will be unprocessed and not wrapped. I am working on an wrapper api though which intends to fix these kind of things. |
Good news, thanks! |
@ryanjsims isn't this effectively closed with your ASP changes? |
There's a bug in the PS4 API which doesn't return the ASP flag.
@RemainNA cites:
The text was updated successfully, but these errors were encountered: