class Twitch::Client

Defined in:

twitch/twitch_client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(username : String, token_directory : String) #

[View source]
def self.new(username : String) #

[View source]
def self.new(config : Config) #

[View source]

Instance Method Detail

def bot_user : User #

[View source]
def config : Config #

[View source]
def delete(url : String, query_params : Hash(String, String) | NamedTuple | Nil = nil, headers : HTTP::Headers = HTTP::Headers {"Authorization" => "Bearer #{@config.token.access_token}", "Client-Id" => @config.client_id}) : HTTP::Client::Response #

[View source]
def get(url : String, query_params : Hash(String, String) | NamedTuple | Nil = nil, headers : HTTP::Headers = HTTP::Headers {"Authorization" => "Bearer #{@config.token.access_token}", "Client-Id" => @config.client_id}) : HTTP::Client::Response #

[View source]
def get_chatters(broadcaster_id : String) : Array(String) #

[View source]
def get_user(username : String) : User #

[View source]
def patch(url : String, query_params : Hash(String, String) | NamedTuple | Nil = nil, headers : HTTP::Headers = HTTP::Headers {"Authorization" => "Bearer #{@config.token.access_token}", "Client-Id" => @config.client_id}, body : Hash | NamedTuple | Nil = nil) : HTTP::Client::Response #

[View source]
def post(url : String, query_params : Hash(String, String) | NamedTuple | Nil = nil, headers : HTTP::Headers = HTTP::Headers {"Authorization" => "Bearer #{@config.token.access_token}", "Client-Id" => @config.client_id}, body : Hash | NamedTuple | Nil = nil) : HTTP::Client::Response #

[View source]
def post_create_eventsub(type : String, version : String, condition : NamedTuple, session_id : String) #

TODO support webhook


[View source]
def put(url : String, query_params : Hash(String, String) | NamedTuple | Nil = nil, headers : HTTP::Headers = HTTP::Headers {"Authorization" => "Bearer #{@config.token.access_token}", "Client-Id" => @config.client_id}, body : Hash | NamedTuple | Nil = nil) : HTTP::Client::Response #

[View source]
def validate : Bool #

[View source]
def validate! : Nil #

[View source]