mints 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/client.rb +72 -34
- data/lib/contact.rb +46 -46
- data/lib/errors.rb +98 -0
- data/lib/mints/controllers/admin_base_controller.rb +8 -66
- data/lib/mints/controllers/base_api_controller.rb +16 -134
- data/lib/mints/controllers/base_controller.rb +20 -106
- data/lib/mints/controllers/concerns/mints_clients.rb +74 -0
- data/lib/mints/controllers/concerns/read_config_file.rb +28 -0
- data/lib/mints/controllers/contact_api_controller.rb +6 -85
- data/lib/mints/controllers/public_api_controller.rb +6 -79
- data/lib/mints/controllers/user_api_controller.rb +7 -82
- data/lib/mints/helpers/contact_auth_helper.rb +67 -0
- data/lib/{mints_helper.rb → mints/helpers/mints_helper.rb} +7 -5
- data/lib/mints/helpers/proxy_controllers_methods.rb +126 -0
- data/lib/mints/helpers/user_auth_helper.rb +53 -0
- data/lib/mints.rb +2 -0
- data/lib/pub.rb +21 -21
- data/lib/user/config/api_keys.rb +4 -4
- data/lib/user/config/appointments.rb +13 -13
- data/lib/user/config/attribute_groups.rb +5 -5
- data/lib/user/config/attributes.rb +6 -6
- data/lib/user/config/calendars.rb +5 -5
- data/lib/user/config/config.rb +7 -7
- data/lib/user/config/importers.rb +13 -13
- data/lib/user/config/public_folders.rb +7 -7
- data/lib/user/config/relationships.rb +9 -9
- data/lib/user/config/roles.rb +6 -6
- data/lib/user/config/seeds.rb +3 -3
- data/lib/user/config/system_settings.rb +4 -4
- data/lib/user/config/tags.rb +4 -4
- data/lib/user/config/taxonomies.rb +7 -7
- data/lib/user/config/teams.rb +5 -5
- data/lib/user/config/users.rb +5 -5
- data/lib/user/contacts/contacts.rb +1 -1
- data/lib/user/content/assets.rb +17 -17
- data/lib/user/content/content.rb +13 -13
- data/lib/user/content/content_instances.rb +9 -9
- data/lib/user/content/content_templates.rb +7 -7
- data/lib/user/content/conversations.rb +13 -13
- data/lib/user/content/dam.rb +8 -8
- data/lib/user/content/forms.rb +16 -16
- data/lib/user/content/message_templates.rb +11 -11
- data/lib/user/content/messages.rb +5 -5
- data/lib/user/content/pages.rb +7 -7
- data/lib/user/content/stories.rb +6 -6
- data/lib/user/content/story_templates.rb +6 -6
- data/lib/user/content/story_versions.rb +6 -6
- data/lib/user/crm/companies.rb +5 -5
- data/lib/user/crm/contacts.rb +18 -18
- data/lib/user/crm/deals.rb +6 -6
- data/lib/user/crm/favorites.rb +3 -3
- data/lib/user/crm/segments.rb +9 -9
- data/lib/user/crm/users.rb +1 -1
- data/lib/user/crm/workflow_step_objects.rb +5 -5
- data/lib/user/crm/workflow_steps.rb +3 -3
- data/lib/user/crm/workflows.rb +4 -4
- data/lib/user/ecommerce/item_prices.rb +5 -5
- data/lib/user/ecommerce/locations.rb +10 -10
- data/lib/user/ecommerce/order_items_groups.rb +15 -14
- data/lib/user/ecommerce/order_statuses.rb +2 -2
- data/lib/user/ecommerce/orders.rb +16 -16
- data/lib/user/ecommerce/price_lists.rb +3 -3
- data/lib/user/ecommerce/product_templates.rb +7 -7
- data/lib/user/ecommerce/product_variations.rb +8 -8
- data/lib/user/ecommerce/products.rb +10 -10
- data/lib/user/ecommerce/skus.rb +5 -5
- data/lib/user/ecommerce/taxes.rb +5 -5
- data/lib/user/ecommerce/variant_options.rb +4 -4
- data/lib/user/ecommerce/variant_values.rb +4 -4
- data/lib/user/helpers/helpers.rb +8 -8
- data/lib/user/helpers/object_activities.rb +5 -5
- data/lib/user/helpers/object_folders.rb +5 -5
- data/lib/user/helpers/user_folders.rb +5 -5
- data/lib/user/marketing/marketing.rb +8 -8
- data/lib/user/profile/profile.rb +8 -8
- data/lib/user.rb +1 -1
- metadata +10 -4
data/lib/pub.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require_relative './client.rb'
|
3
|
-
require_relative './mints_helper.rb'
|
3
|
+
require_relative './mints/helpers/mints_helper.rb'
|
4
4
|
|
5
5
|
module Mints
|
6
6
|
##
|
@@ -125,7 +125,7 @@ module Mints
|
|
125
125
|
# ==== Example
|
126
126
|
# @data = @mints_pub.register_visit_timer("60da2325d29acc7e55684472", 4)
|
127
127
|
def register_visit_timer(visit, time)
|
128
|
-
|
128
|
+
@client.raw("get", "/register-visit-timer?visit=#{visit}&time=#{time}")
|
129
129
|
end
|
130
130
|
|
131
131
|
### V1/CONTENT ###
|
@@ -140,7 +140,7 @@ module Mints
|
|
140
140
|
# ==== Example
|
141
141
|
# @data = @mints_pub.get_asset_info("asset_slug")
|
142
142
|
def get_asset_info(slug)
|
143
|
-
|
143
|
+
@client.raw("get", "/content/asset-info/#{slug}")
|
144
144
|
end
|
145
145
|
|
146
146
|
##
|
@@ -183,7 +183,7 @@ module Mints
|
|
183
183
|
# ==== Second Example
|
184
184
|
# @data = @mints_pub.get_story("story_slug", options.to_json)
|
185
185
|
def get_story(slug, options = nil)
|
186
|
-
|
186
|
+
@client.raw("get", "/content/stories/#{slug}", options)
|
187
187
|
end
|
188
188
|
|
189
189
|
##
|
@@ -226,7 +226,7 @@ module Mints
|
|
226
226
|
# ==== Second Example
|
227
227
|
# @data = @mints_pub.get_story_version("story_slug", options.to_json)
|
228
228
|
def get_story_version(slug, options = nil)
|
229
|
-
|
229
|
+
@client.raw("get", "/content/story-versions/#{slug}", options)
|
230
230
|
end
|
231
231
|
|
232
232
|
##
|
@@ -236,7 +236,7 @@ module Mints
|
|
236
236
|
# ==== Example
|
237
237
|
# @data = @mints_pub.get_forms
|
238
238
|
def get_forms(options = nil)
|
239
|
-
|
239
|
+
@client.raw("get", "/content/forms", options)
|
240
240
|
end
|
241
241
|
|
242
242
|
##
|
@@ -249,7 +249,7 @@ module Mints
|
|
249
249
|
# ==== Example
|
250
250
|
# @data = @mints_pub.get_form("form_slug")
|
251
251
|
def get_form(slug, options = nil)
|
252
|
-
|
252
|
+
@client.raw("get", "/content/forms/#{slug}", options)
|
253
253
|
end
|
254
254
|
|
255
255
|
##
|
@@ -270,7 +270,7 @@ module Mints
|
|
270
270
|
# }
|
271
271
|
# @data = @mints_pub.submit_form(data)
|
272
272
|
def submit_form(data)
|
273
|
-
|
273
|
+
@client.raw("post", "/content/forms/submit", nil, data_transform(data))
|
274
274
|
end
|
275
275
|
|
276
276
|
##
|
@@ -293,7 +293,7 @@ module Mints
|
|
293
293
|
# }
|
294
294
|
# @data = @mints_pub.get_content_instances(options)
|
295
295
|
def get_content_instances(options)
|
296
|
-
|
296
|
+
@client.raw("get", "/content/content-instances", options)
|
297
297
|
end
|
298
298
|
|
299
299
|
##
|
@@ -306,7 +306,7 @@ module Mints
|
|
306
306
|
# ==== Example
|
307
307
|
# @data = @mints_pub.get_content_instance("content_instance_slug")
|
308
308
|
def get_content_instance(slug)
|
309
|
-
|
309
|
+
@client.raw("get", "/content/content-instances/#{slug}")
|
310
310
|
end
|
311
311
|
|
312
312
|
#Note: This method is commented for future use
|
@@ -317,7 +317,7 @@ module Mints
|
|
317
317
|
# ==== Parameters
|
318
318
|
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
319
319
|
# def get_content_pages(options = nil)
|
320
|
-
|
320
|
+
#@client.raw("get", "/content/content-pages", options)
|
321
321
|
#end
|
322
322
|
|
323
323
|
##
|
@@ -330,7 +330,7 @@ module Mints
|
|
330
330
|
# ==== Example
|
331
331
|
# @data = @mints_pub.get_content_page("test-page")
|
332
332
|
def get_content_page(slug, options = nil)
|
333
|
-
|
333
|
+
@client.raw("get", "/content/content-pages/#{slug}", options)
|
334
334
|
end
|
335
335
|
|
336
336
|
##
|
@@ -343,7 +343,7 @@ module Mints
|
|
343
343
|
# ==== Example
|
344
344
|
# @data = @mints_pub.get_content_page("test-page")
|
345
345
|
def get_content_bundle(slug, options = nil)
|
346
|
-
|
346
|
+
@client.raw("get", "/content/content-pages/#{slug}", options)
|
347
347
|
end
|
348
348
|
|
349
349
|
### V1/ECOMMERCE ###
|
@@ -409,7 +409,7 @@ module Mints
|
|
409
409
|
# }
|
410
410
|
# @data = @mints_pub.get_product("lego-set", options)
|
411
411
|
def get_product(slug, options = nil)
|
412
|
-
|
412
|
+
@client.raw("get", "/ecommerce/products/#{slug}", options)
|
413
413
|
end
|
414
414
|
|
415
415
|
### V1/CONFIG ###
|
@@ -435,7 +435,7 @@ module Mints
|
|
435
435
|
# }
|
436
436
|
# @data = @mints_pub.get_public_folders(options)
|
437
437
|
def get_public_folders(options)
|
438
|
-
|
438
|
+
@client.raw("get", "/config/public-folders", options)
|
439
439
|
end
|
440
440
|
|
441
441
|
##
|
@@ -459,7 +459,7 @@ module Mints
|
|
459
459
|
# }
|
460
460
|
# @data = @mints_pub.get_public_folder('yellow', options)
|
461
461
|
def get_public_folder(slug, options)
|
462
|
-
|
462
|
+
@client.raw("get", "/config/public-folders/#{slug}", options)
|
463
463
|
end
|
464
464
|
|
465
465
|
##
|
@@ -478,7 +478,7 @@ module Mints
|
|
478
478
|
# }
|
479
479
|
# @data = @mints_pub.get_tags(options)
|
480
480
|
def get_tags(options = nil)
|
481
|
-
|
481
|
+
@client.raw("get", "/config/tags", options)
|
482
482
|
end
|
483
483
|
|
484
484
|
##
|
@@ -498,7 +498,7 @@ module Mints
|
|
498
498
|
# }
|
499
499
|
# @data = @mints_pub.get_tag("velit-0", options)
|
500
500
|
def get_tag(slug, options = nil)
|
501
|
-
|
501
|
+
@client.raw("get", "/config/tags/#{slug}", options)
|
502
502
|
end
|
503
503
|
|
504
504
|
##
|
@@ -544,7 +544,7 @@ module Mints
|
|
544
544
|
# }
|
545
545
|
# @data = @mints_pub.get_taxonomy("taxonomy_slug", options)
|
546
546
|
def get_taxonomy(slug, options = nil)
|
547
|
-
|
547
|
+
@client.raw("get", "/config/taxonomies/#{slug}", options)
|
548
548
|
end
|
549
549
|
|
550
550
|
##
|
@@ -554,7 +554,7 @@ module Mints
|
|
554
554
|
# ==== Example
|
555
555
|
# @data = @mints_pub.get_attributes
|
556
556
|
def get_attributes
|
557
|
-
|
557
|
+
@client.raw("get", "/config/attributes")
|
558
558
|
end
|
559
559
|
|
560
560
|
def send_user_magic_link(email_or_phone, template_slug, redirect_url = '', life_time = 1440, max_visits = nil, driver = 'email')
|
@@ -570,7 +570,7 @@ module Mints
|
|
570
570
|
else
|
571
571
|
data['email'] = email_or_phone
|
572
572
|
end
|
573
|
-
|
573
|
+
@client.raw("post", "/users/magic-link", nil, { data: data }.to_json, '/api/v1')
|
574
574
|
end
|
575
575
|
|
576
576
|
private
|
data/lib/user/config/api_keys.rb
CHANGED
@@ -16,7 +16,7 @@ module ApiKeys
|
|
16
16
|
# options = { "fields": "id" }
|
17
17
|
# @data = @mints_user.get_api_keys(options)
|
18
18
|
def get_api_keys(options = nil)
|
19
|
-
|
19
|
+
@client.raw("get", "/config/api-keys", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
# === Get api key.
|
@@ -33,7 +33,7 @@ module ApiKeys
|
|
33
33
|
# options = { "fields": "id" }
|
34
34
|
# @data = @mints_user.get_api_key(2, options)
|
35
35
|
def get_api_key(id, options = nil)
|
36
|
-
|
36
|
+
@client.raw("get", "/config/api-keys/#{id}", options)
|
37
37
|
end
|
38
38
|
|
39
39
|
# === Create api key.
|
@@ -48,7 +48,7 @@ module ApiKeys
|
|
48
48
|
# }
|
49
49
|
# @data = @mints_user.create_api_key(data)
|
50
50
|
def create_api_key(data)
|
51
|
-
|
51
|
+
@client.raw("post", "/config/api-keys", nil, data_transform(data))
|
52
52
|
end
|
53
53
|
|
54
54
|
# === Delete api key.
|
@@ -60,6 +60,6 @@ module ApiKeys
|
|
60
60
|
# ==== Example
|
61
61
|
# @data = @mints_user.delete_api_key(2)
|
62
62
|
def delete_api_key(id)
|
63
|
-
|
63
|
+
@client.raw("delete", "/config/api-keys/#{id}")
|
64
64
|
end
|
65
65
|
end
|
@@ -18,7 +18,7 @@ module Appointments
|
|
18
18
|
# }
|
19
19
|
# @data = @mints_user.get_appointments(options)
|
20
20
|
def get_appointments(options = nil)
|
21
|
-
|
21
|
+
@client.raw("get", "/config/appointments", options)
|
22
22
|
end
|
23
23
|
|
24
24
|
# === Get appointment.
|
@@ -37,7 +37,7 @@ module Appointments
|
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_appointment(1, options)
|
39
39
|
def get_appointment(id, options = nil)
|
40
|
-
|
40
|
+
@client.raw("get", "/config/appointments/#{id}", options)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create appointment.
|
@@ -57,7 +57,7 @@ module Appointments
|
|
57
57
|
# }
|
58
58
|
# @data = @mints_user.create_appointment(data)
|
59
59
|
def create_appointment(data)
|
60
|
-
|
60
|
+
@client.raw("post", "/config/appointments", nil, data_transform(data))
|
61
61
|
end
|
62
62
|
|
63
63
|
# === Update appointment.
|
@@ -73,7 +73,7 @@ module Appointments
|
|
73
73
|
# }
|
74
74
|
# @data = @mints_user.update_appointment(1, data)
|
75
75
|
def update_appointment(id, data)
|
76
|
-
|
76
|
+
@client.raw("put", "/config/appointments/#{id}", nil, data_transform(data))
|
77
77
|
end
|
78
78
|
|
79
79
|
# === Delete appointment.
|
@@ -85,7 +85,7 @@ module Appointments
|
|
85
85
|
# ==== Example
|
86
86
|
# @data = @mints_user.delete_appointment(1)
|
87
87
|
def delete_appointment(id)
|
88
|
-
|
88
|
+
@client.raw("delete", "/config/appointments/#{id}")
|
89
89
|
end
|
90
90
|
|
91
91
|
# === Scheduled appointments.
|
@@ -103,7 +103,7 @@ module Appointments
|
|
103
103
|
# }
|
104
104
|
# @data = @mints_user.scheduled_appointments(data)
|
105
105
|
def scheduled_appointments(data)
|
106
|
-
|
106
|
+
@client.raw("post", "/config/appointments/scheduled-appointments", nil, data_transform(data))
|
107
107
|
end
|
108
108
|
|
109
109
|
# === Reschedule appointment.
|
@@ -120,7 +120,7 @@ module Appointments
|
|
120
120
|
# }
|
121
121
|
# @data = @mints_user.reschedule_appointment(data)
|
122
122
|
def reschedule_appointment(data)
|
123
|
-
|
123
|
+
@client.raw("post", "/config/appointments/reschedule-appointment", nil, data_transform(data))
|
124
124
|
end
|
125
125
|
|
126
126
|
# === Attach invitee.
|
@@ -136,7 +136,7 @@ module Appointments
|
|
136
136
|
# }
|
137
137
|
# @data = @mints_user.attach_invitee(data)
|
138
138
|
def attach_invitee(data)
|
139
|
-
|
139
|
+
@client.raw("post", "/config/appointments/attach-invitee", nil, data_transform(data))
|
140
140
|
end
|
141
141
|
|
142
142
|
# === Attach follower.
|
@@ -152,7 +152,7 @@ module Appointments
|
|
152
152
|
# }
|
153
153
|
# @data = @mints_user.attach_follower(data)
|
154
154
|
def attach_follower(data)
|
155
|
-
|
155
|
+
@client.raw("post", "/config/appointments/attach-follower", nil, data_transform(data))
|
156
156
|
end
|
157
157
|
|
158
158
|
# === Detach invitee.
|
@@ -168,7 +168,7 @@ module Appointments
|
|
168
168
|
# }
|
169
169
|
# @data = @mints_user.detach_invitee(data)
|
170
170
|
def detach_invitee(data)
|
171
|
-
|
171
|
+
@client.raw("post", "/config/appointments/detach-invitee", nil, data_transform(data))
|
172
172
|
end
|
173
173
|
|
174
174
|
# === Detach follower.
|
@@ -184,7 +184,7 @@ module Appointments
|
|
184
184
|
# }
|
185
185
|
# @data = @mints_user.detach_follower(data)
|
186
186
|
def detach_follower(data)
|
187
|
-
|
187
|
+
@client.raw("post", "/config/appointments/detach-follower", nil, data_transform(data))
|
188
188
|
end
|
189
189
|
|
190
190
|
# === Sync invitee.
|
@@ -200,7 +200,7 @@ module Appointments
|
|
200
200
|
# }
|
201
201
|
# @data = @mints_user.sync_invitee(data)
|
202
202
|
def sync_invitee(data)
|
203
|
-
|
203
|
+
@client.raw("post", "/config/appointments/sync-invitee", nil, data_transform(data))
|
204
204
|
end
|
205
205
|
|
206
206
|
# === Sync follower.
|
@@ -216,6 +216,6 @@ module Appointments
|
|
216
216
|
# }
|
217
217
|
# @data = @mints_user.sync_follower(data)
|
218
218
|
def sync_follower(data)
|
219
|
-
|
219
|
+
@client.raw("post", "/config/appointments/sync-follower", nil, data_transform(data))
|
220
220
|
end
|
221
221
|
end
|
@@ -9,7 +9,7 @@ module AttributeGroups
|
|
9
9
|
# ==== Example
|
10
10
|
# @data = @mints_user.get_attribute_groups_data_types
|
11
11
|
def get_attribute_groups_data_types
|
12
|
-
|
12
|
+
@client.raw("get", "/config/attribute-groups/object-types")
|
13
13
|
end
|
14
14
|
|
15
15
|
# === Get attribute groups.
|
@@ -25,7 +25,7 @@ module AttributeGroups
|
|
25
25
|
# options = { "sort": "id" }
|
26
26
|
# @data = @mints_user.get_attribute_groups(options)
|
27
27
|
def get_attribute_groups(options = nil)
|
28
|
-
|
28
|
+
@client.raw("get", "/config/attribute-groups", options)
|
29
29
|
end
|
30
30
|
|
31
31
|
# === Get attribute group.
|
@@ -37,7 +37,7 @@ module AttributeGroups
|
|
37
37
|
# ==== Example
|
38
38
|
# @data = @mints_user.get_attribute_group(10)
|
39
39
|
def get_attribute_group(id)
|
40
|
-
|
40
|
+
@client.raw("get", "/config/attribute-groups/#{id}")
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create attribute group.
|
@@ -53,7 +53,7 @@ module AttributeGroups
|
|
53
53
|
# }
|
54
54
|
# @data = @mints_user.create_attribute_group(data)
|
55
55
|
def create_attribute_group(data)
|
56
|
-
|
56
|
+
@client.raw("post", "/config/attribute-groups", nil, data_transform(data))
|
57
57
|
end
|
58
58
|
|
59
59
|
# === Update attribute group.
|
@@ -72,6 +72,6 @@ module AttributeGroups
|
|
72
72
|
# }
|
73
73
|
# @data = @mints_user.update_attribute_group(36, data)
|
74
74
|
def update_attribute_group(id, data)
|
75
|
-
|
75
|
+
@client.raw("put", "/config/attribute-groups/#{id}", nil, data_transform(data))
|
76
76
|
end
|
77
77
|
end
|
@@ -9,7 +9,7 @@ module Attributes
|
|
9
9
|
# ==== Example
|
10
10
|
# @data = @mints_user.get_attributes_data_types
|
11
11
|
def get_attributes_data_types
|
12
|
-
|
12
|
+
@client.raw("get", "/config/attributes/data-types")
|
13
13
|
end
|
14
14
|
|
15
15
|
# === Get sub attributes.
|
@@ -21,7 +21,7 @@ module Attributes
|
|
21
21
|
# ==== Example
|
22
22
|
#
|
23
23
|
def get_sub_attributes(options) #TODO: Test, this method has been added recently
|
24
|
-
|
24
|
+
@client.raw("get", "/config/attributes/sub-attributes", options)
|
25
25
|
end
|
26
26
|
|
27
27
|
# === Get attributes.
|
@@ -30,7 +30,7 @@ module Attributes
|
|
30
30
|
# ==== Example
|
31
31
|
# @data = @mints_user.get_attributes
|
32
32
|
def get_attributes
|
33
|
-
|
33
|
+
@client.raw("get", "/config/attributes")
|
34
34
|
end
|
35
35
|
|
36
36
|
# === Get attribute.
|
@@ -42,7 +42,7 @@ module Attributes
|
|
42
42
|
# ==== Example
|
43
43
|
# @data = @mints_user.get_attribute(1)
|
44
44
|
def get_attribute(id)
|
45
|
-
|
45
|
+
@client.raw("get", "/config/attributes/#{id}")
|
46
46
|
end
|
47
47
|
|
48
48
|
# === Create attribute.
|
@@ -61,7 +61,7 @@ module Attributes
|
|
61
61
|
# }
|
62
62
|
# @data = @mints_user.create_attribute(data)
|
63
63
|
def create_attribute(data)
|
64
|
-
|
64
|
+
@client.raw("post", "/config/attributes", nil, data_transform(data))
|
65
65
|
end
|
66
66
|
|
67
67
|
# === Update attribute.
|
@@ -81,6 +81,6 @@ module Attributes
|
|
81
81
|
# }
|
82
82
|
# @data = @mints_user.update_attribute(292, data)
|
83
83
|
def update_attribute(id, data)
|
84
|
-
|
84
|
+
@client.raw("put", "/config/attributes/#{id}", nil, data_transform(data))
|
85
85
|
end
|
86
86
|
end
|
@@ -18,7 +18,7 @@ module Calendars
|
|
18
18
|
# }
|
19
19
|
# @data = @mints_user.get_calendars(options)
|
20
20
|
def get_calendars(options = nil)
|
21
|
-
|
21
|
+
@client.raw("get", "/config/calendars", options)
|
22
22
|
end
|
23
23
|
|
24
24
|
# === Get calendar.
|
@@ -37,7 +37,7 @@ module Calendars
|
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_calendar(1, options)
|
39
39
|
def get_calendar(id, options = nil)
|
40
|
-
|
40
|
+
@client.raw("get", "/config/calendars/#{id}", options)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Create calendar.
|
@@ -54,7 +54,7 @@ module Calendars
|
|
54
54
|
# }
|
55
55
|
# @data = @mints_user.create_calendar(data)
|
56
56
|
def create_calendar(data)
|
57
|
-
|
57
|
+
@client.raw("post", "/config/calendars", nil, data_transform(data))
|
58
58
|
end
|
59
59
|
|
60
60
|
# === Update calendar.
|
@@ -72,7 +72,7 @@ module Calendars
|
|
72
72
|
# }
|
73
73
|
# @data = @mints_user.update_calendar(4, data)
|
74
74
|
def update_calendar(id, data)
|
75
|
-
|
75
|
+
@client.raw("put", "/config/calendars/#{id}", nil, data_transform(data))
|
76
76
|
end
|
77
77
|
|
78
78
|
# === Delete calendar.
|
@@ -84,6 +84,6 @@ module Calendars
|
|
84
84
|
# ==== Example
|
85
85
|
# @data = @mints_user.delete_calendar(4)
|
86
86
|
def delete_calendar(id)
|
87
|
-
|
87
|
+
@client.raw("delete", "/config/calendars/#{id}")
|
88
88
|
end
|
89
89
|
end
|
data/lib/user/config/config.rb
CHANGED
@@ -36,30 +36,30 @@ module Config
|
|
36
36
|
#
|
37
37
|
|
38
38
|
# def sync_categories_for_object(data)
|
39
|
-
#
|
39
|
+
# @client.raw("put", "/config/categories/sync_categories_for_object", nil, data)
|
40
40
|
#end
|
41
41
|
|
42
42
|
# def get_categories_for_object(options)
|
43
|
-
#
|
43
|
+
# @client.raw("get", "/config/categories/get_categories_for_object", options)
|
44
44
|
#end
|
45
45
|
|
46
46
|
# def get_categories
|
47
|
-
#
|
47
|
+
# @client.raw("get", "/config/categories")
|
48
48
|
#end
|
49
49
|
|
50
50
|
# def create_category(data) #TODO: Research if 'visible' is a boolean or int. It accepts smallint
|
51
|
-
#
|
51
|
+
# @client.raw("post", "/config/categories", nil, data)
|
52
52
|
#end
|
53
53
|
|
54
54
|
# def update_category(id, data)
|
55
|
-
#
|
55
|
+
# @client.raw("put", "/config/categories/#{id}", nil, data)
|
56
56
|
#end
|
57
57
|
|
58
58
|
# def get_category_support_data(id)
|
59
|
-
#
|
59
|
+
# @client.raw("get", "/config/categories/support-data/#{id}")
|
60
60
|
#end
|
61
61
|
|
62
62
|
# def get_category(id)
|
63
|
-
#
|
63
|
+
# @client.raw("get", "/config/categories/#{id}")
|
64
64
|
#end
|
65
65
|
end
|
@@ -13,7 +13,7 @@ module Importers
|
|
13
13
|
# options = { "ip_id": 1 }
|
14
14
|
# @data = @mints_user.get_importers_results(options)
|
15
15
|
def get_importers_results(options) #FIXME: Query doesnt get results. Maybe no data in db.
|
16
|
-
|
16
|
+
@client.raw("get", "/config/importers/results", options)
|
17
17
|
end
|
18
18
|
|
19
19
|
# === Get importers configuration.
|
@@ -22,7 +22,7 @@ module Importers
|
|
22
22
|
# ==== Example
|
23
23
|
# @data = @mints_user.get_importers_configuration
|
24
24
|
def get_importers_configuration
|
25
|
-
|
25
|
+
@client.raw("get", "/config/importers/configuration")
|
26
26
|
end
|
27
27
|
|
28
28
|
# === Get importing process status.
|
@@ -37,7 +37,7 @@ module Importers
|
|
37
37
|
# }
|
38
38
|
# @data = @mints_user.get_importing_process_status(options)
|
39
39
|
def get_importing_process_status(options = nil)
|
40
|
-
|
40
|
+
@client.raw("get", "/config/importers/importing_process_status", options)
|
41
41
|
end
|
42
42
|
|
43
43
|
# === Get importers attributes.
|
@@ -53,7 +53,7 @@ module Importers
|
|
53
53
|
# }
|
54
54
|
# @data = @mints_user.get_importers_attributes(options)
|
55
55
|
def get_importers_attributes(options = nil)
|
56
|
-
|
56
|
+
@client.raw("get", "/config/importers/attributes", options)
|
57
57
|
end
|
58
58
|
|
59
59
|
# === Upload importer.
|
@@ -69,7 +69,7 @@ module Importers
|
|
69
69
|
# }
|
70
70
|
# @data = @mints_user.upload_importer(1, data.to_json)
|
71
71
|
def upload_importer(id, data) #TODO: Search for csv archives
|
72
|
-
|
72
|
+
@client.raw("post", "/config/importers/#{id}/upload", nil, data)
|
73
73
|
end
|
74
74
|
|
75
75
|
# === Import row.
|
@@ -81,7 +81,7 @@ module Importers
|
|
81
81
|
# ==== Example
|
82
82
|
#
|
83
83
|
def import_row(data) #TODO: Research use
|
84
|
-
|
84
|
+
@client.raw("post", "/config/importers/import_row", nil, data)
|
85
85
|
end
|
86
86
|
|
87
87
|
# === Remove importers active process.
|
@@ -93,7 +93,7 @@ module Importers
|
|
93
93
|
# ==== Example
|
94
94
|
#
|
95
95
|
def remove_importers_active_process(data) #FIXME: Cannot get property 'active_importing_process' of non-object.
|
96
|
-
|
96
|
+
@client.raw("post", "/config/importers/removeActiveProcess", nil, data_transform(data))
|
97
97
|
end
|
98
98
|
|
99
99
|
# === Get importers.
|
@@ -109,7 +109,7 @@ module Importers
|
|
109
109
|
# options = { "fields": "name" }
|
110
110
|
# @data = @mints_user.get_importers(options)
|
111
111
|
def get_importers(options = nil)
|
112
|
-
|
112
|
+
@client.raw("get", "/config/importers", options)
|
113
113
|
end
|
114
114
|
|
115
115
|
# === Get importer.
|
@@ -126,7 +126,7 @@ module Importers
|
|
126
126
|
# options = { "fields": "name" }
|
127
127
|
# @data = @mints_user.get_importer(1, options)
|
128
128
|
def get_importer(id, options = nil)
|
129
|
-
|
129
|
+
@client.raw("get", "/config/importers/#{id}", options)
|
130
130
|
end
|
131
131
|
|
132
132
|
# === Create importer.
|
@@ -142,7 +142,7 @@ module Importers
|
|
142
142
|
# }
|
143
143
|
# @data = @mints_user.create_importer(data)
|
144
144
|
def create_importer(data)
|
145
|
-
|
145
|
+
@client.raw("post", "/config/importers", nil, data_transform(data))
|
146
146
|
end
|
147
147
|
|
148
148
|
# === Update importer.
|
@@ -158,7 +158,7 @@ module Importers
|
|
158
158
|
# }
|
159
159
|
# @data = @mints_user.update_importer(4, data)
|
160
160
|
def update_importer(id, data)
|
161
|
-
|
161
|
+
@client.raw("put", "/config/importers/#{id}", nil, data_transform(data))
|
162
162
|
end
|
163
163
|
|
164
164
|
# === Delete importer.
|
@@ -170,7 +170,7 @@ module Importers
|
|
170
170
|
# ==== Example
|
171
171
|
# @data = @mints_user.delete_importer(4)
|
172
172
|
def delete_importer(id)
|
173
|
-
|
173
|
+
@client.raw("delete", "/config/importers/#{id}")
|
174
174
|
end
|
175
175
|
|
176
176
|
# === Get importers pusher key.
|
@@ -179,6 +179,6 @@ module Importers
|
|
179
179
|
# ==== Example
|
180
180
|
# @data = @mints_user.get_importers_pusher_key
|
181
181
|
def get_importers_pusher_key
|
182
|
-
|
182
|
+
@client.raw("get", "/config/pusher_key")
|
183
183
|
end
|
184
184
|
end
|