ExValorantAPIClient v0.1.0 ExValorantAPIClient View Source

This module is Valorant API wrapper public interface.

Since the API is not yet available to the public, I have not confirmed that this module works properly.

Link to this section Summary

Link to this section Functions

Link to this function

get_account_by_puuid(client, puuid, opts \\ [])

View Source (since 0.1.0)

Specs

get_account_by_puuid(Tesla.Client.t(), String.t(), keyword()) ::
  Tesla.Env.result()

Get Account data by puuid.

Options

  • region - Change region.

Example

ExValorantAPIClient.get_account_by_puuid(client, "your_puuid")
Link to this function

get_account_by_riot_id(client, game_name, tag_line, opts \\ [])

View Source (since 0.1.0)

Get Account data by game_name and tag_line.

Options

  • region - Change region.

Example

# ExValorantAPIClient.get_account_by_riot_id(client, "your_game_name", "your_tag_line")
umm...
Link to this function

get_active_shards_for_a_player(client, game, puuid, opts \\ [])

View Source (since 0.1.0)

Get active shard for a player.(???)

Options

  • region - Change region.

Example

ExValorantAPIClient.get_active_shards_for_a_player(client, "val or lor", "your_puuid")

Link to this function

get_content_optionally_filtered_by_locale(client, opts \\ [])

View Source (since 0.1.0)

Specs

get_content_optionally_filtered_by_locale(Tesla.Client.t(), keyword()) ::
  Tesla.Env.result()

Get content optionally filtered by locale.

Options

  • region - Change region.

Example

ExValorantAPIClient.get_content_optionally_filtered_by_locale(client)

Link to this function

get_match_by_id(client, match_id, opts \\ [])

View Source (since 0.1.0)

Specs

get_match_by_id(Tesla.Client.t(), String.t(), keyword()) :: Tesla.Env.result()

Get match by id.

Options

  • region - Change region.

Example

ExValorantAPIClient.get_match_by_id(client, "match_id")

Link to this function

get_matchlist_for_games_played_by_puuid(client, puuid, opts \\ [])

View Source (since 0.1.0)

Specs

get_matchlist_for_games_played_by_puuid(Tesla.Client.t(), String.t(), keyword()) ::
  Tesla.Env.result()

Get metchlist for games played by puuid

Options

  • region - Change region.

Example

ExValorantAPIClient.get_matchlist_for_games_played_by_puuid(client, "your_puuid")

Link to this function

new(api_key, opts \\ [])

View Source (since 0.1.0)

Create api client.

Examples

iex> client = ExValorantAPIClient("your_api_key")
%Tesla.Client{
  adapter: nil,
  fun: nil,
  post: [],
  pre: [
    {Tesla.Middleware.DecompressResponse, :call, [[]]},
    {Tesla.Middleware.JSON, :call, [[engine: Jason]]},
    {Tesla.Middleware.BaseUrl, :call, ["https://americas.api.riotgames.com"]},
    {Tesla.Middleware.Headers, :call, [[{"X-Riot-Token", "your_api_key"}]]}
  ]
}

This method sets the americas region by default. If you want to chang default region, please set opts.

client = ExValorantAPIClient.new("your_api_key", default_region: "asia") # or europe
%Tesla.Client{
  adapter: nil,
  fun: nil,
  post: [],
  pre: [
    {Tesla.Middleware.DecompressResponse, :call, [[]]},
    {Tesla.Middleware.JSON, :call, [[engine: Jason]]},
    {Tesla.Middleware.BaseUrl, :call, ["https://asia.api.riotgames.com"]},
    {Tesla.Middleware.Headers, :call, [[{"X-Riot-Token", "your_api_key"}]]}
  ]
}