Class: Mailgun::Events
- Inherits:
-
Object
- Object
- Mailgun::Events
- Defined in:
- lib/mailgun/events/events.rb
Overview
A Mailgun::Events object makes it really simple to consume Mailgun’s events from the Events endpoint.
See the Github documentation for full examples.
Instance Method Summary collapse
-
#get(params = nil) ⇒ Mailgun::Response
Issues a simple get against the client.
-
#initialize(client, domain) ⇒ Events
constructor
A new instance of Events.
-
#next ⇒ Mailgun::Response
Using built in paging, obtains the next set of data.
-
#previous ⇒ Mailgun::Response
Using built in paging, obtains the previous set of data.
Constructor Details
#initialize(client, domain) ⇒ Events
15 16 17 18 19 20 |
# File 'lib/mailgun/events/events.rb', line 15 def initialize(client, domain) @client = client @domain = domain @paging_next = nil @paging_previous = nil end |
Instance Method Details
#get(params = nil) ⇒ Mailgun::Response
Issues a simple get against the client.
27 28 29 |
# File 'lib/mailgun/events/events.rb', line 27 def get(params=nil) _get(params) end |
#next ⇒ Mailgun::Response
Using built in paging, obtains the next set of data.
35 36 37 |
# File 'lib/mailgun/events/events.rb', line 35 def next() _get(nil, @paging_next) end |
#previous ⇒ Mailgun::Response
Using built in paging, obtains the previous set of data.
43 44 45 |
# File 'lib/mailgun/events/events.rb', line 43 def previous() _get(nil, @paging_previous) end |