Module: Resend::Events
- Defined in:
- lib/resend/events.rb
Overview
events api wrapper
Class Method Summary collapse
- .create(params = {}) ⇒ Object
-
.get(identifier = "") ⇒ Object
resend.com/docs/api-reference/events/get-event identifier can be a UUID or an event name (e.g. “user.signed_up”).
- .list(params = {}) ⇒ Object
-
.remove(identifier = "") ⇒ Object
resend.com/docs/api-reference/events/delete-event identifier can be a UUID or an event name (e.g. “user.signed_up”).
- .send(params = {}) ⇒ Object
- .update(params = {}) ⇒ Object
Class Method Details
.create(params = {}) ⇒ Object
8 9 10 |
# File 'lib/resend/events.rb', line 8 def create(params = {}) Resend::Request.new("events", params, "post").perform end |
.get(identifier = "") ⇒ Object
resend.com/docs/api-reference/events/get-event identifier can be a UUID or an event name (e.g. “user.signed_up”)
14 15 16 17 |
# File 'lib/resend/events.rb', line 14 def get(identifier = "") path = "events/#{CGI.escape(identifier.to_s)}" Resend::Request.new(path, {}, "get").perform end |
.list(params = {}) ⇒ Object
40 41 42 43 |
# File 'lib/resend/events.rb', line 40 def list(params = {}) path = Resend::PaginationHelper.build_paginated_path("events", params) Resend::Request.new(path, {}, "get").perform end |
.remove(identifier = "") ⇒ Object
resend.com/docs/api-reference/events/delete-event identifier can be a UUID or an event name (e.g. “user.signed_up”)
29 30 31 32 |
# File 'lib/resend/events.rb', line 29 def remove(identifier = "") path = "events/#{CGI.escape(identifier.to_s)}" Resend::Request.new(path, {}, "delete").perform end |
.send(params = {}) ⇒ Object
35 36 37 |
# File 'lib/resend/events.rb', line 35 def send(params = {}) Resend::Request.new("events/send", params, "post").perform end |