multi_video_streaming 1.0.1.beta5 → 1.0.1.beta6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f01a78b03269551e463812ba899a4a1cac55b14f2690625356fc423b8fcc02a
|
4
|
+
data.tar.gz: 0dab500b9a3e956f6b0893fa3a0220382ac1c22897a1a8da6ddd0cfe057c48c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45d14d8e39a762ac4a8ab6a9c77184bb40bcab546fbeffbd94f7d3e8bcb00ea82f517cc98b1a1e11eba7415775588042d3363d152bec6b6fe03d9af94cfa1287
|
7
|
+
data.tar.gz: bf180a6375cc2dca09447e3ecdf072343b7354c363135783b39453ac6f47d93a0acb09a2e18e64851c94ee30f0a0b4fc9b18db58d2b504a43adb5f8def0e73ff
|
@@ -24,14 +24,13 @@ module MultiVideoStreaming
|
|
24
24
|
|
25
25
|
BASE_URL = "https://video.bunnycdn.com"
|
26
26
|
|
27
|
-
def upload_video(url:)
|
27
|
+
def upload_video(url:, title:)
|
28
28
|
begin
|
29
29
|
library_id, api_key = self.dependency_params.values_at(:library_id, :api_key)
|
30
30
|
@original_status_code = nil
|
31
31
|
|
32
32
|
self.required_fields_validator_instance.validate(library_id: library_id, api_key: api_key)
|
33
33
|
|
34
|
-
title = MultiVideoStreaming::Helpers::TitleFromUrl.get(url: url)
|
35
34
|
create_video_response = self.https_service_instance.post(uri: "#{BASE_URL}/library/#{library_id}/videos", headers: { :AccessKey => api_key }, body: { :title => title })
|
36
35
|
|
37
36
|
if create_video_response["status_code"] != 200
|
@@ -27,10 +27,9 @@ module MultiVideoStreaming
|
|
27
27
|
|
28
28
|
VIMEO_URL = "https://api.vimeo.com"
|
29
29
|
|
30
|
-
def upload_video(url:)
|
30
|
+
def upload_video(url:, title:)
|
31
31
|
begin
|
32
32
|
token = self.dependency_params[:token]
|
33
|
-
title = MultiVideoStreaming::Helpers::TitleFromUrl.get(url: url)
|
34
33
|
@original_status_code = nil
|
35
34
|
|
36
35
|
self.required_fields_validator_instance.validate(token: token)
|
@@ -19,7 +19,7 @@ require "multi_video_streaming/version"
|
|
19
19
|
require "multi_video_streaming/validators"
|
20
20
|
|
21
21
|
module MultiVideoStreaming
|
22
|
-
def self.upload(url
|
22
|
+
def self.upload(url:, title:, *platforms)
|
23
23
|
MultiVideoStreaming::Validators::PlatformsArrayValidator.validate(platforms_array: platforms)
|
24
24
|
MultiVideoStreaming::Validators::PlatformsHashValidator.validate(platforms_hash: platforms, method: :create, number_of_platforms: platforms.length)
|
25
25
|
|
@@ -35,7 +35,7 @@ module MultiVideoStreaming
|
|
35
35
|
required_fields_validator_instance: required_fields_validator_instance,
|
36
36
|
https_service_instance: https_service_instance
|
37
37
|
)
|
38
|
-
platform_instance.upload_video(url: url)
|
38
|
+
platform_instance.upload_video(url: url, title: title)
|
39
39
|
end
|
40
40
|
|
41
41
|
response_instance.get_all_response
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_video_streaming
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.1.
|
4
|
+
version: 1.0.1.beta6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique Schmeller
|
@@ -91,7 +91,6 @@ files:
|
|
91
91
|
- lib/multi_video_streaming/helpers.rb
|
92
92
|
- lib/multi_video_streaming/helpers/get_default_error_message.rb
|
93
93
|
- lib/multi_video_streaming/helpers/sort_files_array_by_label.rb
|
94
|
-
- lib/multi_video_streaming/helpers/title_from_url.rb
|
95
94
|
- lib/multi_video_streaming/platforms_support.rb
|
96
95
|
- lib/multi_video_streaming/protocols.rb
|
97
96
|
- lib/multi_video_streaming/protocols/https.rb
|