Class: SportsOddsAPI::Resources::Account
- Inherits:
-
Object
- Object
- SportsOddsAPI::Resources::Account
- Defined in:
- lib/sports_odds_api/resources/account.rb,
sig/sports_odds_api/resources/account.rbs
Instance Method Summary collapse
-
#get_usage(request_options: {}) ⇒ SportsOddsAPI::Models::AccountUsage
Get rate-limits and usage data about your API key.
-
#initialize(client:) ⇒ Account
constructor
private
A new instance of Account.
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.
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
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 |