Class: Renshuu::Profile::APIUsage

Inherits:
Model
  • Object
show all
Defined in:
lib/renshuu/models/profile.rb

Overview

Model class for profile API usage.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#calls_todayInteger (readonly)

Returns:

  • (Integer)


155
# File 'lib/renshuu/models/profile.rb', line 155

attribute :calls_today, Types::Integer

#daily_allowanceInteger (readonly)

Returns:

  • (Integer)


159
# File 'lib/renshuu/models/profile.rb', line 159

attribute :daily_allowance, Types::Integer

Instance Method Details

#remaining_todayInteger

Number of API calls remaining in today’s quota.

Returns:

  • (Integer)


165
166
167
# File 'lib/renshuu/models/profile.rb', line 165

def remaining_today
  daily_allowance - calls_today
end