module Convertkit::Client::Tags
Public Instance Methods
add_subscriber_to_tag(tag_id, email, options = {})
click to toggle source
# File lib/convertkit/client/tags.rb, line 8 def add_subscriber_to_tag(tag_id, email, options = {}) connection.post("tags/#{tag_id}/subscribe") do |f| f.params['email'] = email f.params['first_name'] = options[:first_name] f.params['fields'] = options[:fields] f.params['tags'] = options[:tags] end end
create_tag(tag_name)
click to toggle source
# File lib/convertkit/client/tags.rb, line 17 def create_tag(tag_name) response = connection.post("tags") do |request| request.params["tag"] = { name: tag_name } end response.body end