VoiceIt2 1.0.4 → 1.0.5
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/VoiceIt2.rb +32 -32
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6900e2098a47859d44179d5aee4a5ff04ad7d7ea033c6bb2a803a5f828442015
|
4
|
+
data.tar.gz: 6cfc13fad562fca739d01f60e4e5c6fad4034bbf5096a60e7b45b56c0280779a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b2ed7ed1ea6acbf58c916af0fc1ae28160d70b3375a181788720071b3fad4e8483e3635e09fec05ca398ed4462efd0dfe2cbb1ea8e6385cbd76e20d6ad62a4f
|
7
|
+
data.tar.gz: c38e0f37f94535e0aa725748c0edb3495634eed9ed36ae7c3228d17415c508ca45fa5ac6b3ab92cd3d5b396f98cab821a8b5126d053df1800363c2ec58261e8a
|
data/VoiceIt2.rb
CHANGED
@@ -4,7 +4,7 @@ require 'rest-client'
|
|
4
4
|
class VoiceIt2
|
5
5
|
|
6
6
|
def initialize(key, tok)
|
7
|
-
@BASE_URL = URI('https://api.voiceit.io')
|
7
|
+
@BASE_URL = URI('https://api.voiceit.io/')
|
8
8
|
@api_key = key
|
9
9
|
@api_token = tok
|
10
10
|
end
|
@@ -12,7 +12,7 @@ class VoiceIt2
|
|
12
12
|
def getAllUsers
|
13
13
|
return RestClient::Request.new(
|
14
14
|
:method => :get,
|
15
|
-
:url => @BASE_URL.to_s + '
|
15
|
+
:url => @BASE_URL.to_s + 'users',
|
16
16
|
:user => @api_key,
|
17
17
|
:password => @api_token,
|
18
18
|
:headers => {
|
@@ -25,7 +25,7 @@ class VoiceIt2
|
|
25
25
|
def createUser
|
26
26
|
return RestClient::Request.new(
|
27
27
|
:method => :post,
|
28
|
-
:url => @BASE_URL.to_s + '
|
28
|
+
:url => @BASE_URL.to_s + 'users',
|
29
29
|
:user => @api_key,
|
30
30
|
:password => @api_token,
|
31
31
|
:headers => {
|
@@ -38,7 +38,7 @@ class VoiceIt2
|
|
38
38
|
def checkUserExists(userId)
|
39
39
|
return RestClient::Request.new(
|
40
40
|
:method => :get,
|
41
|
-
:url => @BASE_URL.to_s + '
|
41
|
+
:url => @BASE_URL.to_s + 'users/' + userId,
|
42
42
|
:user => @api_key,
|
43
43
|
:password => @api_token,
|
44
44
|
:headers => {
|
@@ -51,7 +51,7 @@ class VoiceIt2
|
|
51
51
|
def deleteUser(userId)
|
52
52
|
return RestClient::Request.new(
|
53
53
|
:method => :delete,
|
54
|
-
:url => @BASE_URL.to_s + '
|
54
|
+
:url => @BASE_URL.to_s + 'users/' + userId,
|
55
55
|
:user => @api_key,
|
56
56
|
:password => @api_token,
|
57
57
|
:headers => {
|
@@ -65,7 +65,7 @@ class VoiceIt2
|
|
65
65
|
def getGroupsForUser(userId)
|
66
66
|
return RestClient::Request.new(
|
67
67
|
:method => :get,
|
68
|
-
:url => @BASE_URL.to_s + '
|
68
|
+
:url => @BASE_URL.to_s + 'users/' + userId + '/groups',
|
69
69
|
:user => @api_key,
|
70
70
|
:password => @api_token,
|
71
71
|
:headers => {
|
@@ -79,7 +79,7 @@ class VoiceIt2
|
|
79
79
|
def getAllEnrollmentsForUser(userId)
|
80
80
|
return RestClient::Request.new(
|
81
81
|
:method => :get,
|
82
|
-
:url => @BASE_URL.to_s + '
|
82
|
+
:url => @BASE_URL.to_s + 'enrollments/' + userId,
|
83
83
|
:user => @api_key,
|
84
84
|
:password => @api_token,
|
85
85
|
:headers => {
|
@@ -93,7 +93,7 @@ class VoiceIt2
|
|
93
93
|
def deleteAllEnrollmentsForUser(userId)
|
94
94
|
return RestClient::Request.new(
|
95
95
|
:method => :delete,
|
96
|
-
:url => @BASE_URL.to_s + '
|
96
|
+
:url => @BASE_URL.to_s + 'enrollments/' + userId + '/all',
|
97
97
|
:user => @api_key,
|
98
98
|
:password => @api_token,
|
99
99
|
:headers => {
|
@@ -107,7 +107,7 @@ class VoiceIt2
|
|
107
107
|
def getFaceEnrollmentsForUser(userId)
|
108
108
|
return RestClient::Request.new(
|
109
109
|
:method => :get,
|
110
|
-
:url => @BASE_URL.to_s + '
|
110
|
+
:url => @BASE_URL.to_s + 'enrollments/face/' + userId,
|
111
111
|
:user => @api_key,
|
112
112
|
:password => @api_token,
|
113
113
|
:headers => {
|
@@ -121,7 +121,7 @@ class VoiceIt2
|
|
121
121
|
def createVoiceEnrollment(userId, contentLanguage, filePath)
|
122
122
|
return RestClient::Request.new(
|
123
123
|
:method => :post,
|
124
|
-
:url => @BASE_URL.to_s + '
|
124
|
+
:url => @BASE_URL.to_s + 'enrollments',
|
125
125
|
:user => @api_key,
|
126
126
|
:password => @api_token,
|
127
127
|
:headers => {
|
@@ -140,7 +140,7 @@ class VoiceIt2
|
|
140
140
|
def createVoiceEnrollmentByUrl(userId, contentLanguage, fileUrl)
|
141
141
|
return RestClient::Request.new(
|
142
142
|
:method => :post,
|
143
|
-
:url => @BASE_URL.to_s + '
|
143
|
+
:url => @BASE_URL.to_s + 'enrollments/byUrl',
|
144
144
|
:user => @api_key,
|
145
145
|
:password => @api_token,
|
146
146
|
:headers => {
|
@@ -159,7 +159,7 @@ class VoiceIt2
|
|
159
159
|
def createFaceEnrollment(userId, filePath, doBlinkDetection = false)
|
160
160
|
return RestClient::Request.new(
|
161
161
|
:method => :post,
|
162
|
-
:url => @BASE_URL.to_s + '
|
162
|
+
:url => @BASE_URL.to_s + 'enrollments/face',
|
163
163
|
:user => @api_key,
|
164
164
|
:password => @api_token,
|
165
165
|
:headers => {
|
@@ -178,7 +178,7 @@ class VoiceIt2
|
|
178
178
|
def createVideoEnrollment(userId, contentLanguage, filePath, doBlinkDetection = false)
|
179
179
|
return RestClient::Request.new(
|
180
180
|
:method => :post,
|
181
|
-
:url => @BASE_URL.to_s + '
|
181
|
+
:url => @BASE_URL.to_s + 'enrollments/video',
|
182
182
|
:user => @api_key,
|
183
183
|
:password => @api_token,
|
184
184
|
:headers => {
|
@@ -198,7 +198,7 @@ class VoiceIt2
|
|
198
198
|
def createVideoEnrollmentByUrl(userId, contentLanguage, fileUrl, doBlinkDetection = false)
|
199
199
|
return RestClient::Request.new(
|
200
200
|
:method => :post,
|
201
|
-
:url => @BASE_URL.to_s + '
|
201
|
+
:url => @BASE_URL.to_s + 'enrollments/video/byUrl',
|
202
202
|
:user => @api_key,
|
203
203
|
:password => @api_token,
|
204
204
|
:headers => {
|
@@ -218,7 +218,7 @@ class VoiceIt2
|
|
218
218
|
def deleteFaceEnrollment(userId, faceEnrollmentId)
|
219
219
|
return RestClient::Request.new(
|
220
220
|
:method => :delete,
|
221
|
-
:url => @BASE_URL.to_s + '
|
221
|
+
:url => @BASE_URL.to_s + 'enrollments/face/' + userId + '/' + faceEnrollmentId.to_s,
|
222
222
|
:user => @api_key,
|
223
223
|
:password => @api_token,
|
224
224
|
:headers => {
|
@@ -231,7 +231,7 @@ class VoiceIt2
|
|
231
231
|
def deleteEnrollmentForUser(userId, enrollmentId)
|
232
232
|
return RestClient::Request.new(
|
233
233
|
:method => :delete,
|
234
|
-
:url => @BASE_URL.to_s + '
|
234
|
+
:url => @BASE_URL.to_s + 'enrollments/' + userId + '/' + enrollmentId.to_s,
|
235
235
|
:user => @api_key,
|
236
236
|
:password => @api_token,
|
237
237
|
:headers => {
|
@@ -245,7 +245,7 @@ class VoiceIt2
|
|
245
245
|
def getAllGroups()
|
246
246
|
return RestClient::Request.new(
|
247
247
|
:method => :get,
|
248
|
-
:url => @BASE_URL.to_s + '
|
248
|
+
:url => @BASE_URL.to_s + 'groups',
|
249
249
|
:user => @api_key,
|
250
250
|
:password => @api_token,
|
251
251
|
:headers => {
|
@@ -258,7 +258,7 @@ class VoiceIt2
|
|
258
258
|
def getGroup(groupId)
|
259
259
|
return RestClient::Request.new(
|
260
260
|
:method => :get,
|
261
|
-
:url => @BASE_URL.to_s + '
|
261
|
+
:url => @BASE_URL.to_s + 'groups/' + groupId,
|
262
262
|
:user => @api_key,
|
263
263
|
:password => @api_token,
|
264
264
|
:headers => {
|
@@ -271,7 +271,7 @@ class VoiceIt2
|
|
271
271
|
def groupExists(groupId)
|
272
272
|
return RestClient::Request.new(
|
273
273
|
:method => :get,
|
274
|
-
:url => @BASE_URL.to_s + '
|
274
|
+
:url => @BASE_URL.to_s + 'groups/' + groupId + '/exists',
|
275
275
|
:user => @api_key,
|
276
276
|
:password => @api_token,
|
277
277
|
:headers => {
|
@@ -284,7 +284,7 @@ class VoiceIt2
|
|
284
284
|
def createGroup(description)
|
285
285
|
return RestClient::Request.new(
|
286
286
|
:method => :post,
|
287
|
-
:url => @BASE_URL.to_s + '
|
287
|
+
:url => @BASE_URL.to_s + 'groups',
|
288
288
|
:user => @api_key,
|
289
289
|
:password => @api_token,
|
290
290
|
:headers => {
|
@@ -301,7 +301,7 @@ class VoiceIt2
|
|
301
301
|
def addUserToGroup(groupId, userId)
|
302
302
|
return RestClient::Request.new(
|
303
303
|
:method => :put,
|
304
|
-
:url => @BASE_URL.to_s + '
|
304
|
+
:url => @BASE_URL.to_s + 'groups/addUser',
|
305
305
|
:user => @api_key,
|
306
306
|
:password => @api_token,
|
307
307
|
:headers => {
|
@@ -319,7 +319,7 @@ class VoiceIt2
|
|
319
319
|
def removeUserFromGroup(groupId, userId)
|
320
320
|
return RestClient::Request.new(
|
321
321
|
:method => :put,
|
322
|
-
:url => @BASE_URL.to_s + '
|
322
|
+
:url => @BASE_URL.to_s + 'groups/removeUser',
|
323
323
|
:user => @api_key,
|
324
324
|
:password => @api_token,
|
325
325
|
:headers => {
|
@@ -337,7 +337,7 @@ class VoiceIt2
|
|
337
337
|
def deleteGroup(groupId)
|
338
338
|
return RestClient::Request.new(
|
339
339
|
:method => :delete,
|
340
|
-
:url => @BASE_URL.to_s + '
|
340
|
+
:url => @BASE_URL.to_s + 'groups/' + groupId,
|
341
341
|
:user => @api_key,
|
342
342
|
:password => @api_token,
|
343
343
|
:headers => {
|
@@ -350,7 +350,7 @@ class VoiceIt2
|
|
350
350
|
def voiceVerification(userId, contentLanguage, filePath)
|
351
351
|
return RestClient::Request.new(
|
352
352
|
:method => :post,
|
353
|
-
:url => @BASE_URL.to_s + '
|
353
|
+
:url => @BASE_URL.to_s + 'verification',
|
354
354
|
:user => @api_key,
|
355
355
|
:password => @api_token,
|
356
356
|
:headers => {
|
@@ -369,7 +369,7 @@ class VoiceIt2
|
|
369
369
|
def voiceVerificationByUrl(userId, contentLanguage, fileUrl)
|
370
370
|
return RestClient::Request.new(
|
371
371
|
:method => :post,
|
372
|
-
:url => @BASE_URL.to_s + '
|
372
|
+
:url => @BASE_URL.to_s + 'verification/byUrl',
|
373
373
|
:user => @api_key,
|
374
374
|
:password => @api_token,
|
375
375
|
:headers => {
|
@@ -388,7 +388,7 @@ class VoiceIt2
|
|
388
388
|
def faceVerification(userId, filePath, doBlinkDetection = false)
|
389
389
|
return RestClient::Request.new(
|
390
390
|
:method => :post,
|
391
|
-
:url => @BASE_URL.to_s + '
|
391
|
+
:url => @BASE_URL.to_s + 'verification/face',
|
392
392
|
:user => @api_key,
|
393
393
|
:password => @api_token,
|
394
394
|
:headers => {
|
@@ -407,7 +407,7 @@ class VoiceIt2
|
|
407
407
|
def videoVerification(userId, contentLanguage, filePath, doBlinkDetection = false)
|
408
408
|
return RestClient::Request.new(
|
409
409
|
:method => :post,
|
410
|
-
:url => @BASE_URL.to_s + '
|
410
|
+
:url => @BASE_URL.to_s + 'verification/video',
|
411
411
|
:user => @api_key,
|
412
412
|
:password => @api_token,
|
413
413
|
:headers => {
|
@@ -427,7 +427,7 @@ class VoiceIt2
|
|
427
427
|
def videoVerificationByUrl(userId, contentLanguage, fileUrl, doBlinkDetection = false)
|
428
428
|
return RestClient::Request.new(
|
429
429
|
:method => :post,
|
430
|
-
:url => @BASE_URL.to_s + '
|
430
|
+
:url => @BASE_URL.to_s + 'verification/video/byUrl',
|
431
431
|
:user => @api_key,
|
432
432
|
:password => @api_token,
|
433
433
|
:headers => {
|
@@ -447,7 +447,7 @@ class VoiceIt2
|
|
447
447
|
def voiceIdentification(groupId, contentLanguage, filePath)
|
448
448
|
return RestClient::Request.new(
|
449
449
|
:method => :post,
|
450
|
-
:url => @BASE_URL.to_s + '
|
450
|
+
:url => @BASE_URL.to_s + 'identification',
|
451
451
|
:user => @api_key,
|
452
452
|
:password => @api_token,
|
453
453
|
:headers => {
|
@@ -466,7 +466,7 @@ class VoiceIt2
|
|
466
466
|
def voiceIdentificationByUrl(groupId, contentLanguage, fileUrl)
|
467
467
|
return RestClient::Request.new(
|
468
468
|
:method => :post,
|
469
|
-
:url => @BASE_URL.to_s + '
|
469
|
+
:url => @BASE_URL.to_s + 'identification/byUrl',
|
470
470
|
:user => @api_key,
|
471
471
|
:password => @api_token,
|
472
472
|
:headers => {
|
@@ -485,7 +485,7 @@ class VoiceIt2
|
|
485
485
|
def videoIdentification(groupId, contentLanguage, filePath, doBlinkDetection = false)
|
486
486
|
return RestClient::Request.new(
|
487
487
|
:method => :post,
|
488
|
-
:url => @BASE_URL.to_s + '
|
488
|
+
:url => @BASE_URL.to_s + 'identification/video',
|
489
489
|
:user => @api_key,
|
490
490
|
:password => @api_token,
|
491
491
|
:headers => {
|
@@ -505,7 +505,7 @@ class VoiceIt2
|
|
505
505
|
def videoIdentificationByUrl(groupId, contentLanguage, fileUrl, doBlinkDetection = false)
|
506
506
|
return RestClient::Request.new(
|
507
507
|
:method => :post,
|
508
|
-
:url => @BASE_URL.to_s + '
|
508
|
+
:url => @BASE_URL.to_s + 'identification/video/byUrl',
|
509
509
|
:user => @api_key,
|
510
510
|
:password => @api_token,
|
511
511
|
:headers => {
|