Steamex v0.0.7 Steamex.SteamID

Various utility functions related to SteamIDs.

Summary

Functions

Returns the base URL for the given 64-bit community SteamID or custom URL

Converts a 64-bit community SteamID to the legacy SteamID format

Converts a 64-bit community SteamID to the modern SteamID format (aka SteamID 3)

Converts a SteamID as reported by game servers or a SteamID3 to a 64-bit community SteamID

Functions

base_url(community_id_or_custom_url)
base_url(pos_integer | binary) :: binary

Returns the base URL for the given 64-bit community SteamID or custom URL.

Examples

iex> Steamex.SteamID.base_url(76561197961358433)
"http://steamcommunity.com/profiles/76561197961358433"

iex> Steamex.SteamID.base_url("antipax")
"http://steamcommunity.com/id/antipax"
community_id_to_steam_id(community_id)
community_id_to_steam_id(pos_integer) :: binary

Converts a 64-bit community SteamID to the legacy SteamID format.

Examples

iex> Steamex.SteamID.community_id_to_steam_id(76561197961358433)
"STEAM_0:1:546352"
community_id_to_steam_id3(community_id)
community_id_to_steam_id3(pos_integer) :: binary

Converts a 64-bit community SteamID to the modern SteamID format (aka SteamID 3)

Examples

iex> Steamex.SteamID.community_id_to_steam_id3(76561197961358433)
"[U:1:1092705]"
steam_id_to_community_id(steam_id)
steam_id_to_community_id(binary) :: pos_integer

Converts a SteamID as reported by game servers or a SteamID3 to a 64-bit community SteamID.

Examples

iex> Steamex.SteamID.steam_id_to_community_id("STEAM_0:1:546352")
76561197961358433

iex> Steamex.SteamID.steam_id_to_community_id("[U:1:1092705]")
76561197961358433