brightcove_service 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +82 -6
- data/brightcove_service.gemspec +1 -1
- data/lib/brightcove_service/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bcce3851bbdd5c682eb4ac077b337be1f6a0c35
|
4
|
+
data.tar.gz: 643f72c01d5936ded89f76d2fc8c77ce8c728cef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a1c4f5017901cbac7215e574c11a98848dc41b2fdb633a13ef7bbef7d2f7af83ea001676d4021aab48ab3e13630bd8f49b1fcfb297bafe2d5376ad5116cc508
|
7
|
+
data.tar.gz: aad37aea8825194af608d6f1598837cd9f2688b3ef3da688f1d0883eb15c6f915e5555368964f9192a16df5bf8d6a6a9eaf1821c988d5d703364b50e86294c2c
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# BrightcoveService
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Ruby wrapper for creating videos and doing ingestion on brightcove
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,85 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
Gem expects following environment variable to be set correctly:
|
24
|
+
```
|
25
|
+
ENV['BRIGHTCOVE_CLIENT_ID']
|
26
|
+
ENV['BRIGHTCOVE_CLIENT_SECRET']
|
27
|
+
ENV['BRIGHTCOVE_ACCOUNT_ID']
|
28
|
+
```
|
29
|
+
|
30
|
+
### Creating video on brightcove
|
31
|
+
|
32
|
+
```
|
33
|
+
service = BrightcoveService::Video.new(params)
|
34
|
+
service.call # return true/false
|
35
|
+
service.result # get result
|
36
|
+
service.errors # get errors
|
37
|
+
```
|
38
|
+
|
39
|
+
params:
|
40
|
+
```
|
41
|
+
{
|
42
|
+
"brightcove_reference_id"=>"FRIENDSS02213",
|
43
|
+
"title_en"=>"episode",
|
44
|
+
"assets"=>{
|
45
|
+
"Go Sample.webp"=>{
|
46
|
+
"name"=>"Go", \\ indicates file to be uploaded
|
47
|
+
"type"=>"long_form_video",
|
48
|
+
"lang"=>"en"
|
49
|
+
},
|
50
|
+
"0"=>{
|
51
|
+
"url"=>"https://homepages.cae.wisc.edu/~ece533/images/airplane.png", \\ indicates url is already present
|
52
|
+
"type"=>"thumbnail",
|
53
|
+
"lang"=>"en"
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"start_date"=>"2018-08-29 09:19:38",
|
57
|
+
"end_date"=>"2018-10-05 09:19:41",
|
58
|
+
"restricted"=>"true",
|
59
|
+
"exclude_countries"=>"false",
|
60
|
+
"countries"=>[
|
61
|
+
"IN",
|
62
|
+
"ID",
|
63
|
+
"SG"
|
64
|
+
]
|
65
|
+
}
|
66
|
+
```
|
67
|
+
Response will be array object.
|
68
|
+
|
69
|
+
For each file to be uploaded there will be object in response
|
70
|
+
|
71
|
+
object consist of following keys:
|
72
|
+
```
|
73
|
+
1. video_id: brightcove video id
|
74
|
+
2. presigned_url: url on which file should be uploaded
|
75
|
+
3. request_url: ingestion video url
|
76
|
+
4. filename: filename
|
77
|
+
```
|
78
|
+
|
79
|
+
### Ingesting video
|
80
|
+
|
81
|
+
```
|
82
|
+
service = BrightcoveService::Ingest.new(params)
|
83
|
+
service.call # return true/false
|
84
|
+
service.result # get result
|
85
|
+
service.errors # get errors
|
86
|
+
```
|
87
|
+
|
88
|
+
params:
|
89
|
+
```
|
90
|
+
"text_tracks"=>{
|
91
|
+
"0"=>{
|
92
|
+
"url"=>"https://ingestion-upload-production.s3.amazonaws.com/578454510 1001/5832591619001/757ca3c3-a99f-487c-85bf-1badec004cd3/Tomb.Raider.2018.BluRay.720p.x264.DTS-HDC.srt.vtt",
|
93
|
+
"lang"=>"en"
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"master_url"=>"https://ingestion-upload-production.s3.amazonaws.com/5784545101001/58325916 19001/9c96277a-69cb-446c-b3ee-6f728662ca92/Go%2520Sample.webp",
|
97
|
+
"poster_url"=>"https://ingestion-upload -production.s3.amazonaws.com/5784545101001/5832591619001/350a7d28-9eaf-4ff3-907d-7673ab3e8a24/Sea_LionFish_ poster.png",
|
98
|
+
"thumbnail_url"=>"https://homepages.cae.wisc.edu/~ece533/images/airplane.png",
|
99
|
+
"video_id"=>"20398234619001"
|
100
|
+
}
|
101
|
+
```
|
26
102
|
|
27
103
|
## Development
|
28
104
|
|
@@ -32,7 +108,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
108
|
|
33
109
|
## Contributing
|
34
110
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
111
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/anilmaurya/brightcove_service. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
112
|
|
37
113
|
## License
|
38
114
|
|
@@ -40,4 +116,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
116
|
|
41
117
|
## Code of Conduct
|
42
118
|
|
43
|
-
Everyone interacting in the BrightcoveService project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
119
|
+
Everyone interacting in the BrightcoveService project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/anilmaurya/brightcove_service/blob/master/CODE_OF_CONDUCT.md).
|
data/brightcove_service.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{BrightcoveService Wrapper for Ruby}
|
13
13
|
spec.description = %q{BrightcoveService Wrapper for Ruby}
|
14
|
-
spec.homepage = ""
|
14
|
+
spec.homepage = "https://github.com/anilmaurya/brightcove_service"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightcove_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anil Maurya
|
@@ -102,7 +102,7 @@ files:
|
|
102
102
|
- lib/brightcove_service/ingest.rb
|
103
103
|
- lib/brightcove_service/version.rb
|
104
104
|
- lib/brightcove_service/video.rb
|
105
|
-
homepage:
|
105
|
+
homepage: https://github.com/anilmaurya/brightcove_service
|
106
106
|
licenses:
|
107
107
|
- MIT
|
108
108
|
metadata: {}
|