Class: Renshuu::Profile::APIUsage
- Defined in:
- lib/renshuu/models/profile.rb
Overview
Model class for profile API usage.
Instance Attribute Summary collapse
- #calls_today ⇒ Integer readonly
- #daily_allowance ⇒ Integer readonly
Instance Method Summary collapse
-
#remaining_today ⇒ Integer
Number of API calls remaining in today’s quota.
Instance Attribute Details
#calls_today ⇒ Integer (readonly)
155 |
# File 'lib/renshuu/models/profile.rb', line 155 attribute :calls_today, Types::Integer |
#daily_allowance ⇒ Integer (readonly)
159 |
# File 'lib/renshuu/models/profile.rb', line 159 attribute :daily_allowance, Types::Integer |
Instance Method Details
#remaining_today ⇒ Integer
Number of API calls remaining in today’s quota.
165 166 167 |
# File 'lib/renshuu/models/profile.rb', line 165 def remaining_today daily_allowance - calls_today end |