mints 0.0.18 → 0.0.19
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 +38 -32
- data/lib/contact.rb +65 -60
- data/lib/mints/controllers/base_api_controller.rb +4 -4
- data/lib/mints/controllers/base_controller.rb +12 -3
- data/lib/mints_helper.rb +47 -0
- data/lib/pub.rb +75 -87
- data/lib/user/config/api_keys.rb +65 -0
- data/lib/user/config/appointments.rb +221 -0
- data/lib/user/config/attribute_groups.rb +77 -0
- data/lib/user/config/attributes.rb +86 -0
- data/lib/user/config/calendars.rb +89 -0
- data/lib/user/config/config.rb +65 -0
- data/lib/user/config/importers.rb +184 -0
- data/lib/user/config/public_folders.rb +108 -0
- data/lib/user/config/relationships.rb +138 -0
- data/lib/user/config/roles.rb +84 -0
- data/lib/user/config/seeds.rb +14 -0
- data/lib/user/config/system_settings.rb +53 -0
- data/lib/user/config/tags.rb +63 -0
- data/lib/user/config/taxonomies.rb +124 -0
- data/lib/user/config/teams.rb +70 -0
- data/lib/user/config/users.rb +76 -0
- data/lib/user/contacts/contacts.rb +21 -0
- data/lib/user/content/assets.rb +98 -0
- data/lib/user/content/content.rb +235 -0
- data/lib/user/content/content_instances.rb +147 -0
- data/lib/user/content/content_templates.rb +111 -0
- data/lib/user/content/conversations.rb +174 -0
- data/lib/user/content/dam.rb +88 -0
- data/lib/user/content/forms.rb +168 -0
- data/lib/user/content/message_templates.rb +162 -0
- data/lib/user/content/messages.rb +90 -0
- data/lib/user/content/pages.rb +81 -0
- data/lib/user/content/stories.rb +164 -0
- data/lib/user/content/story_templates.rb +95 -0
- data/lib/user/crm/companies.rb +111 -0
- data/lib/user/crm/contacts.rb +312 -0
- data/lib/user/crm/crm.rb +21 -0
- data/lib/user/crm/deals.rb +111 -0
- data/lib/user/crm/favorites.rb +17 -0
- data/lib/user/crm/segments.rb +132 -0
- data/lib/user/crm/users.rb +22 -0
- data/lib/user/crm/workflow_step_objects.rb +89 -0
- data/lib/user/crm/workflow_steps.rb +49 -0
- data/lib/user/crm/workflows.rb +70 -0
- data/lib/user/ecommerce/ecommerce.rb +29 -0
- data/lib/user/ecommerce/item_prices.rb +86 -0
- data/lib/user/ecommerce/locations.rb +166 -0
- data/lib/user/ecommerce/order_items_groups.rb +109 -0
- data/lib/user/ecommerce/order_statuses.rb +26 -0
- data/lib/user/ecommerce/orders.rb +258 -0
- data/lib/user/ecommerce/price_lists.rb +73 -0
- data/lib/user/ecommerce/product_templates.rb +104 -0
- data/lib/user/ecommerce/product_variations.rb +129 -0
- data/lib/user/ecommerce/products.rb +169 -0
- data/lib/user/ecommerce/skus.rb +88 -0
- data/lib/user/ecommerce/taxes.rb +82 -0
- data/lib/user/ecommerce/variant_options.rb +69 -0
- data/lib/user/ecommerce/variant_values.rb +72 -0
- data/lib/user/helpers/helpers.rb +113 -0
- data/lib/user/helpers/object_activities.rb +83 -0
- data/lib/user/helpers/object_folders.rb +82 -0
- data/lib/user/helpers/user_folders.rb +83 -0
- data/lib/user/marketing/marketing.rb +120 -0
- data/lib/user/profile/profile.rb +111 -0
- data/lib/user.rb +22 -922
- metadata +61 -1
data/lib/pub.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require_relative './client.rb'
|
3
|
+
require_relative './mints_helper.rb'
|
4
|
+
|
3
5
|
module Mints
|
4
6
|
##
|
5
7
|
# == Public context API
|
@@ -70,39 +72,38 @@ module Mints
|
|
70
72
|
|
71
73
|
class Pub
|
72
74
|
attr_reader :client
|
73
|
-
|
74
75
|
##
|
75
76
|
# === Initialize.
|
76
|
-
# Class constructor
|
77
|
+
# Class constructor.
|
77
78
|
#
|
78
79
|
# ==== Parameters
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
80
|
+
# host:: (String) -- It's the visitor IP.
|
81
|
+
# api_key:: (String) -- Mints instance api key.
|
82
|
+
# contact_token_id:: (Integer) -- Cookie 'mints_contact_id' value (mints_contact_token).
|
83
|
+
#
|
82
84
|
# ==== Return
|
83
|
-
# Returns a Client object
|
85
|
+
# Returns a Client object.
|
84
86
|
def initialize(host, api_key, contact_token_id = nil, debug = false)
|
85
87
|
@client = Mints::Client.new(host, api_key, 'public', nil, contact_token_id, debug)
|
86
88
|
end
|
87
89
|
|
88
90
|
##
|
89
91
|
# === Register Visit.
|
90
|
-
# Register a ghost/contact visit in Mints.Cloud
|
92
|
+
# Register a ghost/contact visit in Mints.Cloud.
|
91
93
|
#
|
92
94
|
# ==== Parameters
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
95
|
+
# request:: (ActionDispatch::Request) -- request.
|
96
|
+
# ip:: (String) -- It's the visitor IP.
|
97
|
+
# user_agent:: (String) -- The visitor's browser user agent.
|
98
|
+
# url:: (String) -- URL visited.
|
97
99
|
#
|
98
100
|
# ==== Example
|
99
101
|
# request = {
|
100
|
-
# "remote_ip" => "http://
|
102
|
+
# "remote_ip" => "http://1.1.1.1/",
|
101
103
|
# "user_agent" => "User Agent",
|
102
|
-
# "fullpath" => "https://
|
104
|
+
# "fullpath" => "https://fullpath/example"
|
103
105
|
# }
|
104
106
|
# @mints_pub.register_visit(request, request["remote_ip"], request["user_agent"], request["fullpath"])
|
105
|
-
#
|
106
107
|
def register_visit(request, ip = nil, user_agent = nil, url = nil)
|
107
108
|
data = {
|
108
109
|
ip_address: ip || request.remote_ip,
|
@@ -115,43 +116,40 @@ module Mints
|
|
115
116
|
|
116
117
|
##
|
117
118
|
# === Register Visit timer.
|
118
|
-
# Register a page visit time
|
119
|
+
# Register a page visit time.
|
119
120
|
#
|
120
121
|
# ==== Parameters
|
121
|
-
#
|
122
|
-
#
|
122
|
+
# visit:: (String) -- It's the visitor IP.
|
123
|
+
# time:: (Integer) -- The visitor's browser user agent.
|
123
124
|
#
|
124
125
|
# ==== Example
|
125
126
|
# @mints_pub.register_visit_timer("60da2325d29acc7e55684472", 4)
|
126
|
-
#
|
127
127
|
def register_visit_timer(visit, time)
|
128
128
|
return @client.raw("get", "/register-visit-timer?visit=#{visit}&time=#{time}")
|
129
129
|
end
|
130
130
|
|
131
131
|
##
|
132
132
|
# === Get Asset Info.
|
133
|
-
# Get a description of an Asset
|
133
|
+
# Get a description of an Asset.
|
134
134
|
#
|
135
135
|
# ==== Parameters
|
136
|
-
#
|
136
|
+
# slug:: (String) -- It's the string identifier of the asset.
|
137
137
|
#
|
138
138
|
# ==== Example
|
139
|
-
# @mints_pub.get_asset_info("
|
140
|
-
#
|
139
|
+
# @mints_pub.get_asset_info("asset_slug")
|
141
140
|
def get_asset_info(slug)
|
142
141
|
return @client.raw("get", "/content/asset-info/#{slug}")
|
143
142
|
end
|
144
143
|
|
145
144
|
##
|
146
145
|
# === Get Stories.
|
147
|
-
# Get a collection of stories
|
146
|
+
# Get a collection of stories.
|
148
147
|
#
|
149
148
|
# ==== Parameters
|
150
|
-
#
|
149
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
151
150
|
#
|
152
151
|
# ==== Example
|
153
152
|
# @mints_pub.get_stories
|
154
|
-
#
|
155
153
|
def get_stories(options = nil)
|
156
154
|
return @client.raw("get", "/content/stories", options)
|
157
155
|
end
|
@@ -161,26 +159,24 @@ module Mints
|
|
161
159
|
# Get a single story.
|
162
160
|
#
|
163
161
|
# ==== Parameters
|
164
|
-
#
|
165
|
-
#
|
162
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
163
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
166
164
|
#
|
167
165
|
# ==== Example
|
168
|
-
# @mints_pub.get_story("
|
169
|
-
#
|
166
|
+
# @mints_pub.get_story("story_slug")
|
170
167
|
def get_story(slug, options = nil)
|
171
168
|
return @client.raw("get", "/content/stories/#{slug}", options)
|
172
169
|
end
|
173
170
|
|
174
171
|
##
|
175
172
|
# === Get Forms.
|
176
|
-
# Get a collection of forms
|
173
|
+
# Get a collection of forms.
|
177
174
|
#
|
178
175
|
# ==== Parameters
|
179
|
-
#
|
176
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
180
177
|
#
|
181
178
|
# ==== Example
|
182
179
|
# @mints_pub.get_forms
|
183
|
-
#
|
184
180
|
def get_forms(options = nil)
|
185
181
|
return @client.raw("get", "/content/forms", options)
|
186
182
|
end
|
@@ -190,35 +186,34 @@ module Mints
|
|
190
186
|
# Get a single form.
|
191
187
|
#
|
192
188
|
# ==== Parameters
|
193
|
-
#
|
194
|
-
#
|
189
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
190
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
195
191
|
#
|
196
192
|
# ==== Example
|
197
|
-
# @mints_pub.get_form("
|
198
|
-
#
|
193
|
+
# @mints_pub.get_form("form_slug")
|
199
194
|
def get_form(slug, options = nil)
|
200
195
|
return @client.raw("get", "/content/forms/#{slug}", options)
|
201
196
|
end
|
202
197
|
|
203
198
|
##
|
204
199
|
# === Submit Form.
|
205
|
-
# Submit a form.
|
200
|
+
# Submit a form with data.
|
206
201
|
#
|
207
202
|
# ==== Parameters
|
208
|
-
#
|
203
|
+
# data:: (Hash) -- Data to be submited.
|
209
204
|
#
|
210
205
|
# ==== Example
|
211
|
-
#
|
212
|
-
#
|
213
|
-
#
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
206
|
+
# data = {
|
207
|
+
# 'form_slug': 'form_slug',
|
208
|
+
# 'email': 'email@example.com',
|
209
|
+
# 'given_name': 'given_name',
|
210
|
+
# 'f1': 'Field 1 answer',
|
211
|
+
# 'f2': 'Field 2 answer',
|
212
|
+
# 'f3': 'Field 3 answer'
|
217
213
|
# }
|
218
|
-
# @mints_pub.submit_form(
|
219
|
-
#
|
214
|
+
# @data = @mints_pub.submit_form(data)
|
220
215
|
def submit_form(data)
|
221
|
-
return @client.raw("post", "/content/forms/submit", nil, data)
|
216
|
+
return @client.raw("post", "/content/forms/submit", nil, data_transform(data))
|
222
217
|
end
|
223
218
|
|
224
219
|
##
|
@@ -226,7 +221,7 @@ module Mints
|
|
226
221
|
# Get a collection of content instances. _Note:_ Options must be specified.
|
227
222
|
#
|
228
223
|
# ==== Parameters
|
229
|
-
#
|
224
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
230
225
|
def get_content_instances(options = nil)
|
231
226
|
return @client.raw("get", "/content/content-instances", options)
|
232
227
|
end
|
@@ -236,12 +231,11 @@ module Mints
|
|
236
231
|
# Get a single content instance.
|
237
232
|
#
|
238
233
|
# ==== Parameters
|
239
|
-
#
|
240
|
-
#
|
234
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
235
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
241
236
|
#
|
242
237
|
# ==== Example
|
243
|
-
# @mints_pub.get_content_instance("
|
244
|
-
#
|
238
|
+
# @mints_pub.get_content_instance("content_instance_slug")
|
245
239
|
def get_content_instance(slug, options = nil)
|
246
240
|
return @client.raw("get", "/content/content-instances/#{slug}", options)
|
247
241
|
end
|
@@ -251,22 +245,21 @@ module Mints
|
|
251
245
|
# Get all content pages.
|
252
246
|
#
|
253
247
|
# ==== Parameters
|
254
|
-
#
|
248
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
255
249
|
def get_content_pages(options = nil)
|
256
250
|
return @client.raw("get", "/content/content-pages", options)
|
257
251
|
end
|
258
252
|
|
259
253
|
##
|
260
254
|
# === Get Content Page.
|
261
|
-
# Get a single content page
|
255
|
+
# Get a single content page.
|
262
256
|
#
|
263
257
|
# ==== Parameters
|
264
|
-
#
|
265
|
-
#
|
258
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
259
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
266
260
|
#
|
267
261
|
# ==== Example
|
268
262
|
# @mints_pub.get_content_page("test-page")
|
269
|
-
#
|
270
263
|
def get_content_page(slug, options = nil)
|
271
264
|
return @client.raw("get", "/content/content-pages/#{slug}", options)
|
272
265
|
end
|
@@ -276,11 +269,10 @@ module Mints
|
|
276
269
|
# Get all locations.
|
277
270
|
#
|
278
271
|
# ==== Parameters
|
279
|
-
#
|
272
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
280
273
|
#
|
281
274
|
# ==== Example
|
282
275
|
# @mints_pub.get_locations
|
283
|
-
#
|
284
276
|
def get_locations(options = nil)
|
285
277
|
return @client.raw("get", "/ecommerce/locations", options)
|
286
278
|
end
|
@@ -290,11 +282,10 @@ module Mints
|
|
290
282
|
# Get a collection of products.
|
291
283
|
#
|
292
284
|
# ==== Parameters
|
293
|
-
#
|
285
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
294
286
|
#
|
295
287
|
# ==== Example
|
296
288
|
# @mints_pub.get_products
|
297
|
-
#
|
298
289
|
def get_products(options = nil)
|
299
290
|
return @client.raw("get", "/ecommerce/products", options)
|
300
291
|
end
|
@@ -304,12 +295,11 @@ module Mints
|
|
304
295
|
# Get a single product.
|
305
296
|
#
|
306
297
|
# ==== Parameters
|
307
|
-
#
|
308
|
-
#
|
298
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
299
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
309
300
|
#
|
310
301
|
# ==== Example
|
311
|
-
# @mints_pub.get_product("
|
312
|
-
#
|
302
|
+
# @mints_pub.get_product("product_slug")
|
313
303
|
def get_product(slug, options = nil)
|
314
304
|
return @client.raw("get", "/ecommerce/products/#{slug}", options)
|
315
305
|
end
|
@@ -319,7 +309,7 @@ module Mints
|
|
319
309
|
# Get a collection of categories.
|
320
310
|
#
|
321
311
|
# ==== Parameters
|
322
|
-
#
|
312
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
323
313
|
#
|
324
314
|
# ==== Example
|
325
315
|
# options = {
|
@@ -332,18 +322,17 @@ module Mints
|
|
332
322
|
|
333
323
|
##
|
334
324
|
# === Get Category.
|
335
|
-
# Get a single category
|
325
|
+
# Get a single category.
|
336
326
|
#
|
337
327
|
# ==== Parameters
|
338
|
-
#
|
339
|
-
#
|
328
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
329
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
340
330
|
#
|
341
331
|
# ==== Example
|
342
332
|
# options = {
|
343
333
|
# "object_type": "locations"
|
344
334
|
# }
|
345
|
-
# @mints_pub.get_category("
|
346
|
-
#
|
335
|
+
# @mints_pub.get_category("asset_slug", options)
|
347
336
|
def get_category(slug, options = nil)
|
348
337
|
return @client.raw("get", "/config/categories/#{slug}", options)
|
349
338
|
end
|
@@ -353,26 +342,24 @@ module Mints
|
|
353
342
|
# Get a collection of tags.
|
354
343
|
#
|
355
344
|
# ==== Parameters
|
356
|
-
#
|
345
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
357
346
|
#
|
358
347
|
# ==== Example
|
359
348
|
# @mints_pub.get_tags
|
360
|
-
#
|
361
349
|
def get_tags(options = nil)
|
362
350
|
return @client.raw("get", "/config/tags", options)
|
363
351
|
end
|
364
352
|
|
365
353
|
##
|
366
354
|
# === Get Tag.
|
367
|
-
# Get a single tag
|
355
|
+
# Get a single tag.
|
368
356
|
#
|
369
357
|
# ==== Parameters
|
370
|
-
#
|
371
|
-
#
|
358
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
359
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
372
360
|
#
|
373
361
|
# ==== Example
|
374
|
-
# @mints_pub.get_tag("
|
375
|
-
#
|
362
|
+
# @mints_pub.get_tag("tag_slug")
|
376
363
|
def get_tag(slug, options = nil)
|
377
364
|
return @client.raw("get", "/config/tags/#{slug}", options)
|
378
365
|
end
|
@@ -382,26 +369,24 @@ module Mints
|
|
382
369
|
# Get a collection of taxonomies.
|
383
370
|
#
|
384
371
|
# ==== Parameters
|
385
|
-
#
|
372
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
386
373
|
#
|
387
374
|
# ==== Example
|
388
375
|
# @mints_pub.get_taxonomies
|
389
|
-
#
|
390
376
|
def get_taxonomies(options = nil)
|
391
377
|
return @client.raw("get", "/config/taxonomies", options)
|
392
378
|
end
|
393
379
|
|
394
380
|
##
|
395
381
|
# === Get Taxonomy.
|
396
|
-
# Get a single taxonomy
|
382
|
+
# Get a single taxonomy.
|
397
383
|
#
|
398
384
|
# ==== Parameters
|
399
|
-
#
|
400
|
-
#
|
385
|
+
# slug:: (String) -- It's the string identifier generated by Mints.
|
386
|
+
# options:: (Hash) -- List of {Single Resource Options}[#class-Mints::Pub-label-Single+resource+options] shown above can be used as parameter.
|
401
387
|
#
|
402
388
|
# ==== Example
|
403
|
-
# @mints_pub.get_taxonomy("
|
404
|
-
#
|
389
|
+
# @mints_pub.get_taxonomy("taxonomy_slug")
|
405
390
|
def get_taxonomy(slug, options = nil)
|
406
391
|
return @client.raw("get", "/config/taxonomies/#{slug}", options)
|
407
392
|
end
|
@@ -411,13 +396,16 @@ module Mints
|
|
411
396
|
# Get a collection of attributes.
|
412
397
|
#
|
413
398
|
# ==== Parameters
|
414
|
-
#
|
399
|
+
# options:: (Hash) -- List of {Resource collection Options}[#class-Mints::Pub-label-Resource+collections+options+] shown above can be used as parameter.
|
415
400
|
#
|
416
401
|
# ==== Example
|
417
402
|
# @mints_pub.get_attributes
|
418
|
-
#
|
419
403
|
def get_attributes(options = nil)
|
420
404
|
return @client.raw("get", "/config/attributes", options)
|
421
405
|
end
|
406
|
+
|
407
|
+
private
|
408
|
+
|
409
|
+
include MintsHelper
|
422
410
|
end
|
423
411
|
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module ApiKeys
|
2
|
+
##
|
3
|
+
# == Api keys
|
4
|
+
#
|
5
|
+
|
6
|
+
# === Get api keys.
|
7
|
+
# Get a collection of api keys.
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
11
|
+
#
|
12
|
+
# ==== First Example
|
13
|
+
# @data = @mints_user.get_api_keys
|
14
|
+
#
|
15
|
+
# ==== Second Example
|
16
|
+
# options = { "fields": "id" }
|
17
|
+
# @data = @mints_user.get_api_keys(options)
|
18
|
+
def get_api_keys(options = nil)
|
19
|
+
return @client.raw("get", "/config/api-keys", options)
|
20
|
+
end
|
21
|
+
|
22
|
+
# === Get api key.
|
23
|
+
# Get an api key info.
|
24
|
+
#
|
25
|
+
# ==== Parameters
|
26
|
+
# id:: (Integer) -- Api key id.
|
27
|
+
# options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
|
28
|
+
#
|
29
|
+
# ==== First Example
|
30
|
+
# @data = @mints_user.get_api_key(2)
|
31
|
+
#
|
32
|
+
# ==== Second Example
|
33
|
+
# options = { "fields": "id" }
|
34
|
+
# @data = @mints_user.get_api_key(2, options)
|
35
|
+
def get_api_key(id, options = nil)
|
36
|
+
return @client.raw("get", "/config/api-keys/#{id}", options)
|
37
|
+
end
|
38
|
+
|
39
|
+
# === Create api key.
|
40
|
+
# Create an api key with data.
|
41
|
+
#
|
42
|
+
# ==== Parameters
|
43
|
+
# data:: (Hash) -- Data to be submited.
|
44
|
+
#
|
45
|
+
# ==== Example
|
46
|
+
# data = {
|
47
|
+
# "description": "New Api Key Description"
|
48
|
+
# }
|
49
|
+
# @data = @mints_user.create_api_key(data)
|
50
|
+
def create_api_key(data)
|
51
|
+
return @client.raw("post", "/config/api-keys", nil, data_transform(data))
|
52
|
+
end
|
53
|
+
|
54
|
+
# === Delete api key.
|
55
|
+
# Delete an api key.
|
56
|
+
#
|
57
|
+
# ==== Parameters
|
58
|
+
# id:: (Integer) -- Api key id.
|
59
|
+
#
|
60
|
+
# ==== Example
|
61
|
+
# @data = @mints_user.delete_api_key(2)
|
62
|
+
def delete_api_key(id)
|
63
|
+
return @client.raw("delete", "/config/api-keys/#{id}")
|
64
|
+
end
|
65
|
+
end
|