Giter VIP home page Giter VIP logo

valorant.api's Introduction

Valorant.API - [OBSOLETE] - New project here

This .dll provides all the request that you need to retrieve data from Valorant

How to use

To make any request, you need to create a ValorantClient object with HttpClient session. clientVersion parameter at the moment you can select one from this Link

HttpClient session = new HttpClient();
var valorantClient = new ValorantClient(session, clientVersion);

When you create the valorantClient, you are enable to make the first request to retrieve the Bearer Token

UserParametersDTO userParameter = valorantClient.GetUserParameters();

Inside userParameters you can find a sub-properties called uri that contain the Bearer Token (access_token)

"uri": "https://beta.playvalorant.com/opt_in#access_token=herethereisthetoken&scope=openid&id_token=herethereistheidtoken&token_type=Bearer&expires_in=3600"

Once you saved the BearerToken, you need to add to session as header and re-create the ValorantClient

session.DefaultRequestHeaders.Add("Authorization", "Bearer " + BearerToken);
var valorantClient = new ValorantClient(session, clientVersion);

Now you can request the EntitlementsToken

string EntitlementsToken = valorantClient.GetEntitlementsToken();

Add also EntitlementsToken to session as header and re-create the ValorantClient

session.DefaultRequestHeaders.Add("X-Riot-Entitlements-JWT", EntitlementsToken);
var valorantClient = new ValorantClient(session, clientVersion);

Now you are ready to make all the other request!

Request Available

  • GetUserParameters
  • GetEntitlementsToken
  • GetPlayer
  • GetMatches
  • GetBalance
  • GetCompetitiveMatch
  • GetPlayerMMR
  • GetPlayerStore
  • GetStoryContract
  • GetIDList

Request to be provide by Riot

  • Player Inventory
  • Match Info

All these requests are documentated by @RumbleMike on this Link

valorant.api's People

Contributors

teo230 avatar

Watchers

 avatar

valorant.api's Issues

Endpoint for PlayerMMR is invalid

Looks like API endpoint for PlayerMMR is the same as for CompetitiveMatch.

The endpoint mmr/v1/players/{playerId}/competitiveupdates is working for CompetetiveMatch, but PlayerMMR DTO does not fit to returned json data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.