Ziggeo 2.26 → 2.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d66106c85f75e46affc2e3f874bc93c18c1f4afb94c86472e264f13198f964d8
4
- data.tar.gz: 7071ad43e3fef3825cb67bf86bc10315e8de84aa0ccd132bf5f421d3150f0c6d
3
+ metadata.gz: a56bf11e9e44b493db87694f14ac2451420b9186d9d9db6fdd6c72e6732312e5
4
+ data.tar.gz: 159633653ddb74b0ed6abf4d1527b511e615fcb0d84ab5a7a97a71cb0ad7e763
5
5
  SHA512:
6
- metadata.gz: cd4c00e3fc72937933841ace5956f88689ce6f851779fa0e5f5d9edca683511ad9b05a1aecc47b1b196f2f3db2581e35bd25e858df2eec05d3f88ed3ab51a910
7
- data.tar.gz: b2bddfd93042da50cda78831c6959ffe71e5d5d3eda8712a583b62bfd7876f62091c57ebdfe97800d42fed43324be558d655ccccd78c520ceeac9a48975c6c43
6
+ metadata.gz: 770f8adb4fcca15cb84b0d6f4cbeae99327bc46c732b7dfc2e34d3f83de8356a0ac5203d61f3e8d056cb52a0b50c26da11c0d73245be464251b3294754007987
7
+ data.tar.gz: 984f4395288cc69f5a31ccc72b877af69a289dedd5083a28aaa8a94f21bac035c7e8f7c0bd3fbb5fc9bd2302d0b4863f63bcd78e66e1d0f3741b6950f5473cde
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ziggeo's Ruby Server SDK
2
2
 
3
- latest version: **2.26**
3
+ latest version: **2.29**
4
4
 
5
5
  ## Index
6
6
 
