Class: Kucoin::Api::Endpoints::Websocket::Response
- Inherits:
-
Object
- Object
- Kucoin::Api::Endpoints::Websocket::Response
- Defined in:
- lib/kucoin/api/endpoints/websocket.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#ping_interval ⇒ Object
readonly
Returns the value of attribute ping_interval.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
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
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
17 18 19 |
# File 'lib/kucoin/api/endpoints/websocket.rb', line 17 def endpoint @endpoint end |
#ping_interval ⇒ Object (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 |
#token ⇒ Object (readonly)
Returns the value of attribute token.
17 18 19 |
# File 'lib/kucoin/api/endpoints/websocket.rb', line 17 def token @token end |