Class: Blueticks::Resources::EnginesResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Blueticks::Resources::EnginesResource
- Defined in:
- lib/blueticks/resources/engines.rb
Instance Attribute Summary
Attributes inherited from BaseResource
Instance Method Summary collapse
-
#logout ⇒ Object
Force the engine to log out of WhatsApp Web.
-
#me ⇒ Object
Authenticated WhatsApp account profile (phone, pushname, platform).
-
#reload ⇒ Object
Force the engine’s WhatsApp Web tab to reload.
-
#status ⇒ Object
Current connection status of the user’s WhatsApp engine.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Blueticks::BaseResource
Instance Method Details
#logout ⇒ Object
Force the engine to log out of WhatsApp Web.
22 23 24 |
# File 'lib/blueticks/resources/engines.rb', line 22 def logout client.request("POST", "/v1/engines/logout") end |
#me ⇒ Object
Authenticated WhatsApp account profile (phone, pushname, platform).
16 17 18 19 |
# File 'lib/blueticks/resources/engines.rb', line 16 def me data = client.request("GET", "/v1/engines/me") Types::WhatsAppMe.from_hash(data) end |
#reload ⇒ Object
Force the engine’s WhatsApp Web tab to reload.
27 28 29 |
# File 'lib/blueticks/resources/engines.rb', line 27 def reload client.request("POST", "/v1/engines/reload") end |
#status ⇒ Object
Current connection status of the user’s WhatsApp engine.
10 11 12 13 |
# File 'lib/blueticks/resources/engines.rb', line 10 def status data = client.request("GET", "/v1/engines") Types::EngineStatus.from_hash(data) end |