A class library for interacting with the Valorant In Game API in the .NET framework.
Use Nuget to download the package to your project. Make sure to include using ValAPINet;
at the top of your code. The documentation is found in the wiki, but I reccomend using the docsv2 folder in the ValorantClientAPI documentation found at https://github.com/RumbleMike/ValorantClientAPI.
This example gets the rank of the logged in user. This would return Platinum 1.
Auth au = Auth.Login(username, password, Region.NA);
MMR mmr = MMR.GetMMR(au);
Console.WriteLine(Ranks.GetRankFormatted(mmr.Rank));
This code will lock Omen in the user's current game.
Auth au = Auth.Login(username, password, Region.NA);
PregameGetPlayer pregame = PregameGetPlayer.GetPlayer(au);
SelectAgent.LockAgent(au, pregame.MatchID, Agent.Omen);
This code will write the gamename and tag of all of the players in the match.
Auth au = Auth.Login(username, password, Region.NA);
MatchData md = MatchData.GetMatchData(au, matchID);
foreach(MatchData.Player ply in md.players)
{
Console.WriteLine(ply.gameName + "#" + ply.tagLine);
}
This code does the same thing as the code before but doesn't require a password. The game has to be running though.
Auth au = Websocket.GetAuthLocal(Region.NA);
MatchData md = MatchData.GetMatchData(au, matchID);
foreach(MatchData.Player ply in md.players)
{
Console.WriteLine(ply.gameName + "#" + ply.tagLine);
}
If you have anything you want to add, please contribute. Every endpoint makes this project better.
If you need help or want to report bugs, reach out on discord at bigtaco#4761.
This would not be possible without RumbleMike's documentation, find him at @ValorLeaks and @RumbleMikee.
This package is not supported or endorsed by Riot Games. Any use of this package is at your own risk. I take no responsibility over the use of this package. By downloading through Nuget, you agree to these conditions