Chemist v0.2.0 Chemist.Util

Summary

Functions

Returns the global url

Returns the base url based on region

Returns platform id based on the region

Handles and transforms response from API

Returns a map with the first key removed to flatten data structure. Return format is {:ok, data}

Returns a map with the first key removed to flatten data structure

Returns the api_key in REST format, set via environmental variable “RIOT_API_KEY”

Verifies the requested options are valid and formats them for REST api

Return true if all keys in check_map exist in the allowed_map

Returns true is the region is valid

Functions

base_url_global()

Returns the global url

base_url_region(region)

Returns the base url based on region

get_platform_id(region)

Returns platform id based on the region

handle_response(arg)

Handles and transforms response from API.

strip_key(map)

Returns a map with the first key removed to flatten data structure. Return format is {:ok, data}

strip_key!(map)

Returns a map with the first key removed to flatten data structure

url_key()

Returns the api_key in REST format, set via environmental variable “RIOT_API_KEY”

url_opts(map, defaults)

Verifies the requested options are valid and formats them for REST api.

valid_keys?(check_map, allowed_map)

Return true if all keys in check_map exist in the allowed_map

valid_region?(region)

Returns true is the region is valid.