get_shard_from_puuid: Recover the activeShard from a PUUID

View source: R/get_shard_from_puuid.R

get_shard_from_puuidR Documentation

Recover the activeShard from a PUUID

Description

Given the primary key, a PUUID, return the Server of reference of a player and game associated. Wraps the GET_getActiveShard api method.

Usage

get_shard_from_puuid(
  puuid,
  server = "americas",
  format = "parsed",
  verbose = T,
  ...
)

Arguments

puuid

a character, string for PUUID, a string of 42char like RGAPI-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

server

a character, must be one of americas,europe,sea or asia,apac

format

format of the output: parsed - as a vector of only the puuid long - as a tibble with all the elements from the GET request, named column puuid,game,activeShard text - as the original json from the API request#'

verbose

should be function be verbose and print messages

...

additional paramter for RETRY function, at the moment are timeout, times, pause_base, pause_cap, pause_min,

Details

Standard RATE LIMITS 20 requests every 1 seconds(s) / 100 requests every 2 minutes(s) - Developer Key 500 requests every 10 seconds / 30,000 requests every 10 minutes - Production Key

Method RATE LIMITS 1000 requests every 1 minutes - Developer Key 1000 requests every 1 minutes - Production Key

Value

depending on the format chosen return the information for the RiotID. When encountering a status code different from 200 the output is NA the game value should be "lor" the activeShard should be one of "americas", "asia", "europe", "sea"

Examples


## Not run: 
puuid <- "kJKtE_3i_66edP3lUYSW3wOVxIl5sRKFhsF6IpNIX_RQxYmyBZxG94gNuR4dUe-ofBq_zy5Yll_gSw"
get_shard_from_puuid(puuid)
get_shard_from_puuid(puuid, format="long")
get_shard_from_puuid(puuid, format="text")

badPuuid <- "kJKtE_3i_66edP3lUYSW3wOVxIl5sRKFhsF6IpNIX_RQxYmyBZxG94gNuR4dUe-ofBq_zy5Yll_gST"
get_shard_from_puuid(badPuuid) # should return a warning

## End(Not run)

MaouLegna/lorR documentation built on Nov. 21, 2022, 8:58 a.m.