12 lines
376 B
Elixir
12 lines
376 B
Elixir
defmodule SteamApi do
|
|
@moduledoc """
|
|
Documentation for `SteamApi`.
|
|
"""
|
|
|
|
def get_games(steam_id) do
|
|
# TODO: Add case statement to check for nil
|
|
steam_api_key = System.get_env("STEAM_API_KEY")
|
|
Req.get!("http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=#{steam_api_key}&steamid=#{steam_id}&format=json").body["response"]["games"]
|
|
end
|
|
end
|