module Convertkit::Client::Subscribers
Public Instance Methods
subscriber(subscriber_id)
click to toggle source
# File lib/convertkit/client/subscribers.rb, line 8 def subscriber(subscriber_id) connection.get("subscribers/#{subscriber_id}") end
subscribers(options = {})
click to toggle source
# File lib/convertkit/client/subscribers.rb, line 4 def subscribers(options = {}) connection.get("subscribers", options) end
unsubscribe(email)
click to toggle source
# File lib/convertkit/client/subscribers.rb, line 21 def unsubscribe(email) connection.put("unsubscribe") do |f| f.params['email'] = email end end
update_subscriber(subscriber_id, options = {})
click to toggle source
# File lib/convertkit/client/subscribers.rb, line 12 def update_subscriber(subscriber_id, options = {}) response = connection.put("subscribers/#{subscriber_id}") do |f| f.params["email_address"] = options[:email_address] if options[:email_address] f.params["fields"] = options[:fields] if options[:fields] f.params["first_name"] = options[:first_name] if options[:first_name] end response.body end