Module: MailchimpAPI::Audience::MemberTags::APIs
- Includes:
- Utils, Pagination::ListEachItemHelper
- Defined in:
- lib/mailchimp-api/resources/audience/member_tags.rb
Overview
Module with endpoints for MemberTags APIs
Instance Method Summary collapse
-
#create(list_id, email, query: nil, body: nil, headers: nil) ⇒ Response
Add or update tags for a member.
-
#each(list_id, email, query: nil, body: nil, headers: nil) {|Hash| ... } ⇒ Object
Iterate through all tags for a member.
-
#list(list_id, email, query: nil, body: nil, headers: nil) ⇒ Response
List tags for a specific member.
Instance Method Details
#create(list_id, email, query: nil, body: nil, headers: nil) ⇒ Response
Add or update tags for a member
42 43 44 45 |
# File 'lib/mailchimp-api/resources/audience/member_tags.rb', line 42 def create(list_id, email, query: nil, body: nil, headers: nil) path = "/lists/#{list_id}/members/#{subscriber_hash(email)}/tags" client.post(path, query: query, body: body, headers: headers) end |
#each(list_id, email, query: nil, body: nil, headers: nil) {|Hash| ... } ⇒ Object
Iterate through all tags for a member
58 59 60 |
# File 'lib/mailchimp-api/resources/audience/member_tags.rb', line 58 def each(list_id, email, query: nil, body: nil, headers: nil, &block) list_each_item(:tags, list_id, email, query: query, body: body, headers: headers, &block) end |
#list(list_id, email, query: nil, body: nil, headers: nil) ⇒ Response
List tags for a specific member
22 23 24 25 |
# File 'lib/mailchimp-api/resources/audience/member_tags.rb', line 22 def list(list_id, email, query: nil, body: nil, headers: nil) path = "/lists/#{list_id}/members/#{subscriber_hash(email)}/tags" client.get(path, query: query, body: body, headers: headers) end |