VoiceIt2 3.2.0 → 3.3.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 +17 -3
- 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: 5acc67b867b14f9320d0a4a957d364dadfc2b8e0bf0bb301831ab78afd87b445
|
4
|
+
data.tar.gz: 2cae849bb8d6cf2df35bb3d64eca39398880ab546c884e5015d28e4ebf21d05f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8b183db0b76c5693e10acc61b168b75af5806ae118641f3945e85aba18215024839af9e5dc55a595395fb45d4af343a0f3dcc6720ae957601be97a20a38e932
|
7
|
+
data.tar.gz: 124bd8354fda97f16115845fb589dd0a50499484d85454cec9ed9d76794330c61e5a19f19b34b12cd543e09370560c3e1f01c2793d7d82fe3ecb897aee7eab16
|
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.3.0'
|
10
10
|
|
11
11
|
def initialize(key, tok)
|
12
12
|
@notification_url = ""
|
@@ -794,10 +794,24 @@ class VoiceIt2
|
|
794
794
|
end
|
795
795
|
end
|
796
796
|
|
797
|
-
def createUserToken(userId,
|
797
|
+
def createUserToken(userId, secondsToTimeout)
|
798
798
|
return RestClient::Request.new(
|
799
799
|
:method => :post,
|
800
|
-
:url => BASE_URL + 'users/' + userId + '/token?timeOut=' +
|
800
|
+
:url => BASE_URL + 'users/' + userId + '/token?timeOut=' + secondsToTimeout.to_s,
|
801
|
+
:user => @api_key,
|
802
|
+
:password => @api_token,
|
803
|
+
:headers => {
|
804
|
+
platformId: '35',
|
805
|
+
platformVersion: VERSION
|
806
|
+
}).execute
|
807
|
+
rescue => e
|
808
|
+
e.response
|
809
|
+
end
|
810
|
+
|
811
|
+
def expireUserTokens(userId)
|
812
|
+
return RestClient::Request.new(
|
813
|
+
:method => :post,
|
814
|
+
:url => BASE_URL + 'users/' + userId + '/expireTokens',
|
801
815
|
:user => @api_key,
|
802
816
|
:password => @api_token,
|
803
817
|
:headers => {
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StephenAkers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A wrapper for VoiceIt API 2
|
14
14
|
email: stephen@voiceit.io
|