VoiceIt2 3.4.0 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VoiceIt2.rb +82 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 605e13e2aba2a42c07dfd300f52931d89de2a8e378ca6d3a59340cf5fc5939ed
|
4
|
+
data.tar.gz: 28ed11d1c9dba3a31de95c52f20730a8a615a205d25efac11d66ae0ddac83cf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab6cbbacc1703143ee47ee048d5fdc51b7dce5e5f0b216099f6a15641c436ea4f7c2d6bbd43d19a56bed6237fa0f32702c4cc2ea6ba304c30d7beea66732f79a
|
7
|
+
data.tar.gz: 8c7b5261333695cc7fc791793e33c301e36e55dc806fde251d1fed23509e97e8c2eb456c966acdb1c45d7e314f56b8e3ce24d767438924cc30fdb27327c251d2
|
data/VoiceIt2.rb
CHANGED
@@ -6,7 +6,7 @@ require 'cgi'
|
|
6
6
|
class VoiceIt2
|
7
7
|
|
8
8
|
BASE_URL = 'https://api.voiceit.io/'
|
9
|
-
VERSION = '3.
|
9
|
+
VERSION = '3.5.0'
|
10
10
|
|
11
11
|
def initialize(key, tok)
|
12
12
|
@notification_url = ""
|
@@ -79,6 +79,87 @@ class VoiceIt2
|
|
79
79
|
e.response
|
80
80
|
end
|
81
81
|
|
82
|
+
def createManagedSubAccount(firstName, lastName, email, password, contentLanguage)
|
83
|
+
return RestClient::Request.new(
|
84
|
+
:method => :post,
|
85
|
+
:url => BASE_URL + 'subaccount/managed' + @notification_url,
|
86
|
+
:user => @api_key,
|
87
|
+
:password => @api_token,
|
88
|
+
:headers => {
|
89
|
+
platformId: '35',
|
90
|
+
platformVersion: VERSION
|
91
|
+
},
|
92
|
+
:payload => {
|
93
|
+
:multipart => true,
|
94
|
+
:firstName => firstName,
|
95
|
+
:lastName => lastName,
|
96
|
+
:email => email,
|
97
|
+
:password => password,
|
98
|
+
:contentLanguage => contentLanguage,
|
99
|
+
}).execute
|
100
|
+
rescue => e
|
101
|
+
if e.class == Errno::ENOENT
|
102
|
+
raise e.message
|
103
|
+
else
|
104
|
+
e.response
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def createUnmanagedSubAccount(firstName, lastName, email, password, contentLanguage)
|
109
|
+
return RestClient::Request.new(
|
110
|
+
:method => :post,
|
111
|
+
:url => BASE_URL + 'subaccount/unmanaged' + @notification_url,
|
112
|
+
:user => @api_key,
|
113
|
+
:password => @api_token,
|
114
|
+
:headers => {
|
115
|
+
platformId: '35',
|
116
|
+
platformVersion: VERSION
|
117
|
+
},
|
118
|
+
:payload => {
|
119
|
+
:multipart => true,
|
120
|
+
:firstName => firstName,
|
121
|
+
:lastName => lastName,
|
122
|
+
:email => email,
|
123
|
+
:password => password,
|
124
|
+
:contentLanguage => contentLanguage,
|
125
|
+
}).execute
|
126
|
+
rescue => e
|
127
|
+
if e.class == Errno::ENOENT
|
128
|
+
raise e.message
|
129
|
+
else
|
130
|
+
e.response
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
def regenerateSubAccountAPIToken(subAccountAPIKey)
|
135
|
+
return RestClient::Request.new(
|
136
|
+
:method => :post,
|
137
|
+
:url => BASE_URL + 'subaccount/' + subAccountAPIKey + @notification_url,
|
138
|
+
:user => @api_key,
|
139
|
+
:password => @api_token,
|
140
|
+
:headers => {
|
141
|
+
platformId: '35',
|
142
|
+
platformVersion: VERSION
|
143
|
+
}).execute
|
144
|
+
rescue => e
|
145
|
+
e.response
|
146
|
+
end
|
147
|
+
|
148
|
+
def deleteSubAccount(subAccountAPIKey)
|
149
|
+
return RestClient::Request.new(
|
150
|
+
:method => :delete,
|
151
|
+
:url => BASE_URL + 'subaccount/' + subAccountAPIKey + @notification_url,
|
152
|
+
:user => @api_key,
|
153
|
+
:password => @api_token,
|
154
|
+
:headers => {
|
155
|
+
platformId: '35',
|
156
|
+
platformVersion: VERSION
|
157
|
+
}).execute
|
158
|
+
|
159
|
+
rescue => e
|
160
|
+
e.response
|
161
|
+
end
|
162
|
+
|
82
163
|
def getGroupsForUser(userId)
|
83
164
|
return RestClient::Request.new(
|
84
165
|
:method => :get,
|
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: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StephenAkers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A wrapper for VoiceIt API 2
|
14
14
|
email: stephen@voiceit.io
|
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
40
|
rubyforge_project:
|
41
|
-
rubygems_version: 2.7.
|
41
|
+
rubygems_version: 2.7.6
|
42
42
|
signing_key:
|
43
43
|
specification_version: 4
|
44
44
|
summary: VoiceIt Api 2
|