Warzone API Stopped Working

Hi All,

I’m new here so sorry if this isn’t the place! I have the below code do display some Warzone KD info which comes from cod.tracker.gg and it’s recently stopped working. I’ve tried to debug it myself but I can’t quite figure out the issue. This is a command i use for Twitch through Nightbot. Any help would be greatly appreciated!

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/atvi/Reaz%7644166/).data.segments[1].stats.data.segments%5B1%5D.stats); r=s.kdRatio.value; k=s.kills.value; d=s.deaths.value; w=s.wins.value; dw=s.downs.value; whp=s.weeklyHeadshotPct.value; wk=s.weeklyKdRatio.displayValue; $(channel) has: Wins: ${w} | Kills: ${k} | Downs: ${dw} | Deaths: ${d} | KD: ${r} | Weekly KD: ${wk} | Weekly Headshot: ${whp}%)

The only thing that changed lately was the username, but all the same publicity settings apply. Thanks again

Hey @LPLPenguin!

Have you changed the username properly? Because the issue isn’t the command, but the API link: it can’t find you.

Hi Emily i tried your code to check my own stats in chat, and it works perfect, but i was wondering how could i use it to find somebody els in game? like for example a suspicious player just killed me and i want to search him up and check player#12345 by typing !check player#12345

Hey @curry4k!

Glad it’s working great for you!

This post should answer your question, let me know if you need further help:

and what would be the command to make atvi the default thing in the command so i dont have to type !stats atvi Curry4k#4888893 and just type !stats Curry4k#4888893

Then you can use a single command, I think this one will do the job properly:

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/atvi/$(querystring)).data.segments[0].stats; r=s.kdRatio.value; k=s.kills.value; d=s.deaths.value; w=s.wins.value; `Wins: ${w} | Kills: ${k} | Deaths: ${d} | Kills/Deaths Ratio: ${r}`)

yes it works thank you so much!!!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.