Closed ShadowFM closed 5 years ago
More than likely call of duty will release some bo4 endpoints and I will be monitoring this. As soon as they are released I will add them to the list!
Would be very cool!
Any news on this?
Any news on this?
I suspect that they will more than likely have something for bo4 shortly after the game's release. As for now, though, I haven't seen anything.
Any news on this?
I suspect that they will more than likely have something for bo4 shortly after the game's release. As for now, though, I haven't seen anything.
Fair enough, thanks for the update!
Yeah I've been keeping an eye on it too. I wish their stuff was more immediate, pretty sure it takes an hour for stats to update or longer. Would love to make stream widgets for things like headshot count or match win counts etc
Found the new endpoint in case anyone is interested. @jakejrichards @gazreyn https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/psn/gamer/Lierrmm/profile/
Found the new endpoint in case anyone is interested. @jakejrichards @gazreyn https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/psn/gamer/Lierrmm/profile/
Awesome! I'll get this in today
Perfect, just an FYI the PC platform attr value is "battle" and not "steam"
Hmm, regarding Battle.net, how do you format the username because username#1234 or username-1234 doesn't work
Nevermind I found it, you need to use %23 - username%231234
Although from what I can see, it's not actually returning any stats
Main problem I have is for instance weirdly formatted numbers: https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/psn/gamer/DooMTheRace/profile/
data->mp->lifetime->all->wins show as 8.3886804E7 And according to others using the API this number should be 781.
So anyone have an idea on how to convert the weird number to the real integer?
Best Regards Joakim
From what I can see it's giving a straight up int - 83886804
Unsure of how it's getting that value and if it could technically be converted some how. Might be a bug on their end? Although if you're saying another API/site is able to get the real value then it's weird
Looks like the decimal point is hex to prevent long int outputs. If you want a real int, just remove anything after the decimal point or convert the decimal point onwards using parseInt
I figured out a better way: wins = totalGamesPlayed - losses - ties Not as straightforward as accessing "wins" immediately. But gives results that don't need conversion.
Looks like the decimal point is hex to prevent long int outputs. If you want a real int, just remove anything after the decimal point or convert the decimal point onwards using parseInt
You don't happen to have a decent example of this based on the number 8.3889234E7? I can't seem to figure it out. The result is expected to be 3154
I was wrong it's a float, use floor to convert it
someone can give me an example of getting the profile on pc of the bo4? , with battle.net username not return any data. Can get with in game-username?
If your battle.net handle was foobar#1234, the following would be the URL you use. However, I don't think they're pulling the data to their API yet, it shows a json structure but has no data.
@jakejrichards I opened up a PR to add Black Ops 4 support. #8
Has anyone figured out how to convert the E numbers to decimal numbers? I've tried almost everything (been going deep on Wolfram Alpha lol), and haven't found any way to convert. Any help here would be much appreciated!
Seems they're finally returning data now for Battle.net, for MP at least. Still no sign of Blackout stats. https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/battle/gamer/gazreyn%232546/profile/
Did anyone get the leadeboards from the bo4?
the E numbers are just exponents most likely, e.g.
the usage of "mEn" would indicate a value of m × 10^n
from https://en.wikipedia.org/wiki/Scientific_notation
still no blackout stats
hi, kinda late, ive been trying to use this API for BO4 for a few days now. i have the validation workin. But im stuck on how to grab certain information from the stats. like, just the value of the kills. im doing this in javascript BTW with node.js. any help would be nice, thanks
@iAmAnoob2020 Could you provide an example from your code?
@jakejrichards this is for a discord bot with node.js. it outputs the entire api response.
request(https://bo4tracker.com/api/stats/bo4/${username}/${plat}
, function(err, response, body){
if(err) console.log(err);
if(body.includes("error")) return message.channel.send(<@${message.author.id}>, the user you have entered does not exist within the database! \n if you are doing this for Battle.net please do <user>%23<digits>
);
results = JSON.stringify(body);
message.channel.send(results);
});
Btw on the profile endpoint - just add ?type=blackout as ex. https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/psn/gamer/DooMTheRace/profile/?type=blackout and you get black out stats (the ones that are available atleast)
Thanks for that @Negativitet
does anyone know the other available ?types that @Negativitet mentioned? I'm trying to find weapon data but having no luck.. the tracker sites seem to have it..
@sdoddler from what I've gathered sofar weapon data will not have it's own ?type= it should be visible under each sub type
so just /profile should have the weapon stats for regular MP - but I also see that warzone (blackout) has been added as map/modes to that, but they contain no data.
Treyarch/Activision is still building on these endpoints, so until the stats actually appear on my.callofduty.com I don't think we can say for sure.
but ?type=blackout gives blackout and ?type=zombies seems to have zombie placeholders, haven't gotten around to check for actual data yet.
@jakejrichards @streamgamelabels How can i get blackout matches data? cod.tracker.gg and callofdutytracker.com get blackout matches data.
i try "https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/battle/gamer/jutes%2311766/matches/days/7/type/blackout" but fail.
@cimpdev it's a parameter so the URL should be https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/battle/gamer/jutes%2311766/matches/days/7?type=blackout
@gazreyn i try your link. but this data mp matches data. i wanna get blackout matches data
@cimpdev there are no matches stored in the API yet for blackout, what I (and cod.tracker and callofdutytracker) does is to simply check the lifetime changes at intervals and store what changed since last update. So if kills increased with 5 since last update, then we store that as a "match that got 5 kills"
@cimpdev Oh in which case use https://my.callofduty.com/api/papi-client/crm/cod/v2/title/bo4/platform/battle/gamer/jutes%2311766/profile?type=blackout
Closing this as I have added -> https://github.com/jakejrichards/cod-api/commit/3644e1698fe3ef6c409e76e62687d1fe13638621
Hi! Is it possible to have also a api call for the stats from bo4 soon?