Sha256: dd9f0d6dc144290db8f38efa7cf540dfd8a16900dfe195af884a13bdab8ffa10
Contents?: true
Size: 463 Bytes
Versions: 3
Compression:
Stored size: 463 Bytes
Contents
# frozen_string_literal: true module Vindi class RateLimitError < StandardError; end # Vindi API calls has a rate limit. class RateLimit class << self attr_accessor :rate_limit_limit, :rate_limit_remaining, :rate_limit_reset def update(rate = {}) @rate_limit_limit = rate[:limit].to_i @rate_limit_remaining = rate[:remaining].to_i @rate_limit_reset = Time.at(rate[:reset].to_i) end end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
rvindi-0.0.3 | lib/vindi/rate_limit.rb |
vindi-hermes-0.0.2 | lib/vindi/rate_limit.rb |
vindi-hermes-0.0.1 | lib/vindi/rate_limit.rb |