Ziggeo 2.16 → 2.19
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 +33 -2
- data/lib/classes/ZiggeoConnect.rb +15 -6
- data/lib/classes/ZiggeoEffectProfileProcess.rb +4 -0
- data/lib/classes/ZiggeoStreams.rb +4 -0
- 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: a4e0cd91d7d1c73a545b883a8691e57f607282b64fdcea650230e5d1c60009bc
|
4
|
+
data.tar.gz: fdc7dfb35427fe2080744b95c233501480158cce251cd3282d001dadeab22f10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ab45308457d11c599462a9c91236f2d216643c04bdf9878b17df3ada9c336b8649b9398be78b59ca26ddba5e8f13d69d1179d07e2abec8dee8a49435f33dbfc
|
7
|
+
data.tar.gz: 859395c07f33358941f44d870eca87e927328b300717175cef55b536a0bc77d38914ab6dc53136b61663f60d47470f87107b30d9d9358b271d3f81692b91f1c4
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ziggeo Ruby Server SDK 2.
|
1
|
+
# Ziggeo Ruby Server SDK 2.19
|
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
|
@@ -374,6 +376,20 @@ Arguments
|
|
374
376
|
- file: *Video file to be attached*
|
375
377
|
|
376
378
|
|
379
|
+
#### Attach Subtitle
|
380
|
+
|
381
|
+
Attaches a video to a new stream
|
382
|
+
|
383
|
+
```ruby
|
384
|
+
ziggeo.streams().attach_subtitle(video_token_or_key, token_or_key, arguments = nil)
|
385
|
+
```
|
386
|
+
|
387
|
+
Arguments
|
388
|
+
- lang: *Subtitle language*
|
389
|
+
- label: *Subtitle reference*
|
390
|
+
- data: *Actual subtitle*
|
391
|
+
|
392
|
+
|
377
393
|
#### Bind
|
378
394
|
|
379
395
|
Closes and submits the stream
|
@@ -619,6 +635,21 @@ Arguments
|
|
619
635
|
- video_scale: *Specify the image scale of your watermark (a value between 0.0 and 1.0)*
|
620
636
|
|
621
637
|
|
638
|
+
#### Edit Watermark Process
|
639
|
+
|
640
|
+
Edits an existing watermark process.
|
641
|
+
|
642
|
+
```ruby
|
643
|
+
ziggeo.effectProfileProcess().edit_watermark_process(effect_token_or_key, token_or_key, arguments = nil, file = nil)
|
644
|
+
```
|
645
|
+
|
646
|
+
Arguments
|
647
|
+
- file: *Image file to be attached*
|
648
|
+
- vertical_position: *Specify the vertical position of your watermark (a value between 0.0 and 1.0)*
|
649
|
+
- horizontal_position: *Specify the horizontal position of your watermark (a value between 0.0 and 1.0)*
|
650
|
+
- video_scale: *Specify the image scale of your watermark (a value between 0.0 and 1.0)*
|
651
|
+
|
652
|
+
|
622
653
|
### MetaProfiles
|
623
654
|
|
624
655
|
The meta profiles resource allows you to access and create meta profiles for your app. Each meta profile may contain one process or more.
|
@@ -807,6 +838,6 @@ Arguments
|
|
807
838
|
|
808
839
|
## License
|
809
840
|
|
810
|
-
Copyright (c) 2013-
|
841
|
+
Copyright (c) 2013-2020 Ziggeo
|
811
842
|
|
812
843
|
Apache 2.0 License
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
require 'json'
|
3
3
|
require 'httparty'
|
4
|
-
require 'httmultiparty'
|
5
4
|
|
6
5
|
class ZiggeoConnect
|
7
6
|
def initialize(application, baseuri)
|
@@ -9,7 +8,7 @@ class ZiggeoConnect
|
|
9
8
|
@baseuri = baseuri
|
10
9
|
end
|
11
10
|
|
12
|
-
def
|
11
|
+
def singleRequest(method, path, data = nil, file = nil)
|
13
12
|
url = URI.parse(@baseuri + path)
|
14
13
|
auth = { username: @application.token, password: @application.private_key }
|
15
14
|
timeout_in_seconds = @application.config.request_timeout.to_i
|
@@ -20,13 +19,13 @@ class ZiggeoConnect
|
|
20
19
|
if (file.nil?)
|
21
20
|
if (method == "get")
|
22
21
|
begin
|
23
|
-
HTTParty.send(method, url.to_s, query: data, basic_auth: auth, timeout: timeout_in_seconds)
|
22
|
+
HTTParty.send(method, url.to_s, query: data, basic_auth: auth, timeout: timeout_in_seconds)
|
24
23
|
rescue Net::ReadTimeout => error
|
25
24
|
self.timeout_error_message timeout_in_seconds, error
|
26
25
|
end
|
27
26
|
else
|
28
27
|
begin
|
29
|
-
HTTParty.send(method, url.to_s, body: data, basic_auth: auth, timeout: timeout_in_seconds)
|
28
|
+
HTTParty.send(method, url.to_s, body: data, basic_auth: auth, timeout: timeout_in_seconds)
|
30
29
|
rescue Net::ReadTimeout => error
|
31
30
|
self.timeout_error_message timeout_in_seconds, error
|
32
31
|
end
|
@@ -34,16 +33,26 @@ class ZiggeoConnect
|
|
34
33
|
else
|
35
34
|
data = data.nil? ? {} : data;
|
36
35
|
data["file"] = File.new(file)
|
37
|
-
timeout_in_seconds = ( ( File.size(file).to_f / 2**20 ).
|
36
|
+
timeout_in_seconds = ( ( File.size(file).to_f / 2**20 ).ceil * @application.config.request_timeout_per_mb.to_i ).to_i;
|
38
37
|
|
39
38
|
begin
|
40
|
-
|
39
|
+
HTTParty.send(method, url.to_s, body: data, basic_auth: auth, timeout: timeout_in_seconds)
|
41
40
|
rescue Net::ReadTimeout => error
|
42
41
|
self.timeout_error_message timeout_in_seconds, error
|
43
42
|
end
|
44
43
|
end
|
45
44
|
end
|
46
45
|
|
46
|
+
def request(method, path, data = nil, file = nil)
|
47
|
+
res = nil
|
48
|
+
5.times do
|
49
|
+
res = self.singleRequest(method, path, data, file)
|
50
|
+
break if res.response.code.to_i < 500
|
51
|
+
end
|
52
|
+
|
53
|
+
return res.body
|
54
|
+
end
|
55
|
+
|
47
56
|
def requestJSON(method, path, data = nil, file = nil)
|
48
57
|
return JSON.parse(self.request(method, path, data, file))
|
49
58
|
end
|
@@ -24,4 +24,8 @@ class ZiggeoEffectProfileProcess
|
|
24
24
|
return @application.connect.postJSON('/v1/effects/' + effect_token_or_key + '/process/watermark', data, file)
|
25
25
|
end
|
26
26
|
|
27
|
+
def edit_watermark_process(effect_token_or_key, token_or_key, data = nil, file = nil)
|
28
|
+
return @application.connect.postJSON('/v1/effects/' + effect_token_or_key + '/process/watermark/' + token_or_key + '', data, file)
|
29
|
+
end
|
30
|
+
|
27
31
|
end
|
@@ -40,6 +40,10 @@ class ZiggeoStreams
|
|
40
40
|
return @application.connect.postJSON('/v1/videos/' + video_token_or_key + '/streams/' + token_or_key + '/video', data, file)
|
41
41
|
end
|
42
42
|
|
43
|
+
def attach_subtitle(video_token_or_key, token_or_key, data = nil)
|
44
|
+
return @application.connect.postJSON('/v1/videos/' + video_token_or_key + '/streams/' + token_or_key + '/subtitle', data)
|
45
|
+
end
|
46
|
+
|
43
47
|
def bind(video_token_or_key, token_or_key)
|
44
48
|
return @application.connect.postJSON('/v1/videos/' + video_token_or_key + '/streams/' + token_or_key + '/bind')
|
45
49
|
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.19'
|
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-04-17 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.
|