Class: SportsOddsAPI::Resources::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/sports_odds_api/resources/account.rb,
sig/sports_odds_api/resources/account.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Account

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Account.

Parameters:



28
29
30
# File 'lib/sports_odds_api/resources/account.rb', line 28

def initialize(client:)
  @client = client
end

Instance Method Details

#get_usage(request_options: {}) ⇒ SportsOddsAPI::Models::AccountUsage

Get rate-limits and usage data about your API key

Parameters:

Returns:

See Also:



15
16
17
18
19
20
21
22
23
# File 'lib/sports_odds_api/resources/account.rb', line 15

def get_usage(params = {})
  @client.request(
    method: :get,
    path: "account/usage",
    unwrap: :data,
    model: SportsOddsAPI::AccountUsage,
    options: params[:request_options]
  )
end