Ziggeo 2.17 → 2.18
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 +5 -5
- data/README.md +4 -2
- data/lib/classes/ZiggeoConnect.rb +14 -4
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d18b6fc48bad291624a7711bb7520b9ee019b3e840e25d5459f1fd73dc2704fe
|
4
|
+
data.tar.gz: e01f52abed608851575a55557bd4d93a3c8826b43305a71d2402a942e1fd3a1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fefe2bc166b749895c0b940bf6c10a36f6c158f46a41e6c0a8d75351f8b228e6c2193ca697e7cc2aa5d0c435c4d74187182e9a46e2e1682c80e90864bdb7595
|
7
|
+
data.tar.gz: 7c61c3a9a5584333703575f8d5b549203e6533512fbf4a232fd562fdd6a87e47dd9619a8d4a29fa6d64384f3107847ec2249830397a9807b5455e8681600ba7f
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ziggeo Ruby Server SDK 2.
|
1
|
+
# Ziggeo Ruby Server SDK 2.18
|
2
2
|
|
3
3
|
Ziggeo API (https://ziggeo.com) allows you to integrate video recording and playback with only
|
4
4
|
two lines of code in your site, service or app. This is the Ruby Server SDK repository.
|
@@ -208,6 +208,7 @@ Arguments
|
|
208
208
|
- key: *Unique (optional) name of video*
|
209
209
|
- volatile: *Automatically removed this video if it remains empty*
|
210
210
|
- expiration_days: *After how many days will this video be deleted*
|
211
|
+
- expire_on: *On which date will this video be deleted. String in ISO 8601 format: YYYY-MM-DD*
|
211
212
|
|
212
213
|
|
213
214
|
#### Update Bulk
|
@@ -225,6 +226,7 @@ Arguments
|
|
225
226
|
- tags: *Video Tags*
|
226
227
|
- volatile: *Automatically removed this video if it remains empty*
|
227
228
|
- expiration_days: *After how many days will this video be deleted*
|
229
|
+
- expire_on: *On which date will this video be deleted. String in ISO 8601 format: YYYY-MM-DD*
|
228
230
|
|
229
231
|
|
230
232
|
#### Delete
|
@@ -836,6 +838,6 @@ Arguments
|
|
836
838
|
|
837
839
|
## License
|
838
840
|
|
839
|
-
Copyright (c) 2013-
|
841
|
+
Copyright (c) 2013-2020 Ziggeo
|
840
842
|
|
841
843
|
Apache 2.0 License
|
@@ -9,7 +9,7 @@ class ZiggeoConnect
|
|
9
9
|
@baseuri = baseuri
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def singleRequest(method, path, data = nil, file = nil)
|
13
13
|
url = URI.parse(@baseuri + path)
|
14
14
|
auth = { username: @application.token, password: @application.private_key }
|
15
15
|
timeout_in_seconds = @application.config.request_timeout.to_i
|
@@ -20,13 +20,13 @@ class ZiggeoConnect
|
|
20
20
|
if (file.nil?)
|
21
21
|
if (method == "get")
|
22
22
|
begin
|
23
|
-
HTTParty.send(method, url.to_s, query: data, basic_auth: auth, timeout: timeout_in_seconds)
|
23
|
+
HTTParty.send(method, url.to_s, query: data, basic_auth: auth, timeout: timeout_in_seconds)
|
24
24
|
rescue Net::ReadTimeout => error
|
25
25
|
self.timeout_error_message timeout_in_seconds, error
|
26
26
|
end
|
27
27
|
else
|
28
28
|
begin
|
29
|
-
HTTParty.send(method, url.to_s, body: data, basic_auth: auth, timeout: timeout_in_seconds)
|
29
|
+
HTTParty.send(method, url.to_s, body: data, basic_auth: auth, timeout: timeout_in_seconds)
|
30
30
|
rescue Net::ReadTimeout => error
|
31
31
|
self.timeout_error_message timeout_in_seconds, error
|
32
32
|
end
|
@@ -37,13 +37,23 @@ class ZiggeoConnect
|
|
37
37
|
timeout_in_seconds = ( ( File.size(file).to_f / 2**20 ).round(0) * @application.config.request_timeout_per_mb.to_i ).to_i;
|
38
38
|
|
39
39
|
begin
|
40
|
-
HTTMultiParty.send(method, url.to_s, body: data, basic_auth: auth, timeout: timeout_in_seconds)
|
40
|
+
HTTMultiParty.send(method, url.to_s, body: data, basic_auth: auth, timeout: timeout_in_seconds)
|
41
41
|
rescue Net::ReadTimeout => error
|
42
42
|
self.timeout_error_message timeout_in_seconds, error
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
def request(method, path, data = nil, file = nil)
|
48
|
+
res = nil
|
49
|
+
5.times do
|
50
|
+
res = self.singleRequest(method, path, data, file)
|
51
|
+
break if res.response.code.to_i < 500
|
52
|
+
end
|
53
|
+
|
54
|
+
return res.body
|
55
|
+
end
|
56
|
+
|
47
57
|
def requestJSON(method, path, data = nil, file = nil)
|
48
58
|
return JSON.parse(self.request(method, path, data, file))
|
49
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Ziggeo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.18'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ziggeo, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -79,8 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
|
-
|
83
|
-
rubygems_version: 2.5.2.3
|
82
|
+
rubygems_version: 3.0.3
|
84
83
|
signing_key:
|
85
84
|
specification_version: 4
|
86
85
|
summary: The Ziggeo ServerSDK gem.
|