@@ -41,35 +41,50 @@ latest version: **2.26**
41
41
  8. [Streams Attach Image](#method-streams-attach-image)
42
42
  9. [Streams Attach Video](#method-streams-attach-video)
43
43
  10. [Streams Attach Subtitle](#method-streams-attach-subtitle)
44
- 11. [Streams Bind](#method-streams-bind)
45
- 5. [Methods for Authtokens](#method-authtokens)
44
+ 5. [Methods for Audios](#method-audios)
45
+ 1. [Audios Index](#method-audios-index)
46
+ 2. [Audios Count](#method-audios-count)
47
+ 3. [Audios Get](#method-audios-get)
48
+ 4. [Audios Get Bulk](#method-audios-get-bulk)
49
+ 5. [Audios Download Audio](#method-audios-download-audio)
50
+ 6. [Audios Update](#method-audios-update)
51
+ 7. [Audios Update Bulk](#method-audios-update-bulk)
52
+ 8. [Audios Delete](#method-audios-delete)
53
+ 9. [Audios Create](#method-audios-create)
54
+ 6. [Methods for Audio_streams](#method-audio-streams)
55
+ 1. [Audio_streams Index](#method-audio-streams-index)
56
+ 2. [Audio_streams Get](#method-audio-streams-get)
57
+ 3. [Audio_streams Download Audio](#method-audio-streams-download-audio)
58
+ 4. [Audio_streams Delete](#method-audio-streams-delete)
59
+ 5. [Audio_streams Create](#method-audio-streams-create)
60
+ 7. [Methods for Authtokens](#method-authtokens)
46
61
  1. [Authtokens Get](#method-authtokens-get)
47
62
  2. [Authtokens Update](#method-authtokens-update)
48
63
  3. [Authtokens Delete](#method-authtokens-delete)
49
64
  4. [Authtokens Create](#method-authtokens-create)
50
- 6. [Methods for Application](#method-application)
65
+ 8. [Methods for Application](#method-application)
51
66
  1. [Application Get](#method-application-get)
52
67
  2. [Application Update](#method-application-update)
53
68
  3. [Application Get Stats](#method-application-get-stats)
54
- 7. [Methods for Effect Profiles](#method-effect-profiles)
69
+ 9. [Methods for Effect Profiles](#method-effect-profiles)
55
70
  1. [Effect Profiles Create](#method-effect-profiles-create)
56
71
  2. [Effect Profiles Index](#method-effect-profiles-index)
57
72
  3. [Effect Profiles Get](#method-effect-profiles-get)
58
73
  4. [Effect Profiles Delete](#method-effect-profiles-delete)
59
74
  5. [Effect Profiles Update](#method-effect-profiles-update)
60
- 8. [Methods for Effect Profile Process](#method-effect-profile-process)
75
+ 10. [Methods for Effect Profile Process](#method-effect-profile-process)
61
76
  1. [Effect Profile Process Index](#method-effect-profile-process-index)
62
77
  2. [Effect Profile Process Get](#method-effect-profile-process-get)
63
78
  3. [Effect Profile Process Delete](#method-effect-profile-process-delete)
64
79
  4. [Effect Profile Process Create Filter Process](#method-effect-profile-process-create-filter-process)
65
80
  5. [Effect Profile Process Create Watermark Process](#method-effect-profile-process-create-watermark-process)
66
81
  6. [Effect Profile Process Edit Watermark Process](#method-effect-profile-process-edit-watermark-process)
67
- 9. [Methods for Meta Profiles](#method-meta-profiles)
82
+ 11. [Methods for Meta Profiles](#method-meta-profiles)
68
83
  1. [Meta Profiles Create](#method-meta-profiles-create)
69
84
  2. [Meta Profiles Index](#method-meta-profiles-index)
70
85
  3. [Meta Profiles Get](#method-meta-profiles-get)
71
86
  4. [Meta Profiles Delete](#method-meta-profiles-delete)
72
- 10. [Methods for Meta Profile Process](#method-meta-profile-process)
87
+ 12. [Methods for Meta Profile Process](#method-meta-profile-process)
73
88
  1. [Meta Profile Process Index](#method-meta-profile-process-index)
74
89
  2. [Meta Profile Process Get](#method-meta-profile-process-get)
75
90
  3. [Meta Profile Process Delete](#method-meta-profile-process-delete)
@@ -77,11 +92,11 @@ latest version: **2.26**
77
92
  5. [Meta Profile Process Create Audio Transcription Process](#method-meta-profile-process-create-audio-transcription-process)
78
93
  6. [Meta Profile Process Create Nsfw Process](#method-meta-profile-process-create-nsfw-process)
79
94
  7. [Meta Profile Process Create Profanity Process](#method-meta-profile-process-create-profanity-process)
80
- 11. [Methods for Webhooks](#method-webhooks)
95
+ 13. [Methods for Webhooks](#method-webhooks)
81
96
  1. [Webhooks Create](#method-webhooks-create)
82
97
  2. [Webhooks Confirm](#method-webhooks-confirm)
83
98
  3. [Webhooks Delete](#method-webhooks-delete)
84
- 12. [Methods for Analytics](#method-analytics)
99
+ 14. [Methods for Analytics](#method-analytics)
85
100
  1. [Analytics Get](#method-analytics-get)
86
101
  5. [License](#license)
87
102
 
@@ -175,14 +190,16 @@ Currently available methods are branched off within different categories:
175
190
 
176
191
  1. Videos
177
192
  2. Streams
178
- 3. Authtokens
179
- 4. Application
180
- 5. Effect Profiles
181
- 6. Effect Profile Process
182
- 7. Meta Profiles
183
- 8. Meta Profile Process
184
- 9. Webhooks
185
- 10. Analytics
193
+ 3. Audios
194
+ 4. Audio_streams
195
+ 5. Authtokens
196
+ 6. Application
197
+ 7. Effect Profiles
198
+ 8. Effect Profile Process
199
+ 9. Meta Profiles
200
+ 10. Meta Profile Process
201
+ 11. Webhooks
202
+ 12. Analytics
186
203
 
187
204
  Each of this sections has their own actions and they are explained bellow
188
205
 
@@ -455,7 +472,7 @@ ziggeo.streams().create(video_token_or_key, arguments = nil, file = nil)
455
472
 
456
473
  #### Attach Image<a name="method-streams-attach-image"></a>
457
474
 
458
- Attaches an image to a new stream
475
+ Attaches an image to a new stream. Must be attached before video, since video upload triggers the transcoding job and binds the stream
459
476
 
460
477
  ```ruby
461
478
  ziggeo.streams().attach_image(video_token_or_key, token_or_key, arguments = nil, file = nil)
@@ -488,15 +505,173 @@ ziggeo.streams().attach_subtitle(video_token_or_key, token_or_key, arguments = n
488
505
  - label: *Subtitle reference*
489
506
  - data: *Actual subtitle*
490
507
 
491
- #### Bind<a name="method-streams-bind"></a>
508
+ ### Audios<a name="method-audios"></a>
509
+
510
+
511
+ The audios resource allows you to access all single audios. Each video may contain more than one stream.
512
+
513
+ #### Index<a name="method-audios-index"></a>
514
+
515
+ Query an array of audios (will return at most 50 audios by default). Newest audios come first.
516
+
517
+ ```ruby
518
+ ziggeo.audios().index(arguments = nil)
519
+ ```
520
+
521
+ Arguments
522
+ - limit: *Limit the number of returned audios. Can be set up to 100.*
523
+ - skip: *Skip the first [n] entries.*
524
+ - reverse: *Reverse the order in which audios are returned.*
525
+ - states: *Filter audios by state*
526
+ - tags: *Filter the search result to certain tags, encoded as a comma-separated string*
527
+
528
+ #### Count<a name="method-audios-count"></a>
529
+
530
+ Get the audio count for the application.
531
+
532
+ ```ruby
533
+ ziggeo.audios().count(arguments = nil)
534
+ ```
535
+
536
+ Arguments
537
+ - states: *Filter audios by state*
538
+ - tags: *Filter the search result to certain tags, encoded as a comma-separated string*
539
+
540
+ #### Get<a name="method-audios-get"></a>
541
+
542
+ Get a single audio by token or key.
543
+
544
+ ```ruby
545
+ ziggeo.audios().get(token_or_key)
546
+ ```
547
+
548
+ #### Get Bulk<a name="method-audios-get-bulk"></a>
549
+
550
+ Get multiple audios by tokens or keys.
551
+
552
+ ```ruby
553
+ ziggeo.audios().get_bulk(arguments = nil)
554
+ ```
555
+
556
+ Arguments
557
+ - tokens_or_keys: *Comma-separated list with the desired audios tokens or keys (Limit: 100 tokens or keys).*
558
+
559
+ #### Download Audio<a name="method-audios-download-audio"></a>
560
+
561
+ Download the audio data file
562
+
563
+ ```ruby
564
+ ziggeo.audios().download_audio(token_or_key)
565
+ ```
566
+
567
+ #### Update<a name="method-audios-update"></a>
568
+
569
+ Update single audio by token or key.
570
+
571
+ ```ruby
572
+ ziggeo.audios().update(token_or_key, arguments = nil)
573
+ ```
574
+
575
+ Arguments
576
+ - min_duration: *Minimal duration of audio*
577
+ - max_duration: *Maximal duration of audio*
578
+ - tags: *Audio Tags*
579
+ - key: *Unique (optional) name of audio*
580
+ - volatile: *Automatically removed this audio if it remains empty*
581
+ - expiration_days: *After how many days will this audio be deleted*
582
+ - expire_on: *On which date will this audio be deleted. String in ISO 8601 format: YYYY-MM-DD*
583
+
584
+ #### Update Bulk<a name="method-audios-update-bulk"></a>
585
+
586
+ Update multiple audios by token or key.
587
+
588
+ ```ruby
589
+ ziggeo.audios().update_bulk(arguments = nil)
590
+ ```
591
+
592
+ Arguments
593
+ - tokens_or_keys: *Comma-separated list with the desired audios tokens or keys (Limit: 100 tokens or keys).*
594
+ - min_duration: *Minimal duration of audio*
595
+ - max_duration: *Maximal duration of audio*
596
+ - tags: *Audio Tags*
597
+ - volatile: *Automatically removed this audio if it remains empty*
598
+ - expiration_days: *After how many days will this audio be deleted*
599
+ - expire_on: *On which date will this audio be deleted. String in ISO 8601 format: YYYY-MM-DD*
600
+
601
+ #### Delete<a name="method-audios-delete"></a>
602
+
603
+ Delete a single audio by token or key.
604
+
605
+ ```ruby
606
+ ziggeo.audios().delete(token_or_key)
607
+ ```
608
+
609
+ #### Create<a name="method-audios-create"></a>
610
+
611
+ Create a new audio.
612
+
613
+ ```ruby
614
+ ziggeo.audios().create(arguments = nil, file = nil)
615
+ ```
616
+
617
+ Arguments
618
+ - file: *Audio file to be uploaded*
619
+ - min_duration: *Minimal duration of audio*
620
+ - max_duration: *Maximal duration of audio*
621
+ - tags: *Audio Tags*
622
+ - key: *Unique (optional) name of audio*
623
+ - volatile: *Automatically removed this video if it remains empty*
624
+
625
+ ### Audio_streams<a name="method-audio-streams"></a>
492
626
 
493
- Closes and submits the stream
627
+
628
+ The streams resource allows you to directly access all streams associated with a single audio.
629
+
630
+ #### Index<a name="method-audio-streams-index"></a>
631
+
632
+ Return all streams associated with a audio
633
+
634
+ ```ruby
635
+ ziggeo.audio_streams().index(audio_token_or_key, arguments = nil)
636
+ ```
637
+
638
+ Arguments
639
+ - states: *Filter streams by state*
640
+
641
+ #### Get<a name="method-audio-streams-get"></a>
642
+
643
+ Get a single stream
644
+
645
+ ```ruby
646
+ ziggeo.audio_streams().get(audio_token_or_key, token_or_key)
647
+ ```
648
+
649
+ #### Download Audio<a name="method-audio-streams-download-audio"></a>
650
+
651
+ Download the audio data associated with the stream
652
+
653
+ ```ruby
654
+ ziggeo.audio_streams().download_audio(audio_token_or_key, token_or_key)
655
+ ```
656
+
657
+ #### Delete<a name="method-audio-streams-delete"></a>
658
+
659
+ Delete the stream
660
+
661
+ ```ruby
662
+ ziggeo.audio_streams().delete(audio_token_or_key, token_or_key)
663
+ ```
664
+
665
+ #### Create<a name="method-audio-streams-create"></a>
666
+
667
+ Create a new stream
494
668
 
495
669
  ```ruby
496
- ziggeo.streams().bind(video_token_or_key, token_or_key, arguments = nil)
670
+ ziggeo.audio_streams().create(audio_token_or_key, arguments = nil, file = nil)
497
671
  ```
498
672
 
499
673
  Arguments
674
+ - file: *Audio file to be uploaded*
500
675
 
501
676
  ### Authtokens<a name="method-authtokens"></a>
502
677
 
@@ -902,6 +1077,6 @@ ziggeo.analytics().get(arguments = nil)
902
1077
 
903
1078
  ## License <a name="license"></a>
904
1079
 
905
- Copyright (c) 2013-2021 Ziggeo
1080
+ Copyright (c) 2013-2022 Ziggeo
906
1081
 
907
1082
  Apache 2.0 License
data/lib/Ziggeo.rb CHANGED
@@ -8,6 +8,8 @@ require_relative "classes/ZiggeoConnect"
8
8
  require_relative "classes/ZiggeoAuth"
9
9
  require_relative "classes/ZiggeoVideos"
10
10
  require_relative "classes/ZiggeoStreams"
11
+ require_relative "classes/ZiggeoAudios"
12
+ require_relative "classes/ZiggeoAudio_streams"
11
13
  require_relative "classes/ZiggeoAuthtokens"
12
14
  require_relative "classes/ZiggeoApplication"
13
15
  require_relative "classes/ZiggeoEffectProfiles"
@@ -53,6 +55,8 @@ class Ziggeo
53
55
  @auth = nil
54
56
  @videos = nil
55
57
  @streams = nil
58
+ @audios = nil
59
+ @audio_streams = nil
56
60
  @authtokens = nil
57
61
  @application = nil
58
62
  @effectProfiles = nil
@@ -86,6 +90,16 @@ class Ziggeo
86
90
  return @streams
87
91
  end
88
92
 
93
+ def audios()
94
+ @audios = @audios || ZiggeoAudios.new(self)
95
+ return @audios
96
+ end
97
+
98
+ def audio_streams()
99
+ @audio_streams = @audio_streams || ZiggeoAudio_streams.new(self)
100
+ return @audio_streams
101
+ end
102
+
89
103
  def authtokens()
90
104
  @authtokens = @authtokens || ZiggeoAuthtokens.new(self)
91
105
  return @authtokens
@@ -0,0 +1,33 @@
1
+ class ZiggeoAudio_streams
2
+
3
+ def initialize(application)
4
+ @application = application
5
+ end
6
+
7
+ def index(audio_token_or_key, data = nil)
8
+ return @application.api_connect.getJSON('/server/v1/audios/bytoken/' + audio_token_or_key + '/streams', data)
9
+ end
10
+
11
+ def get(audio_token_or_key, token_or_key)
12
+ return @application.api_connect.getJSON('/server/v1/audios/bytoken/' + audio_token_or_key + '/streams/bytoken/' + token_or_key + '')
13
+ end
14
+
15
+ def download_audio(audio_token_or_key, token_or_key)
16
+ return @application.connect.get('/v1/server/v1/audios/bytoken/' + audio_token_or_key + '/streams/bytoken/' + token_or_key + '/audio')
17
+ end
18
+
19
+ def delete(audio_token_or_key, token_or_key)
20
+ return @application.api_connect.delete('/server/v1/audios/bytoken/' + audio_token_or_key + '/streams/bytoken/' + token_or_key + '')
21
+ end
22
+
23
+ def create(audio_token_or_key, data = nil, file = nil)
24
+ unless file.nil?
25
+ result = @application.connect.postUploadJSON('/server/v1/audios/' + audio_token_or_key + '/streams-upload-url', 'stream', data, file, 'audio_type')
26
+ result = @application.connect.postJSON('/server/v1/audios/' + audio_token_or_key + '/streams/' + result["token"] + '/confirm-video');
27
+ return result
28
+ else
29
+ return @application.api_connect.postJSON('/server/v1/audios/bytoken/' + audio_token_or_key + '/streams', data, file)
30
+ end
31
+ end
32
+
33
+ end
@@ -0,0 +1,49 @@
1
+ class ZiggeoAudios
2
+
3
+ def initialize(application)
4
+ @application = application
5
+ end
6
+
7
+ def index(data = nil)
8
+ return @application.api_connect.getJSON('/server/v1/audios/', data)
9
+ end
10
+
11
+ def count(data = nil)
12
+ return @application.api_connect.getJSON('/server/v1/audios/count', data)
13
+ end
14
+
15
+ def get(token_or_key)
16
+ return @application.api_connect.getJSON('/server/v1/audios/bytoken/' + token_or_key + '')
17
+ end
18
+
19
+ def get_bulk(data = nil)
20
+ return @application.api_connect.postJSON('/server/v1/audios/get-bulk', data)
21
+ end
22
+
23
+ def download_audio(token_or_key)
24
+ return @application.connect.get('/v1/server/v1/audios/bytoken/' + token_or_key + '/video')
25
+ end
26
+
27
+ def update(token_or_key, data = nil)
28
+ return @application.api_connect.postJSON('/server/v1/audios/bytoken/' + token_or_key + '', data)
29
+ end
30
+
31
+ def update_bulk(data = nil)
32
+ return @application.api_connect.postJSON('/server/v1/audios/update-bulk', data)
33
+ end
34
+
35
+ def delete(token_or_key)
36
+ return @application.api_connect.delete('/server/v1/audios/bytoken/' + token_or_key + '')
37
+ end
38
+
39
+ def create(data = nil, file = nil)
40
+ unless file.nil?
41
+ result = @application.connect.postUploadJSON('/server/v1/audios/audios-upload-url', 'audio', data, file, 'audio_type')
42
+ result["default_stream"] = @application.connect.postJSON('/server/v1/audios/' + result["token"] + '/streams/' + result["default_stream"]["token"] + '/confirm-audio');
43
+ return result
44
+ else
45
+ return @application.api_connect.postJSON('/server/v1/audios/', data, file)
46
+ end
47
+ end
48
+
49
+ end
@@ -62,8 +62,4 @@ class ZiggeoStreams
62
62
  return @application.connect.postJSON('/v1/videos/' + video_token_or_key + '/streams/' + token_or_key + '/subtitle', data)
63
63
  end
64
64
 
65
- def bind(video_token_or_key, token_or_key)
66
- return @application.connect.postJSON('/v1/videos/' + video_token_or_key + '/streams/' + token_or_key + '/bind')
67
- end
68
-
69
65
  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.26'
4
+ version: '2.29'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziggeo, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-26 00:00:00.000000000 Z
11
+ date: 2022-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -35,6 +35,8 @@ files:
35
35
  - lib/Ziggeo.rb
36
36
  - lib/classes/ZiggeoAnalytics.rb
37
37
  - lib/classes/ZiggeoApplication.rb
38
+ - lib/classes/ZiggeoAudioStreams.rb
39
+ - lib/classes/ZiggeoAudios.rb
38
40
  - lib/classes/ZiggeoAuth.rb
39
41
  - lib/classes/ZiggeoAuthtokens.rb
40
42
  - lib/classes/ZiggeoConfig.rb
@@ -65,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
67
  - !ruby/object:Gem::Version
66
68
  version: '0'
67
69
  requirements: []
68
- rubygems_version: 3.0.3
70
+ rubygems_version: 3.0.3.1
69
71
  signing_key:
70
72
  specification_version: 4
71
73
  summary: The Ziggeo ServerSDK gem.