VoiceIt2 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VoiceIt2.rb +114 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d413ff004f6c63abba954a734f398cbb71405e6581b7d7fa33dcc3265206ce6
|
4
|
+
data.tar.gz: ca6b97c210f14ef7fa9e50530376fa8f172ddc26e2dbb1162e28d6d4b652820c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0c548608b098d2225973a1145fd37207a9eabfb8a20d05ab49df7a7a66b5edf955a6f39b8d2bdd489d4944ab59200107e4e6a0099f714cb40413a1d5e8b1f5d
|
7
|
+
data.tar.gz: '08e26bdd0a4249ca2ffb8f0f32727fb661b84c11d90cafef5bcab27638b7f868c8ed54e1ef2d41a248127e8d72cfecdab81911480459406e1426cce8c30219b2'
|
data/lib/VoiceIt2.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require '
|
2
|
+
require 'rest-client'
|
3
3
|
|
4
4
|
class VoiceIt2
|
5
5
|
|
@@ -14,7 +14,10 @@ class VoiceIt2
|
|
14
14
|
:method => :get,
|
15
15
|
:url => @BASE_URL.to_s + '/users',
|
16
16
|
:user => @api_key,
|
17
|
-
:password => @api_token
|
17
|
+
:password => @api_token,
|
18
|
+
:headers => {
|
19
|
+
platformId: '35'
|
20
|
+
}).execute
|
18
21
|
rescue => e
|
19
22
|
e.response
|
20
23
|
end
|
@@ -24,7 +27,10 @@ class VoiceIt2
|
|
24
27
|
:method => :post,
|
25
28
|
:url => @BASE_URL.to_s + '/users',
|
26
29
|
:user => @api_key,
|
27
|
-
:password => @api_token
|
30
|
+
:password => @api_token,
|
31
|
+
:headers => {
|
32
|
+
platformId: '35'
|
33
|
+
}).execute
|
28
34
|
rescue => e
|
29
35
|
e.response
|
30
36
|
end
|
@@ -34,7 +40,10 @@ class VoiceIt2
|
|
34
40
|
:method => :get,
|
35
41
|
:url => @BASE_URL.to_s + '/users/' + userId,
|
36
42
|
:user => @api_key,
|
37
|
-
:password => @api_token
|
43
|
+
:password => @api_token,
|
44
|
+
:headers => {
|
45
|
+
platformId: '35'
|
46
|
+
}).execute
|
38
47
|
rescue => e
|
39
48
|
e.response
|
40
49
|
end
|
@@ -44,7 +53,11 @@ class VoiceIt2
|
|
44
53
|
:method => :delete,
|
45
54
|
:url => @BASE_URL.to_s + '/users/' + userId,
|
46
55
|
:user => @api_key,
|
47
|
-
:password => @api_token
|
56
|
+
:password => @api_token,
|
57
|
+
:headers => {
|
58
|
+
platformId: '35'
|
59
|
+
}).execute
|
60
|
+
|
48
61
|
rescue => e
|
49
62
|
e.response
|
50
63
|
end
|
@@ -54,7 +67,11 @@ class VoiceIt2
|
|
54
67
|
:method => :get,
|
55
68
|
:url => @BASE_URL.to_s + '/users/' + userId + '/groups',
|
56
69
|
:user => @api_key,
|
57
|
-
:password => @api_token
|
70
|
+
:password => @api_token,
|
71
|
+
:headers => {
|
72
|
+
platformId: '35'
|
73
|
+
}).execute
|
74
|
+
|
58
75
|
rescue => e
|
59
76
|
e.response
|
60
77
|
end
|
@@ -64,7 +81,11 @@ class VoiceIt2
|
|
64
81
|
:method => :get,
|
65
82
|
:url => @BASE_URL.to_s + '/enrollments/' + userId,
|
66
83
|
:user => @api_key,
|
67
|
-
:password => @api_token
|
84
|
+
:password => @api_token,
|
85
|
+
:headers => {
|
86
|
+
platformId: '35'
|
87
|
+
}).execute
|
88
|
+
|
68
89
|
rescue => e
|
69
90
|
e.response
|
70
91
|
end
|
@@ -74,7 +95,11 @@ class VoiceIt2
|
|
74
95
|
:method => :delete,
|
75
96
|
:url => @BASE_URL.to_s + '/enrollments/' + userId + '/all',
|
76
97
|
:user => @api_key,
|
77
|
-
:password => @api_token
|
98
|
+
:password => @api_token,
|
99
|
+
:headers => {
|
100
|
+
platformId: '35'
|
101
|
+
}).execute
|
102
|
+
|
78
103
|
rescue => e
|
79
104
|
e.response
|
80
105
|
end
|
@@ -84,7 +109,11 @@ class VoiceIt2
|
|
84
109
|
:method => :get,
|
85
110
|
:url => @BASE_URL.to_s + '/enrollments/face/' + userId,
|
86
111
|
:user => @api_key,
|
87
|
-
:password => @api_token
|
112
|
+
:password => @api_token,
|
113
|
+
:headers => {
|
114
|
+
platformId: '35'
|
115
|
+
}).execute
|
116
|
+
|
88
117
|
rescue => e
|
89
118
|
e.response
|
90
119
|
end
|
@@ -95,6 +124,9 @@ class VoiceIt2
|
|
95
124
|
:url => @BASE_URL.to_s + '/enrollments',
|
96
125
|
:user => @api_key,
|
97
126
|
:password => @api_token,
|
127
|
+
:headers => {
|
128
|
+
platformId: '35'
|
129
|
+
},
|
98
130
|
:payload => {
|
99
131
|
:multipart => true,
|
100
132
|
:userId => userId,
|
@@ -111,6 +143,9 @@ class VoiceIt2
|
|
111
143
|
:url => @BASE_URL.to_s + '/enrollments/byUrl',
|
112
144
|
:user => @api_key,
|
113
145
|
:password => @api_token,
|
146
|
+
:headers => {
|
147
|
+
platformId: '35'
|
148
|
+
},
|
114
149
|
:payload => {
|
115
150
|
:multipart => true,
|
116
151
|
:userId => userId,
|
@@ -127,6 +162,9 @@ class VoiceIt2
|
|
127
162
|
:url => @BASE_URL.to_s + '/enrollments/face',
|
128
163
|
:user => @api_key,
|
129
164
|
:password => @api_token,
|
165
|
+
:headers => {
|
166
|
+
platformId: '35'
|
167
|
+
},
|
130
168
|
:payload => {
|
131
169
|
:multipart => true,
|
132
170
|
:userId => userId,
|
@@ -143,6 +181,9 @@ class VoiceIt2
|
|
143
181
|
:url => @BASE_URL.to_s + '/enrollments/video',
|
144
182
|
:user => @api_key,
|
145
183
|
:password => @api_token,
|
184
|
+
:headers => {
|
185
|
+
platformId: '35'
|
186
|
+
},
|
146
187
|
:payload => {
|
147
188
|
:multipart => true,
|
148
189
|
:userId => userId,
|
@@ -160,6 +201,9 @@ class VoiceIt2
|
|
160
201
|
:url => @BASE_URL.to_s + '/enrollments/video/byUrl',
|
161
202
|
:user => @api_key,
|
162
203
|
:password => @api_token,
|
204
|
+
:headers => {
|
205
|
+
platformId: '35'
|
206
|
+
},
|
163
207
|
:payload => {
|
164
208
|
:multipart => true,
|
165
209
|
:userId => userId,
|
@@ -176,7 +220,10 @@ class VoiceIt2
|
|
176
220
|
:method => :delete,
|
177
221
|
:url => @BASE_URL.to_s + '/enrollments/face/' + userId + '/' + faceEnrollmentId.to_s,
|
178
222
|
:user => @api_key,
|
179
|
-
:password => @api_token
|
223
|
+
:password => @api_token,
|
224
|
+
:headers => {
|
225
|
+
platformId: '35'
|
226
|
+
}).execute
|
180
227
|
rescue => e
|
181
228
|
e.response
|
182
229
|
end
|
@@ -186,7 +233,11 @@ class VoiceIt2
|
|
186
233
|
:method => :delete,
|
187
234
|
:url => @BASE_URL.to_s + '/enrollments/' + userId + '/' + enrollmentId.to_s,
|
188
235
|
:user => @api_key,
|
189
|
-
:password => @api_token
|
236
|
+
:password => @api_token,
|
237
|
+
:headers => {
|
238
|
+
platformId: '35'
|
239
|
+
}).execute
|
240
|
+
|
190
241
|
rescue => e
|
191
242
|
e.response
|
192
243
|
end
|
@@ -196,7 +247,10 @@ class VoiceIt2
|
|
196
247
|
:method => :get,
|
197
248
|
:url => @BASE_URL.to_s + '/groups',
|
198
249
|
:user => @api_key,
|
199
|
-
:password => @api_token
|
250
|
+
:password => @api_token,
|
251
|
+
:headers => {
|
252
|
+
platformId: '35'
|
253
|
+
}).execute
|
200
254
|
rescue => e
|
201
255
|
e.response
|
202
256
|
end
|
@@ -206,7 +260,10 @@ class VoiceIt2
|
|
206
260
|
:method => :get,
|
207
261
|
:url => @BASE_URL.to_s + '/groups/' + groupId,
|
208
262
|
:user => @api_key,
|
209
|
-
:password => @api_token
|
263
|
+
:password => @api_token,
|
264
|
+
:headers => {
|
265
|
+
platformId: '35'
|
266
|
+
}).execute
|
210
267
|
rescue => e
|
211
268
|
e.response
|
212
269
|
end
|
@@ -216,7 +273,10 @@ class VoiceIt2
|
|
216
273
|
:method => :get,
|
217
274
|
:url => @BASE_URL.to_s + '/groups/' + groupId + '/exists',
|
218
275
|
:user => @api_key,
|
219
|
-
:password => @api_token
|
276
|
+
:password => @api_token,
|
277
|
+
:headers => {
|
278
|
+
platformId: '35'
|
279
|
+
}).execute
|
220
280
|
rescue => e
|
221
281
|
e.response
|
222
282
|
end
|
@@ -227,6 +287,9 @@ class VoiceIt2
|
|
227
287
|
:url => @BASE_URL.to_s + '/groups',
|
228
288
|
:user => @api_key,
|
229
289
|
:password => @api_token,
|
290
|
+
:headers => {
|
291
|
+
platformId: '35'
|
292
|
+
},
|
230
293
|
:payload => {
|
231
294
|
:multipart => true,
|
232
295
|
:description => description
|
@@ -241,6 +304,9 @@ class VoiceIt2
|
|
241
304
|
:url => @BASE_URL.to_s + '/groups/addUser',
|
242
305
|
:user => @api_key,
|
243
306
|
:password => @api_token,
|
307
|
+
:headers => {
|
308
|
+
platformId: '35'
|
309
|
+
},
|
244
310
|
:payload => {
|
245
311
|
:multipart => true,
|
246
312
|
:groupId => groupId,
|
@@ -256,6 +322,9 @@ class VoiceIt2
|
|
256
322
|
:url => @BASE_URL.to_s + '/groups/removeUser',
|
257
323
|
:user => @api_key,
|
258
324
|
:password => @api_token,
|
325
|
+
:headers => {
|
326
|
+
platformId: '35'
|
327
|
+
},
|
259
328
|
:payload => {
|
260
329
|
:multipart => true,
|
261
330
|
:groupId => groupId,
|
@@ -270,7 +339,10 @@ class VoiceIt2
|
|
270
339
|
:method => :delete,
|
271
340
|
:url => @BASE_URL.to_s + '/groups/' + groupId,
|
272
341
|
:user => @api_key,
|
273
|
-
:password => @api_token
|
342
|
+
:password => @api_token,
|
343
|
+
:headers => {
|
344
|
+
platformId: '35'
|
345
|
+
}).execute
|
274
346
|
rescue => e
|
275
347
|
e.response
|
276
348
|
end
|
@@ -281,6 +353,9 @@ class VoiceIt2
|
|
281
353
|
:url => @BASE_URL.to_s + '/verification',
|
282
354
|
:user => @api_key,
|
283
355
|
:password => @api_token,
|
356
|
+
:headers => {
|
357
|
+
platformId: '35'
|
358
|
+
},
|
284
359
|
:payload => {
|
285
360
|
:multipart => true,
|
286
361
|
:userId => userId,
|
@@ -297,6 +372,9 @@ class VoiceIt2
|
|
297
372
|
:url => @BASE_URL.to_s + '/verification/byUrl',
|
298
373
|
:user => @api_key,
|
299
374
|
:password => @api_token,
|
375
|
+
:headers => {
|
376
|
+
platformId: '35'
|
377
|
+
},
|
300
378
|
:payload => {
|
301
379
|
:multipart => true,
|
302
380
|
:userId => userId,
|
@@ -313,6 +391,9 @@ class VoiceIt2
|
|
313
391
|
:url => @BASE_URL.to_s + '/verification/face',
|
314
392
|
:user => @api_key,
|
315
393
|
:password => @api_token,
|
394
|
+
:headers => {
|
395
|
+
platformId: '35'
|
396
|
+
},
|
316
397
|
:payload => {
|
317
398
|
:multipart => true,
|
318
399
|
:userId => userId,
|
@@ -329,6 +410,9 @@ class VoiceIt2
|
|
329
410
|
:url => @BASE_URL.to_s + '/verification/video',
|
330
411
|
:user => @api_key,
|
331
412
|
:password => @api_token,
|
413
|
+
:headers => {
|
414
|
+
platformId: '35'
|
415
|
+
},
|
332
416
|
:payload => {
|
333
417
|
:multipart => true,
|
334
418
|
:userId => userId,
|
@@ -346,6 +430,9 @@ class VoiceIt2
|
|
346
430
|
:url => @BASE_URL.to_s + '/verification/video/byUrl',
|
347
431
|
:user => @api_key,
|
348
432
|
:password => @api_token,
|
433
|
+
:headers => {
|
434
|
+
platformId: '35'
|
435
|
+
},
|
349
436
|
:payload => {
|
350
437
|
:multipart => true,
|
351
438
|
:userId => userId,
|
@@ -363,6 +450,9 @@ class VoiceIt2
|
|
363
450
|
:url => @BASE_URL.to_s + '/identification',
|
364
451
|
:user => @api_key,
|
365
452
|
:password => @api_token,
|
453
|
+
:headers => {
|
454
|
+
platformId: '35'
|
455
|
+
},
|
366
456
|
:payload => {
|
367
457
|
:multipart => true,
|
368
458
|
:groupId => groupId,
|
@@ -379,6 +469,9 @@ class VoiceIt2
|
|
379
469
|
:url => @BASE_URL.to_s + '/identification/byUrl',
|
380
470
|
:user => @api_key,
|
381
471
|
:password => @api_token,
|
472
|
+
:headers => {
|
473
|
+
platformId: '35'
|
474
|
+
},
|
382
475
|
:payload => {
|
383
476
|
:multipart => true,
|
384
477
|
:groupId => groupId,
|
@@ -395,6 +488,9 @@ class VoiceIt2
|
|
395
488
|
:url => @BASE_URL.to_s + '/identification/video',
|
396
489
|
:user => @api_key,
|
397
490
|
:password => @api_token,
|
491
|
+
:headers => {
|
492
|
+
platformId: '35'
|
493
|
+
},
|
398
494
|
:payload => {
|
399
495
|
:multipart => true,
|
400
496
|
:groupId => groupId,
|
@@ -412,6 +508,9 @@ class VoiceIt2
|
|
412
508
|
:url => @BASE_URL.to_s + '/identification/video/byUrl',
|
413
509
|
:user => @api_key,
|
414
510
|
:password => @api_token,
|
511
|
+
:headers => {
|
512
|
+
platformId: '35'
|
513
|
+
},
|
415
514
|
:payload => {
|
416
515
|
:multipart => true,
|
417
516
|
:groupId => groupId,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: VoiceIt2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StephenAkers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A wrapper fro VoiceIt's API 2
|
14
14
|
email: stephen@voiceit.io
|