Module: Resend::Audiences

Defined in:
lib/resend/audiences.rb

Overview

Audiences api wrapper

Class Method Summary collapse

Class Method Details

.create(params) ⇒ Object



11
12
13
14
# File 'lib/resend/audiences.rb', line 11

def create(params)
  path = "audiences"
  Resend::Request.new(path, params, "post").perform
end

.get(audience_id = "") ⇒ Object



17
18
19
20
# File 'lib/resend/audiences.rb', line 17

def get(audience_id = "")
  path = "audiences/#{audience_id}"
  Resend::Request.new(path, {}, "get").perform
end

.listObject



23
24
25
26
# File 'lib/resend/audiences.rb', line 23

def list
  path = "audiences"
  Resend::Request.new(path, {}, "get").perform
end

.remove(audience_id = "") ⇒ Object



29
30
31
32
# File 'lib/resend/audiences.rb', line 29

def remove(audience_id = "")
  path = "audiences/#{audience_id}"
  Resend::Request.new(path, {}, "delete").perform
end