Warzone custom API command

:warning: The API blocked requests from Nightbot, the command is dead. :warning:

Hey @Rapo84!

Sure!

Go there and look for your profile, make sure you selected the right platform.
Once you found it, your URL will look like this:

https://cod.tracker.gg/warzone/profile/PLATFORM/USERNAME/overview

In the command replace the PLATFORM and USERNAME value by yours according to the link above:

$(eval s=$(urlfetch json https://api.tracker.gg/api/v2/warzone/standard/profile/PLATFORM/USERNAME/).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}`)

If you want the warzone lifetime overview data of your profile keep using segments[0], if you want only the battle royale data use segments[1], and if you want only the DMZ/Plunder data use segments[2].

You might need to change more things than that later in the code if you want to access new/different data, use VARIABLE=s.FIELD_NAME.value, give VARIABLE a fitting name and replace FIELD_NAME by an existing one.
Here’s a link that’ll help format the JSON in a readable way, that’ll help to look for the available FIELD_NAMES, the link to use is the one in the $(urlfetch) variable after editing it to get your data.

After that you’re good to go!

If you experience any issue, before making a new post, make sure your profile is public, not private.