Module: Steam::Helpers

Defined in:
lib/steam-api/helpers.rb

Overview

Helper Module

Constant Summary collapse

STORE_API_BASE_URL =
'https://store.steampowered.com/api'

Instance Method Summary collapse

Instance Method Details

#build_client(api, base_url: 'https://api.steampowered.com') ⇒ Steam::Client

Conveniance method to build clients

Parameters:

  • api (String)

    The endpoint of the API

  • base_url (String) (defaults to: 'https://api.steampowered.com')

    the root uri for steam’s API

Returns:



8
9
10
# File 'lib/steam-api/helpers.rb', line 8

def build_client(api, base_url: 'https://api.steampowered.com')
  Steam::Client.new([base_url, api].join('/'))
end