I've noticed a lot of streamers having a "!rank" command and it will bring up their current position on the leaderboards and their current RR like this "X is #11 on the leaderboard with 92 wins and a ranked rating of 765" but when I check out their command it just says "/me eval". Anyone know how I can get this?
Valorant ranked command?
4 replies
EDIT: as we found out in this post, getting your rank with Valorant's API isn't possible for now.
Thanks to @member for taking the time to look for it with me, something I hoped to do in this post at the time.
Hey @Purple Chipmunk!
If you see eval it means that they're using the $(eval) variable. /me is a Twitch command.
If you go to Riot's Developer Portal, you can find their API, this is the API endpoint to get the data you're looking for.
As you may see, you need the actId, to get such value, you need to use this other API endpoint.
This isn't something I can do for you, you'll need to log in and create a developer account, get your actId and use it.
After that, put the link in the first API endpoint inside a $(urlfetch), this should give you a JSON as output, and from there you will be able to build the response with an $(eval).
It’ll look like this:
$(eval a=$(urlfetch json Link);`Response here with stats ${a.stats}`)
Here’s an example of json and how to retrieve a specific data point
{"Reward":1,"Points":[24,0,0],"CooldownPeriod":[0,0,0],"Moderators":["PotatoEaterLove","The_Pinata"],"Gambling":"On","BlackJack":"On","Pokémon":"On","Shop":{"Status":"On","Items":{"ItemA":{"ItemID":"AAA","Name":"ItemA","Price":100,"BuyLimit":0,"Description":"ItemA Description"},"ItemB":{"ItemID":"AAB","Name":"ItemB","Price":250,"BuyLimit":3,"Description":"ItemB Description"},"ItemC":{"ItemID":"AAC","Name":"ItemC","Price":500,"BuyLimit":1,"Description":"ItemC Description"},"ItemD":{"ItemID":"AAD","Name":"ItemD","Price":10,"BuyLimit":0,"Description":"ItemD Description"}}}}
Let’s say I want the description of item B in the shop I would type
${Settings.Shop.Items.ItemB.Description}
This would return “ItemB Description"