Class: Kucoin::Api::Endpoints::Websocket::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/kucoin/api/endpoints/websocket.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



18
19
20
21
22
# File 'lib/kucoin/api/endpoints/websocket.rb', line 18

def initialize response
  @token = response["token"]
  @endpoint = response["instanceServers"][0]["endpoint"]
  @ping_interval = response["instanceServers"][0]["pingInterval"]
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



17
18
19
# File 'lib/kucoin/api/endpoints/websocket.rb', line 17

def endpoint
  @endpoint
end

#ping_intervalObject (readonly)

Returns the value of attribute ping_interval.



17
18
19
# File 'lib/kucoin/api/endpoints/websocket.rb', line 17

def ping_interval
  @ping_interval
end

#tokenObject (readonly)

Returns the value of attribute token.



17
18
19
# File 'lib/kucoin/api/endpoints/websocket.rb', line 17

def token
  @token
end