Class: Limiter::Points
Constant Summary
Constants inherited from Client
Instance Attribute Summary
Attributes inherited from Client
#identifier, #limit, #namespace, #period, #token
Instance Method Summary collapse
Methods inherited from Client
#check, #formatted_period, #initialize, #request
Constructor Details
This class inherits a constructor from Limiter::Client
Instance Method Details
#url ⇒ Object
6 7 8 |
# File 'lib/limiter/points.rb', line 6 def url "#{BASE_DOMAIN}/points/#{namespace}/#{limit}/#{formatted_period}/#{identifier}" end |
#used(points) ⇒ Object
10 11 12 |
# File 'lib/limiter/points.rb', line 10 def used(points) RateLimitResponse.new(request({ used: points.to_i })) end |