Class: Courrier::Subscriber::Buttondown
- Inherits:
-
Base
- Object
- Base
- Courrier::Subscriber::Buttondown
show all
- Defined in:
- lib/courrier/subscriber/buttondown.rb
Constant Summary
collapse
- ENDPOINT_URL =
"https://api.buttondown.email/v1/subscribers"
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#create(email) ⇒ Object
10
11
12
|
# File 'lib/courrier/subscriber/buttondown.rb', line 10
def create(email)
request(:post, ENDPOINT_URL, {"email" => email})
end
|
#destroy(email) ⇒ Object
14
15
16
|
# File 'lib/courrier/subscriber/buttondown.rb', line 14
def destroy(email)
request(:delete, "#{ENDPOINT_URL}/#{email}")
end
|