Module: Steam::Helpers

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

Instance Method Summary collapse

Instance Method Details

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

Conveniance method to build clients

Parameters:

  • api (String)

    The endpoint of the API

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

    the root uri for steam’s API

Returns:



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

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