Steamex.SteamID
Various utility functions related to SteamIDs.
Summary
base_url(community_id_or_custom_url) | Returns the base URL for the given 64-bit community SteamID or custom URL |
community_id_to_steam_id(community_id) | Converts a 64-bit community SteamID to the legacy SteamID format |
community_id_to_steam_id3(community_id) | Converts a 64-bit community SteamID to the modern SteamID format (aka SteamID 3) |
steam_id_to_community_id(steam_id) | Converts a SteamID as reported by game servers or a SteamID3 to a 64-bit community SteamID |
Functions
Specs:
- 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"
Specs:
- 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"
Specs:
- 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]"
Specs:
- 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