mailchimp_api 1.0.0.pre.2 → 1.0.0.pre.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76805822022f1da1a8eacd1834b33b1b200ea2beabaed4cd5016dbdd70f6de28
|
4
|
+
data.tar.gz: ebda6362eb0c1adfbb45a23a9bd2e97ebf056386ceeaa3c75c13596cb47ae1a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b01d96e1f90427a78736ad4ec1e9f28efc64cbd5f72065d676850a73416ec790c0a8f4622842c0cbfa774c99dbc00b1b447272f32228977932ace7da383299
|
7
|
+
data.tar.gz: d0eaaf838a6396d538fb3a3673fbad6516e9706cabe2bd31fac8c5ef824058327e48615c8e08b124ef5988182914805b67f41f809508e0716f7b7c74596e1964
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MailchimpAPI
|
4
|
+
class Interest < Base
|
5
|
+
extend MailchimpAPI::Support::Countable
|
6
|
+
|
7
|
+
include MailchimpAPI::Support::PatchUpdate
|
8
|
+
|
9
|
+
self.collection_parser = CollectionParsers::Interest
|
10
|
+
|
11
|
+
self.prefix = '/3.0/lists/:list_id/interest-categories/:interest_category_id/'
|
12
|
+
end
|
13
|
+
end
|
@@ -11,5 +11,15 @@ module MailchimpAPI
|
|
11
11
|
self.prefix = '/3.0/lists/:list_id/'
|
12
12
|
self.element_name = 'interest-category'
|
13
13
|
self.collection_name = 'interest-categories'
|
14
|
+
|
15
|
+
# The path to get interests is '/3.0/lists/:list_id/interest-categories/:interest_category_id'
|
16
|
+
# Unfortunately, ActiveResource does not support nested resources, only single parent resources:
|
17
|
+
#
|
18
|
+
# https://github.com/rails/activeresource/blob/4accda8bc03ceae0ad626f8cec0b4751e89a58ad/lib/active_resource/associations.rb#L151
|
19
|
+
#
|
20
|
+
# Using a has_many, there is no way to include the `list_id`, so we just create our own interests method.
|
21
|
+
def interests
|
22
|
+
@interests ||= MailchimpAPI::Interest.find(:all, params: { interest_category_id: id }.merge(prefix_options))
|
23
|
+
end
|
14
24
|
end
|
15
25
|
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.0.0.pre.
|
4
|
+
version: 1.0.0.pre.3
|
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-02-
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|
@@ -178,6 +178,7 @@ files:
|
|
178
178
|
- lib/mailchimp_api.rb
|
179
179
|
- lib/mailchimp_api/collection_parsers.rb
|
180
180
|
- lib/mailchimp_api/collection_parsers/base.rb
|
181
|
+
- lib/mailchimp_api/collection_parsers/interest.rb
|
181
182
|
- lib/mailchimp_api/collection_parsers/interest_category.rb
|
182
183
|
- lib/mailchimp_api/collection_parsers/link.rb
|
183
184
|
- lib/mailchimp_api/collection_parsers/list.rb
|
@@ -190,6 +191,7 @@ files:
|
|
190
191
|
- lib/mailchimp_api/resources.rb
|
191
192
|
- lib/mailchimp_api/resources/account_information.rb
|
192
193
|
- lib/mailchimp_api/resources/base.rb
|
194
|
+
- lib/mailchimp_api/resources/interest.rb
|
193
195
|
- lib/mailchimp_api/resources/interest_category.rb
|
194
196
|
- lib/mailchimp_api/resources/link.rb
|
195
197
|
- lib/mailchimp_api/resources/list.rb
|