Module: Vox::HTTP::Routes::Gateway

Defined in:
lib/vox/http/routes/gateway.rb

Overview

Mixin for gateway routes, used for retriving information about connecting to the gateway.

Instance Method Summary collapse

Instance Method Details

#get_gatewayHash<:url, String>

Fetch the URL to use for a gateway connection.

Returns:

  • (Hash<:url, String>)

    An object with one key ‘url` that maps to the URL for connecting to the gateway.

View On Discord's Docs:



17
18
19
# File 'lib/vox/http/routes/gateway.rb', line 17

def get_gateway
  request(Route.new(:GET, '/gateway'))
end

#get_gateway_botHash{ :url => String, :shards => Integer, :session_start_limit => Hash<Symbol, Integer>}

Fetch the URL to use for a gateway connection, with additional sharding information.

Returns:

View On Discord's Docs:



27
28
29
# File 'lib/vox/http/routes/gateway.rb', line 27

def get_gateway_bot
  request(Route.new(:GET, '/gateway/bot'))
end