mailchimp_api 1.0.0.pre.3 → 1.0.0.pre.4
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 +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/mailchimp_api/collection_parsers/note.rb +6 -0
- data/lib/mailchimp_api/resources/interest_category.rb +2 -2
- data/lib/mailchimp_api/resources/member.rb +10 -0
- data/lib/mailchimp_api/resources/note.rb +13 -0
- data/lib/mailchimp_api/resources/support/{patch_upadate.rb → patch_update.rb} +0 -0
- data/lib/mailchimp_api/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f6662f6dfad303fd828eb9df95de86a641620a27a85944cce1d53f3f7f411df
|
4
|
+
data.tar.gz: cd5d3527ab3214c0d21fe79158c25f37efcfaa3241f98783f4915208e5451036
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 533a7857bcfa6a661624f1de76454887b0b050e66b8dde985370a745a1405b52ae13f2a21e8ea2b832e86a1916db727ae222818d900079ec1c274baadf7a4393
|
7
|
+
data.tar.gz: da4f9b6291ddae2fc59469179052b31e47b0531a496d701745b6978f2f1138d3ac6e0d2e5ea9e0ddc1ee366ef8b4ffad2de4e477f4c5a54a90fa298aadd0fb31
|
data/CHANGELOG.md
CHANGED
@@ -18,8 +18,8 @@ module MailchimpAPI
|
|
18
18
|
# https://github.com/rails/activeresource/blob/4accda8bc03ceae0ad626f8cec0b4751e89a58ad/lib/active_resource/associations.rb#L151
|
19
19
|
#
|
20
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 }.
|
21
|
+
def interests(params = {})
|
22
|
+
@interests ||= MailchimpAPI::Interest.find(:all, params: { interest_category_id: id }.deep_merge(prefix_options).deep_merge(params))
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -10,6 +10,16 @@ module MailchimpAPI
|
|
10
10
|
|
11
11
|
self.prefix = '/3.0/lists/:list_id/'
|
12
12
|
|
13
|
+
# The path to get notes is '/3.0/lists/:list_id/members/:member_id'
|
14
|
+
# Unfortunately, ActiveResource does not support nested resources, only single parent resources:
|
15
|
+
#
|
16
|
+
# https://github.com/rails/activeresource/blob/4accda8bc03ceae0ad626f8cec0b4751e89a58ad/lib/active_resource/associations.rb#L151
|
17
|
+
#
|
18
|
+
# Using a has_many, there is no way to include the `list_id`, so we just create our own notes method.
|
19
|
+
def notes(params = {})
|
20
|
+
@notes ||= MailchimpAPI::Note.find(:all, params: { member_id: id }.deep_merge(prefix_options).deep_merge(params))
|
21
|
+
end
|
22
|
+
|
13
23
|
# non-RESTful actions
|
14
24
|
|
15
25
|
# Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MailchimpAPI
|
4
|
+
class Note < Base
|
5
|
+
extend MailchimpAPI::Support::Countable
|
6
|
+
|
7
|
+
include MailchimpAPI::Support::PatchUpdate
|
8
|
+
|
9
|
+
self.collection_parser = CollectionParsers::Note
|
10
|
+
|
11
|
+
self.prefix = '/3.0/lists/:list_id/members/:member_id/'
|
12
|
+
end
|
13
|
+
end
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rewind.io
|
@@ -183,6 +183,7 @@ files:
|
|
183
183
|
- lib/mailchimp_api/collection_parsers/link.rb
|
184
184
|
- lib/mailchimp_api/collection_parsers/list.rb
|
185
185
|
- lib/mailchimp_api/collection_parsers/member.rb
|
186
|
+
- lib/mailchimp_api/collection_parsers/note.rb
|
186
187
|
- lib/mailchimp_api/configuration.rb
|
187
188
|
- lib/mailchimp_api/connection.rb
|
188
189
|
- lib/mailchimp_api/detailed_log_subscriber.rb
|
@@ -196,8 +197,9 @@ files:
|
|
196
197
|
- lib/mailchimp_api/resources/link.rb
|
197
198
|
- lib/mailchimp_api/resources/list.rb
|
198
199
|
- lib/mailchimp_api/resources/member.rb
|
200
|
+
- lib/mailchimp_api/resources/note.rb
|
199
201
|
- lib/mailchimp_api/resources/support/countable.rb
|
200
|
-
- lib/mailchimp_api/resources/support/
|
202
|
+
- lib/mailchimp_api/resources/support/patch_update.rb
|
201
203
|
- lib/mailchimp_api/session.rb
|
202
204
|
- lib/mailchimp_api/version.rb
|
203
205
|
homepage: https://github.com/rewindio/mailchimp_api.git
|