class TwitterAds::RateLimit

Defined in:

twitter-ads/rate_limit.cr:2
twitter-ads/rate_limit.cr:49

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(state : TwitterAds::RateLimit::State | Nil, limit, remaining, reset, error : Exception | Nil = nil) #

[View source]

Class Method Detail

def self.error(e) #

[View source]
def self.none #

[View source]
def self.ok(limit, remaining, reset) #

[View source]
def self.parse(headers : HTTP::Headers) #

[View source]

Instance Method Detail

def available? : Bool #

[View source]
def error : Exception #

def error=(v : Exception) : Exception #

def error=(v : Nil) #

nil assignments are always ignored


def error? : Exception | Nil #

def inspect(io : IO) #
Description copied from class Reference

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>

[View source]
def limit : Int32 #

def limit=(v : Int32) : Int32 #

def limit=(v : Nil) #

nil assignments are always ignored


def limit? : Int32 | Nil #

def remaining : Int32 #

def remaining=(v : Int32) : Int32 #

def remaining=(v : Nil) #

nil assignments are always ignored


def remaining? : Int32 | Nil #

def reset : Int32 #

def reset=(v : Int32) : Int32 #

def reset=(v : Nil) #

nil assignments are always ignored


def reset? : Int32 | Nil #

def state : State #

def state=(v : State) : State #

def state=(v : Nil) #

nil assignments are always ignored


def state? : State | Nil #

def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]