mailchimp_api 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8bc18453dd03828f38c2c430717db901edea8ac2d85a600198cf81a6a1c7557
4
- data.tar.gz: bcda063414177374f18714b0a609184804e78d438bcc392896cbf0eb14a9733a
3
+ metadata.gz: '06189e44886532a02067ee5b13eb0fc661c4138180be82be50171996ae08e277'
4
+ data.tar.gz: 503704b3f170646e6713375002ad84f6926f2a6bea0fb9600a5a8bb43b39dbfc
5
5
  SHA512:
6
- metadata.gz: f4c418ca04fa506da2c1a7739012cf91df1c8a662e4c59324e176c160398d4218a872747120a53983b03a5ec7fd7af6d2abd3cf95e2fcb7731569b30f67faa60
7
- data.tar.gz: f97bbe8b2b60ed441337e132d02d63ebf0c1464ee924fd6a1d2ddcd60c7a72b346b91129895b86579ae0050c97c275a0cd4565c8224b94c67051addbeb686588
6
+ metadata.gz: ea0d31e9d920b100805d638cc3f600036e40b68094ef36890020cb8789b9bc1afcb77823ceafdb87da52ab1f84b348c185ca8705189a6bb2548b660ebc9541b1
7
+ data.tar.gz: bb6e403c14e179f88eb08a05bef9a784ff4f7a0d2e48db113f08ee68ab6321b440b7a3e336e2305773245666819b345c944dc0e386cfdbffab04433c9ddd6b5d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [1.6.0]
4
+
5
+ - Support of `/campaigns/:campaign_id/content`
6
+
3
7
  ## [1.5.0]
4
8
 
5
9
  - Support of `/templates`
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MailchimpAPI
4
+ class CampaignContent < Base
5
+ extend MailchimpAPI::Support::Countable
6
+
7
+ self.prefix = '/3.0/campaigns/:campaign_id/'
8
+ self.element_name = 'content'
9
+ self.collection_name = 'content'
10
+
11
+ class << self
12
+ # CampaignContent doesn't have an ID
13
+ # `/3.0/campaigns/:campaign_id/content` only returns a single object.
14
+ # This overrides ActiveResource::Base#find to massage all calls to grab the one campaign content.
15
+ def find(*args)
16
+ options = args.slice!(1) || {}
17
+
18
+ prefix_options, query_options = split_options options[:params]
19
+
20
+ path = collection_path prefix_options, query_options
21
+
22
+ instantiate_record format.decode(connection.get(path, headers).body), prefix_options
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MailchimpAPI
4
- VERSION = '1.5.0'
4
+ VERSION = '1.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailchimp_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rewind.io
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-19 00:00:00.000000000 Z
11
+ date: 2019-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -217,6 +217,7 @@ files:
217
217
  - lib/mailchimp_api/resources/account_information.rb
218
218
  - lib/mailchimp_api/resources/base.rb
219
219
  - lib/mailchimp_api/resources/campaign.rb
220
+ - lib/mailchimp_api/resources/campaign_content.rb
220
221
  - lib/mailchimp_api/resources/campaign_folder.rb
221
222
  - lib/mailchimp_api/resources/file_manager_folder.rb
222
223
  - lib/mailchimp_api/resources/interest.rb