mints 0.0.27 → 0.0.29
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/Gemfile +2 -1
- data/lib/client.rb +287 -385
- data/lib/contact/config/appointments.rb +201 -0
- data/lib/contact/config/config.rb +7 -0
- data/lib/contact/content/content.rb +7 -0
- data/lib/contact/content/conversations.rb +121 -0
- data/lib/contact/ecommerce/ecommerce.rb +12 -0
- data/lib/contact/ecommerce/order_items.rb +19 -0
- data/lib/contact/ecommerce/order_items_groups.rb +95 -0
- data/lib/contact/ecommerce/orders.rb +133 -0
- data/lib/contact.rb +57 -607
- data/lib/errors.rb +4 -2
- data/lib/generators/mints_assets_controller.rb +4 -1
- data/lib/generators/mints_config.yml.erb +0 -2
- data/lib/generators/mints_contact_controller.rb +4 -1
- data/lib/generators/mints_files_generator.rb +16 -13
- data/lib/generators/mints_link.rb +9 -6
- data/lib/generators/mints_public_controller.rb +4 -1
- data/lib/generators/mints_user_controller.rb +3 -0
- data/lib/generators/short_link_controller.rb +4 -1
- data/lib/mints/controllers/admin_base_controller.rb +5 -3
- data/lib/mints/controllers/base_api_controller.rb +6 -4
- data/lib/mints/controllers/base_controller.rb +5 -3
- data/lib/mints/controllers/concerns/mints_clients.rb +4 -2
- data/lib/mints/controllers/concerns/read_config_file.rb +3 -1
- data/lib/mints/controllers/contact_api_controller.rb +12 -10
- data/lib/mints/controllers/public_api_controller.rb +10 -8
- data/lib/mints/controllers/user_api_controller.rb +11 -9
- data/lib/mints/helpers/contact_auth_helper.rb +3 -1
- data/lib/mints/helpers/mints_helper.rb +39 -38
- data/lib/mints/helpers/proxy_controllers_methods.rb +24 -24
- data/lib/mints/helpers/user_auth_helper.rb +5 -3
- data/lib/mints.rb +12 -10
- data/lib/pub.rb +75 -93
- data/lib/user/config/api_keys.rb +63 -61
- data/lib/user/config/appointments.rb +217 -215
- data/lib/user/config/attribute_groups.rb +74 -72
- data/lib/user/config/attributes.rb +83 -81
- data/lib/user/config/calendars.rb +88 -86
- data/lib/user/config/config.rb +31 -63
- data/lib/user/config/public_folders.rb +105 -104
- data/lib/user/config/relationships.rb +135 -132
- data/lib/user/config/roles.rb +76 -79
- data/lib/user/config/seeds.rb +52 -51
- data/lib/user/config/system_settings.rb +50 -49
- data/lib/user/config/tags.rb +57 -59
- data/lib/user/config/taxonomies.rb +115 -119
- data/lib/user/config/teams.rb +69 -68
- data/lib/user/config/users.rb +72 -71
- data/lib/user/contacts/contacts.rb +21 -20
- data/lib/user/content/assets.rb +275 -280
- data/lib/user/content/content.rb +236 -235
- data/lib/user/content/content_instances.rb +138 -138
- data/lib/user/content/content_templates.rb +105 -103
- data/lib/user/content/conversations.rb +195 -193
- data/lib/user/content/dam.rb +85 -80
- data/lib/user/content/forms.rb +231 -233
- data/lib/user/content/message_templates.rb +154 -151
- data/lib/user/content/messages.rb +89 -87
- data/lib/user/content/pages.rb +84 -82
- data/lib/user/content/stories.rb +101 -101
- data/lib/user/content/story_templates.rb +90 -88
- data/lib/user/content/story_versions.rb +117 -117
- data/lib/user/crm/companies.rb +106 -106
- data/lib/user/crm/contacts.rb +287 -292
- data/lib/user/crm/crm.rb +21 -19
- data/lib/user/crm/deals.rb +105 -103
- data/lib/user/crm/favorites.rb +16 -13
- data/lib/user/crm/segments.rb +123 -123
- data/lib/user/crm/users.rb +22 -20
- data/lib/user/crm/workflow_step_objects.rb +86 -84
- data/lib/user/crm/workflow_steps.rb +47 -45
- data/lib/user/crm/workflows.rb +67 -65
- data/lib/user/ecommerce/ecommerce.rb +29 -27
- data/lib/user/ecommerce/item_prices.rb +84 -81
- data/lib/user/ecommerce/locations.rb +162 -160
- data/lib/user/ecommerce/order_items_groups.rb +110 -106
- data/lib/user/ecommerce/order_statuses.rb +26 -24
- data/lib/user/ecommerce/orders.rb +253 -246
- data/lib/user/ecommerce/price_lists.rb +70 -68
- data/lib/user/ecommerce/product_templates.rb +101 -99
- data/lib/user/ecommerce/product_variations.rb +124 -120
- data/lib/user/ecommerce/products.rb +162 -159
- data/lib/user/ecommerce/skus.rb +87 -85
- data/lib/user/ecommerce/taxes.rb +81 -79
- data/lib/user/ecommerce/variant_options.rb +68 -66
- data/lib/user/ecommerce/variant_values.rb +71 -69
- data/lib/user/helpers/helpers.rb +104 -101
- data/lib/user/helpers/object_activities.rb +80 -78
- data/lib/user/helpers/object_folders.rb +78 -76
- data/lib/user/helpers/user_folders.rb +79 -77
- data/lib/user/marketing/marketing.rb +116 -113
- data/lib/user/profile/profile.rb +96 -103
- data/lib/user.rb +32 -41
- metadata +50 -43
- data/lib/user/config/importers.rb +0 -184
|
@@ -1,206 +1,208 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Conversations
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
##
|
|
5
|
+
# == Conversations
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
###
|
|
9
|
+
# === Get conversations.
|
|
10
|
+
# Get a collection of conversations.
|
|
11
|
+
#
|
|
12
|
+
# ==== Parameters
|
|
13
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
14
|
+
#
|
|
15
|
+
# ==== First Example
|
|
16
|
+
# @data = @mints_user.get_conversations
|
|
17
|
+
#
|
|
18
|
+
# ==== Second Example
|
|
19
|
+
# options = { fields: 'title' }
|
|
20
|
+
# @data = @mints_user.get_conversations(options)
|
|
21
|
+
def get_conversations(options = nil)
|
|
22
|
+
@client.raw('get', '/content/conversations', options)
|
|
23
|
+
end
|
|
5
24
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
# === Get conversation.
|
|
26
|
+
# Get a conversation info.
|
|
27
|
+
#
|
|
28
|
+
# ==== Parameters
|
|
29
|
+
# id:: (Integer) -- Conversation id.
|
|
30
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
31
|
+
#
|
|
32
|
+
# ==== First Example
|
|
33
|
+
# @data = @mints_user.get_conversation(1)
|
|
34
|
+
#
|
|
35
|
+
# ==== Second Example
|
|
36
|
+
# options = { fields: 'title' }
|
|
37
|
+
# @data = @mints_user.get_conversation(1, options)
|
|
38
|
+
def get_conversation(id, options = nil)
|
|
39
|
+
@client.raw('get', "/content/conversations/#{id}", options)
|
|
40
|
+
end
|
|
22
41
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
@client.raw("get", "/content/conversations/#{id}", options)
|
|
38
|
-
end
|
|
42
|
+
# === Create conversation.
|
|
43
|
+
# Create a conversation with data.
|
|
44
|
+
#
|
|
45
|
+
# ==== Parameters
|
|
46
|
+
# data:: (Hash) -- Data to be submitted.
|
|
47
|
+
#
|
|
48
|
+
# ==== Example
|
|
49
|
+
# data = {
|
|
50
|
+
# title: 'New Conversation'
|
|
51
|
+
# }
|
|
52
|
+
# @data = @mints_user.create_conversation(data)
|
|
53
|
+
def create_conversation(data, options = nil)
|
|
54
|
+
@client.raw('post', '/content/conversations', options, data_transform(data))
|
|
55
|
+
end
|
|
39
56
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
# === Update conversation.
|
|
58
|
+
# Update a conversation info.
|
|
59
|
+
#
|
|
60
|
+
# ==== Parameters
|
|
61
|
+
# id:: (Integer) -- Conversation id.
|
|
62
|
+
# data:: (Hash) -- Data to be submitted.
|
|
63
|
+
#
|
|
64
|
+
# ==== Example
|
|
65
|
+
# data = {
|
|
66
|
+
# title: 'New Conversation Modified'
|
|
67
|
+
# }
|
|
68
|
+
# @data = @mints_user.update_conversation(13, data)
|
|
69
|
+
def update_conversation(id, data, options = nil)
|
|
70
|
+
@client.raw('put', "/content/conversations/#{id}", options, data_transform(data))
|
|
71
|
+
end
|
|
54
72
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
# @data = @mints_user.update_conversation(13, data)
|
|
67
|
-
def update_conversation(id, data, options = nil)
|
|
68
|
-
@client.raw("put", "/content/conversations/#{id}", options, data_transform(data))
|
|
69
|
-
end
|
|
73
|
+
# === Delete conversation.
|
|
74
|
+
# Delete a conversation.
|
|
75
|
+
#
|
|
76
|
+
# ==== Parameters
|
|
77
|
+
# id:: (Integer) -- Conversation id.
|
|
78
|
+
#
|
|
79
|
+
# ==== Example
|
|
80
|
+
# @data = @mints_user.delete_conversation(11)
|
|
81
|
+
def delete_conversation(id)
|
|
82
|
+
@client.raw('delete', "/content/conversations/#{id}")
|
|
83
|
+
end
|
|
70
84
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
# ==== Parameters
|
|
87
|
-
# id:: (Integer) -- Conversation id.
|
|
88
|
-
# data:: (Hash) -- Data to be submitted.
|
|
89
|
-
#
|
|
90
|
-
# ==== Example
|
|
91
|
-
# data = {
|
|
92
|
-
# "status": "read"
|
|
93
|
-
# }
|
|
94
|
-
# @data = @mints_user.update_conversation_status(13, data)
|
|
95
|
-
def update_conversation_status(id, data)
|
|
96
|
-
@client.raw("put", "/content/conversations/#{id}/status", nil, data_transform(data))
|
|
97
|
-
end
|
|
85
|
+
# === Update conversation status.
|
|
86
|
+
# Update a conversation status.
|
|
87
|
+
#
|
|
88
|
+
# ==== Parameters
|
|
89
|
+
# id:: (Integer) -- Conversation id.
|
|
90
|
+
# data:: (Hash) -- Data to be submitted.
|
|
91
|
+
#
|
|
92
|
+
# ==== Example
|
|
93
|
+
# data = {
|
|
94
|
+
# status: 'read'
|
|
95
|
+
# }
|
|
96
|
+
# @data = @mints_user.update_conversation_status(13, data)
|
|
97
|
+
def update_conversation_status(id, data)
|
|
98
|
+
@client.raw('put', "/content/conversations/#{id}/status", nil, data_transform(data))
|
|
99
|
+
end
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
# === Get conversation participants.
|
|
102
|
+
# Get participants in a conversation.
|
|
103
|
+
#
|
|
104
|
+
# ==== Parameters
|
|
105
|
+
# id:: (Integer) -- Conversation id.
|
|
106
|
+
#
|
|
107
|
+
# ==== Example
|
|
108
|
+
# @data = @mints_user.get_conversation_participants(1)
|
|
109
|
+
def get_conversation_participants(id)
|
|
110
|
+
@client.raw('get', "/content/conversations/#{id}/participants")
|
|
111
|
+
end
|
|
110
112
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
113
|
+
# === Attach user in conversation.
|
|
114
|
+
# Attach an user in a conversation.
|
|
115
|
+
#
|
|
116
|
+
# ==== Parameters
|
|
117
|
+
# id:: (Integer) -- Conversation id.
|
|
118
|
+
# data:: (Hash) -- Data to be submitted.
|
|
119
|
+
#
|
|
120
|
+
# ==== Example
|
|
121
|
+
# data = {
|
|
122
|
+
# user_id: 2
|
|
123
|
+
# }
|
|
124
|
+
# @data = @mints_user.attach_user_in_conversation(13, data)
|
|
125
|
+
def attach_user_in_conversation(id, data)
|
|
126
|
+
@client.raw('post', "/content/conversations/#{id}/attach-user", nil, data_transform(data))
|
|
127
|
+
end
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
129
|
+
# === Detach user in conversation.
|
|
130
|
+
# Detach an user in a conversation.
|
|
131
|
+
#
|
|
132
|
+
# ==== Parameters
|
|
133
|
+
# id:: (Integer) -- Conversation id.
|
|
134
|
+
# data:: (Hash) -- Data to be submitted.
|
|
135
|
+
#
|
|
136
|
+
# ==== Example
|
|
137
|
+
# data = {
|
|
138
|
+
# user_id: 2
|
|
139
|
+
# }
|
|
140
|
+
# @data = @mints_user.detach_user_in_conversation(13, data)
|
|
141
|
+
def detach_user_in_conversation(id, data)
|
|
142
|
+
@client.raw('post', "/content/conversations/#{id}/detach-user", nil, data_transform(data))
|
|
143
|
+
end
|
|
142
144
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
145
|
+
# === Attach contact in conversation.
|
|
146
|
+
# Attach a contact in a conversation.
|
|
147
|
+
#
|
|
148
|
+
# ==== Parameters
|
|
149
|
+
# id:: (Integer) -- Conversation id.
|
|
150
|
+
# data:: (Hash) -- Data to be submitted.
|
|
151
|
+
#
|
|
152
|
+
# ==== Example
|
|
153
|
+
# data = {
|
|
154
|
+
# contact_id: 2
|
|
155
|
+
# }
|
|
156
|
+
# @data = @mints_user.attach_contact_in_conversation(1, data)
|
|
157
|
+
def attach_contact_in_conversation(id, data)
|
|
158
|
+
@client.raw('post', "/content/conversations/#{id}/attach-contact", nil, data_transform(data))
|
|
159
|
+
end
|
|
158
160
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
161
|
+
# === Detach contact in conversation.
|
|
162
|
+
# Detach a contact in a conversation.
|
|
163
|
+
#
|
|
164
|
+
# ==== Parameters
|
|
165
|
+
# id:: (Integer) -- Contact id.
|
|
166
|
+
# data:: (Hash) -- Data to be submitted.
|
|
167
|
+
#
|
|
168
|
+
# ==== Example
|
|
169
|
+
# data = {
|
|
170
|
+
# contact_id: 2
|
|
171
|
+
# }
|
|
172
|
+
# @data = @mints_user.detach_contact_in_conversation(1, data)
|
|
173
|
+
def detach_contact_in_conversation(id, data)
|
|
174
|
+
@client.raw('post', "/content/conversations/#{id}/detach-contact", nil, data_transform(data))
|
|
175
|
+
end
|
|
174
176
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
177
|
+
# === Attach form in conversation.
|
|
178
|
+
# Attach a form in a conversation.
|
|
179
|
+
#
|
|
180
|
+
# ==== Parameters
|
|
181
|
+
# id:: (Integer) -- Conversation id.
|
|
182
|
+
# data:: (Hash) -- Data to be submitted.
|
|
183
|
+
#
|
|
184
|
+
# ==== Example
|
|
185
|
+
# data = {
|
|
186
|
+
# form_id: 2
|
|
187
|
+
# }
|
|
188
|
+
# @data = @mints_user.attach_form_in_conversation(1, data)
|
|
189
|
+
def attach_form_in_conversation(id, data)
|
|
190
|
+
@client.raw('post', "/content/conversations/#{id}/attach-form", nil, data_transform(data))
|
|
191
|
+
end
|
|
190
192
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
end
|
|
193
|
+
# === Detach form in conversation.
|
|
194
|
+
# Detach a form in a conversation.
|
|
195
|
+
#
|
|
196
|
+
# ==== Parameters
|
|
197
|
+
# id:: (Integer) -- Contact id.
|
|
198
|
+
# data:: (Hash) -- Data to be submitted.
|
|
199
|
+
#
|
|
200
|
+
# ==== Example
|
|
201
|
+
# data = {
|
|
202
|
+
# form_id: 2
|
|
203
|
+
# }
|
|
204
|
+
# @data = @mints_user.detach_form_in_conversation(1, data)
|
|
205
|
+
def detach_form_in_conversation(id, data)
|
|
206
|
+
@client.raw('post', "/content/conversations/#{id}/detach-form", nil, data_transform(data))
|
|
207
|
+
end
|
|
208
|
+
end
|
data/lib/user/content/dam.rb
CHANGED
|
@@ -1,88 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module DAM
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
##
|
|
5
|
+
# == dam
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
# === Get dam load_tree.
|
|
9
|
+
# Get dam load_tree.
|
|
10
|
+
#
|
|
11
|
+
# ==== Example
|
|
12
|
+
# @data = @mints_user.get_dam_load_tree
|
|
13
|
+
def get_dam_load_tree
|
|
14
|
+
@client.raw('get', '/content/dam/loadtree')
|
|
15
|
+
end
|
|
5
16
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
# === Get dam asset locations.
|
|
18
|
+
# Get an asset locations in dam.
|
|
19
|
+
#
|
|
20
|
+
# ==== Parameters
|
|
21
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
22
|
+
#
|
|
23
|
+
# ==== Example
|
|
24
|
+
# @data = @mints_user.get_dam_asset_locations(options)
|
|
25
|
+
def get_dam_asset_locations(options)
|
|
26
|
+
@client.raw('get', '/content/dam/asset-locations', options)
|
|
27
|
+
end
|
|
14
28
|
|
|
15
|
-
|
|
16
|
-
#
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
|
20
|
-
#
|
|
21
|
-
# ==== Example
|
|
22
|
-
# @data = @mints_user.get_dam_asset_locations(options)
|
|
23
|
-
def get_dam_asset_locations(options)
|
|
24
|
-
@client.raw("get", "/content/dam/asset-locations", options)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def paste_dam(data) #FIXME: Controller detect object array like a single array.
|
|
28
|
-
@client.raw("post", "/content/dam/paste", nil, data)
|
|
29
|
-
end
|
|
29
|
+
def paste_dam(data)
|
|
30
|
+
# FIXME: Controller detect object array like a single array.
|
|
31
|
+
@client.raw('post', '/content/dam/paste', nil, data)
|
|
32
|
+
end
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
# === Rename dam.
|
|
35
|
+
# Rename folder or asset in dam.
|
|
36
|
+
#
|
|
37
|
+
# ==== Parameters
|
|
38
|
+
# data:: (Hash) -- Data to be submitted.
|
|
39
|
+
#
|
|
40
|
+
# ==== Example
|
|
41
|
+
# data = {
|
|
42
|
+
# itemType: 'asset',
|
|
43
|
+
# id: 21,
|
|
44
|
+
# title: 'New folder title',
|
|
45
|
+
# description: 'New folder description',
|
|
46
|
+
# slug: 'new-folder-title'
|
|
47
|
+
# }
|
|
48
|
+
# @data = @mints_user.rename_dam(data.to_json)
|
|
49
|
+
def rename_dam(data)
|
|
50
|
+
@client.raw('post', '/content/dam/rename', nil, data)
|
|
51
|
+
end
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
# === Search dam.
|
|
54
|
+
# Search folder or asset in dam.
|
|
55
|
+
#
|
|
56
|
+
# ==== Parameters
|
|
57
|
+
# data:: (Hash) -- Data to be submitted.
|
|
58
|
+
#
|
|
59
|
+
# ==== Example
|
|
60
|
+
# data = {
|
|
61
|
+
# searchFor: 'Folder name'
|
|
62
|
+
# }
|
|
63
|
+
# @data = @mints_user.search_dam(data.to_json)
|
|
64
|
+
def search_dam(data)
|
|
65
|
+
@client.raw('post', '/content/dam/search', nil, data)
|
|
66
|
+
end
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
def send_to_trash_dam(data)
|
|
69
|
+
# FIXME: Invalid argument supplied for foreach()
|
|
70
|
+
@client.raw('post', '/content/dam/sendToTrash', nil, data)
|
|
71
|
+
end
|
|
68
72
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
def delete_dam(data)
|
|
74
|
+
# FIXME: Invalid argument supplied for foreach()
|
|
75
|
+
@client.raw('post', '/content/dam/delete', nil, data)
|
|
76
|
+
end
|
|
72
77
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
end
|
|
78
|
+
# === Create dam folder.
|
|
79
|
+
# Create a folder in dam.
|
|
80
|
+
#
|
|
81
|
+
# ==== Parameters
|
|
82
|
+
# data:: (Hash) -- Data to be submitted.
|
|
83
|
+
#
|
|
84
|
+
# ==== Example
|
|
85
|
+
# data = {
|
|
86
|
+
# folder_name: 'New Dam Folder',
|
|
87
|
+
# slug: 'new-dam-folder'
|
|
88
|
+
# }
|
|
89
|
+
# @data = @mints_user.create_dam_folder(data.to_json)
|
|
90
|
+
def create_dam_folder(data)
|
|
91
|
+
@client.raw('post', '/content/folders/create', nil, data)
|
|
92
|
+
end
|
|
93
|
+
end
|