Module: Drip::Client::Tags
- Included in:
- Drip::Client
- Defined in:
- lib/drip/client/tags.rb
Instance Method Summary collapse
-
#apply_tag(email, tag) ⇒ Object
Public: Apply a tag to a subscriber.
-
#remove_tag(email, tag) ⇒ Object
Public: Remove a tag from a subscriber.
Instance Method Details
#apply_tag(email, tag) ⇒ Object
Public: Apply a tag to a subscriber.
email - The String email address of the subscriber. tag - The String tag to apply.
Returns a Drip::Response. See www.getdrip.com/docs/rest-api#apply_tag
13 14 15 16 |
# File 'lib/drip/client/tags.rb', line 13 def apply_tag(email, tag) data = { "email" => email, "tag" => tag } post "#{account_id}/tags", generate_resource("tags", data) end |
#remove_tag(email, tag) ⇒ Object
Public: Remove a tag from a subscriber.
email - The String email address of the subscriber. tag - The String tag to remove.
Returns a Drip::Response. See www.getdrip.com/docs/rest-api#remove_tag
25 26 27 |
# File 'lib/drip/client/tags.rb', line 25 def remove_tag(email, tag) delete "#{account_id}/subscribers/#{CGI.escape email}/tags/#{CGI.escape tag}" end |