valvex v0.3.1 Valvex

Valvex is a simple wrapper for the Steam ReST Api

Before making calls be sure to initialize the client with your Api key provided by Steam. Check start_link/0 for more details.

Every single one of the user ids specified here are 64-bit Steam ids.

Summary

Functions

Returns achievements of a player specified by user id and game id

Get the api key that you previously set

Returns bans for a given player or list of players specified by user id

Returns the friend list of a given user specified by ID

Returns schema for a given game specified by game id

Return news of a game specified by its ID

Returns Global achievements of a game in percentages

Returns inventory of an specific player

Returns owned games for a user specified by user id

Return basic profile information for a given 64-bit Steam ID

Returns recently played games from an user specified by user id

Returns the original user id of game’s owner if the game that the user is currently played is a shared one

Initializes the client with the api key from your config.exs file

Initialize the client with an api key given directly

Returns stats from a player for a game specified by user id and game id

Functions

achievements(list)

Returns achievements of a player specified by user id and game id.

Example

iex> Valvex.achievements(steam: 123, gameid: 730)
api_key()

Get the api key that you previously set.

bans(ids)

Returns bans for a given player or list of players specified by user id.

Examples

iex> Valvex.bans(123)

iex> Valvex.bans([123, 456, 789])
friend_list(id)

Returns the friend list of a given user specified by ID.

User profile must be set to public.

Example

iex> Valvex.friend_list(123)
game_schema(gameid)

Returns schema for a given game specified by game id.

Example

iex> Valvex.game_schema(730)
get_app_news(list)

Return news of a game specified by its ID.

Example

iex> Valvex.get_app_news(gameid: 730, count: 3, max_length: 100)
global_achievements(id)

Returns Global achievements of a game in percentages.

Example

iex> Valvex.global_achievements(730)
inventory(id, gameid, opts \\ [])

Returns inventory of an specific player.

Options are:

  1. count: Number of items to retrieve from the inventory, maximum is 5000.
  2. lang: Language of the description returned.

Examples

iex> Valvex.inventory(user_id, game_id)

iex> Valvex.inventory(user_id, game_id, count: 500)
owned_games(id)

Returns owned games for a user specified by user id.

Example

iex> Valvex.owned_games(123)
player_summaries(ids)

Return basic profile information for a given 64-bit Steam ID.

Fetch for multiple ids by passing a list.

Examples

iex> Valvex.player_summaries(123)

iex> Valvex.player_summaries([123, 76561198083075294])
recently_played(list)

Returns recently played games from an user specified by user id.

Pass count as a parameter for a maximun of games to return. Usually it’s not much by default.

Examples

iex> Valvex.recently_played(steamid: 123)

iex > Valvex.recently_played(steamid: 123, count: 3)
shared(list)

Returns the original user id of game’s owner if the game that the user is currently played is a shared one.

Pass the id of the user to fetch and the id of the game.

Example

iex> Valvex.shared(steamid: 123, gameid: 730)
start_link()

Initializes the client with the api key from your config.exs file.

Set your token as config :valvex, token: "Your-token" OR export the STEAM_TOKEN variable: export STEAM_TOKEN="your-token".

Example

iex> Valvex.start_link()
start_link(key)

Initialize the client with an api key given directly.

Example

iex> Valvex.start_link("your-token")
user_stats(list)

Returns stats from a player for a game specified by user id and game id.

Example

iex> Valvex.user_stats(steamid: 123, gameid: 730)