class

Galileo::Client

Inherits Reference / Object

Base dogehouse cilent to interface with api with

Constructors

new(token : String, refresh_token : String)

Client takes your dogehouse token and refreshToken in order to auth

Source

Instance methods

all_callback

All messages will be sent through this callback.

client.on_all do |msg|
  puts msg
end
Source
all_callback=(all_callback : String -> Nil | Nil)

All messages will be sent through this callback.

client.on_all do |msg|
  puts msg
end
Source
ask_to_speak

Ask to speak will request to speak in whatever room the bot is in

Source
auth
Source
create_room(name : String, description : String = "", privacy : String = "public")

Will create room with given name description and privacy option Privacy options are limited to "public" and "private"

Source
delay

The chat delay withing rooms (measured in nanoseconds)

Source
delay=(delay : Int32)

The chat delay withing rooms (measured in nanoseconds)

Source
get_rooms
Source
in_room

True if bot in room, False if not

Source
in_room=(in_room : Bool)

True if bot in room, False if not

Source
join_room(roomId : String)

Join room will join the room associated with a roomId

client.join_room "roomid"
Source
join_room_callback

When room is joined this callback will be called

client.on_room_join do |room|
  puts room.name
end
Source
join_room_callback=(join_room_callback : Room -> Nil | Nil)

When room is joined this callback will be called

client.on_room_join do |room|
  puts room.name
end
Source
message_callback

Optional message_callback property Add a message callback function with .on_message

client.on_message do |msg|
  puts msg
end
Source
message_callback=(message_callback : Message -> Nil | Nil)

Optional message_callback property Add a message callback function with .on_message

client.on_message do |msg|
  puts msg
end
Source
mute

Will mute

Source
muted

True if bot is muted, False if not

Source
muted=(muted : Bool)

True if bot is muted, False if not

Source
new_tokens_callback

If newtokens are passed this callback will be called

client.on_new_tokens do |token, refresh_token|
  puts token
end
Source
new_tokens_callback=(new_tokens_callback : String, String -> Nil | Nil)

If newtokens are passed this callback will be called

client.on_new_tokens do |token, refresh_token|
  puts token
end
Source
on_all

Add all callback All messages recieved in the client will be sent through this callback

client.on_all do |msg|
  puts msg
end
Source
on_message

Add a message callback on_message takes block with context parameter and String parameter

client.on_message do |msg|
  puts msg
end
Source
on_new_tokens

Add new tokens callback

client.on_new_tokens do |token, refresh_token|
  puts token
end
Source
on_ready

Add ready callback

client.on_ready do |user|
  puts user.display_name
end
Source
on_room_join

Add room join callback

client.on_room_join do |room|
  puts room.name
end
Source
on_user_joined_room

Add user joined room callback

client.on_user_joined_room do |user|
  puts user.display_name
end
Source
raw_send(msg)

Send raw messages api without wrapper

Source
ready_callback

Optional on ready callback property

client.on_ready do |user|
  puts user.display_name
end
Source
ready_callback=(ready_callback : User -> Nil | Nil)

Optional on ready callback property

client.on_ready do |user|
  puts user.display_name
end
Source
rooms

Returns all the available rooms in array Updated every 2 seconds

Source
run

Run the client This will start the message loop

Source
send(message : String)

Sends message to whatever room currently in

client.send_message "msg"
Source
set_role(role : String, userId : String | Nil)

Takes a role "raised_hand", "listener", "speaker" and an optional userId which will default to the bot userId

Source
set_speaking(b : Bool)
Source
speaking

If bot is speaking will be true else will be false

Source
toggle_mute

Will toggle mute on and off

Source
unmute

Will unmute

Source
user_joined_room_callback

If a user joins a room this callback will be called

client.on_user_joined_room do |user|
  puts user.display_name
end
Source
user_joined_room_callback=(user_joined_room_callback : User -> Nil | Nil)

If a user joins a room this callback will be called

client.on_user_joined_room do |user|
  puts user.display_name
end
Source
ws

Websocket connection state

Source
ws=(ws : HTTP::WebSocket)

Websocket connection state

Source