Class: Blueticks::Resources::PingResource

Inherits:
BaseResource show all
Defined in:
lib/blueticks/resources/ping.rb

Instance Attribute Summary

Attributes inherited from BaseResource

#client

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize

Constructor Details

This class inherits a constructor from Blueticks::BaseResource

Instance Method Details

#retrieveObject

Ping.

Probe the API: returns api: "ok", the account id, and the currently connected WhatsApp engines. Useful as a connection/liveness test.



13
14
15
16
# File 'lib/blueticks/resources/ping.rb', line 13

def retrieve
  env = client.request("GET", "/v1/ping")
  Types::Ping.from_hash(env && env["data"])
end