Class: HookSniff::MessagePoller
- Inherits:
-
Object
- Object
- HookSniff::MessagePoller
- Defined in:
- lib/hooksniff/api/message_poller.rb
Instance Method Summary collapse
- #commit(attrs) ⇒ Object
-
#initialize(client) ⇒ MessagePoller
constructor
A new instance of MessagePoller.
- #poll(params = {}) ⇒ Object
- #seek(attrs) ⇒ Object
Constructor Details
#initialize(client) ⇒ MessagePoller
Returns a new instance of MessagePoller.
5 6 7 |
# File 'lib/hooksniff/api/message_poller.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#commit(attrs) ⇒ Object
17 18 19 |
# File 'lib/hooksniff/api/message_poller.rb', line 17 def commit(attrs) @client.execute_request("POST", "/v1/message-poller/commit", body: attrs) end |
#poll(params = {}) ⇒ Object
9 10 11 |
# File 'lib/hooksniff/api/message_poller.rb', line 9 def poll(params = {}) @client.execute_request("GET", "/v1/message-poller/poll", query_params: params) end |
#seek(attrs) ⇒ Object
13 14 15 |
# File 'lib/hooksniff/api/message_poller.rb', line 13 def seek(attrs) @client.execute_request("POST", "/v1/message-poller/seek", body: attrs) end |