cine_io 0.1.3 → 0.1.4
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 +4 -4
- data/README.md +2 -1
- data/lib/cine_io/streams_handler.rb +2 -2
- data/lib/cine_io/version.rb +1 -1
- data/spec/cine_io/streams_handler_spec.rb +14 -0
- data/spec/fixtures/vcr_cassettes/get_streams_with_name.yml +41 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3ccd155b8148f3fed15d31c35c5e5cb25f7b7ee
|
4
|
+
data.tar.gz: 809df6a76974eec887b362b0e2b3dec0b1691f7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff68c1b937c64b0d7d260394e9851c3af6ee9c7a22a704424bb8e0ef218f4a3d02190f57afa00fa78293167a0f4c45a2d14aeec9e31200b833f2e061c824408c
|
7
|
+
data.tar.gz: 591dc24a255f3ac151852ec37d11ffc6bd9a7e1fe425fe2a830f6333edae49299f8c33ef9c7563fd2c348badc06c74c7dcc935f46c9b91ff9d07816eec1e76e4
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ client = CineIo::Client.new(secretKey: 'YOUR_SECRET_KEY', masterKey: 'YOUR_MASTE
|
|
32
32
|
|
33
33
|
#### Projects
|
34
34
|
|
35
|
-
To get data about your
|
35
|
+
To get data about your projects:
|
36
36
|
|
37
37
|
```ruby
|
38
38
|
project = client.projects.index
|
@@ -69,6 +69,7 @@ To get all your streams:
|
|
69
69
|
|
70
70
|
```ruby
|
71
71
|
streams = client.streams.index
|
72
|
+
streams = client.streams.index(name: 'my custom name')
|
72
73
|
# => [CineIo::Stream, …]
|
73
74
|
```
|
74
75
|
|
data/lib/cine_io/version.rb
CHANGED
@@ -65,6 +65,20 @@ describe CineIo::StreamsHandler do
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
it "returns the streams with a name" do
|
69
|
+
VCR.use_cassette('get_streams_with_name') do
|
70
|
+
streams = subject.index(name: 'my name')
|
71
|
+
expect(streams.length).to eq(1)
|
72
|
+
stream = streams.first
|
73
|
+
expect(stream).to be_a(CineIo::Stream)
|
74
|
+
expect(stream.id).to eq("53718cef450ff80200f81856")
|
75
|
+
expect(stream.name).to eq("my name")
|
76
|
+
expect(stream.password).to eq("THEPASSWORD")
|
77
|
+
expect(stream.play.keys.sort).to eq(['hls', 'rtmp'])
|
78
|
+
expect(stream.publish.keys.sort).to eq(['stream', 'url'])
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
68
82
|
it 'can throw an error on api exception' do
|
69
83
|
VCR.use_cassette('get_streams_error') do
|
70
84
|
expect {subject.index}.to raise_error(CineIo::ApiError, "An unknown error has occured.")
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.cine.io/api/1/-/streams?name=my%20name&secretKey=MY%20SECRET
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
Date:
|
22
|
+
- Sun, 01 Jun 2014 23:00:30 GMT
|
23
|
+
Etag:
|
24
|
+
- ! '"141729763"'
|
25
|
+
Set-Cookie:
|
26
|
+
- connect.sid=s%3AmCygPst4k0FvNgN7v0iUWSzA.9SXtKjamHPmkxX%2F1xf6t87xWvgH1fGBmZoIwN7Rizck;
|
27
|
+
Path=/; HttpOnly
|
28
|
+
Vary:
|
29
|
+
- Accept-Encoding
|
30
|
+
X-Powered-By:
|
31
|
+
- Express
|
32
|
+
Content-Length:
|
33
|
+
- '381'
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
string: ! '[{"id":"53718cef450ff80200f81856","name":"my name","play":{"hls":"http://hls.cine.io/cines/cine1/cine1.m3u8","rtmp":"rtmp://fml.cine.io/20C45E/cines/cine1?adbe-live-event=cine1"},"publish":{"url":"rtmp://stream.lax.cine.io/20C45E/cines","stream":"cine1?THEPASSWORD&adbe-live-event=cine1"},"password":"THEPASSWORD","expiration":"2034-05-13T00:00:00.000Z","assignedAt":"2014-05-13T03:24:07.916Z"}]'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sun, 01 Jun 2014 23:00:30 GMT
|
41
|
+
recorded_with: VCR 2.3.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cine_io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cine.io
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08
|
11
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- spec/fixtures/vcr_cassettes/get_stream_recordings_error.yml
|
136
136
|
- spec/fixtures/vcr_cassettes/get_streams.yml
|
137
137
|
- spec/fixtures/vcr_cassettes/get_streams_error.yml
|
138
|
+
- spec/fixtures/vcr_cassettes/get_streams_with_name.yml
|
138
139
|
- spec/fixtures/vcr_cassettes/update_project.yml
|
139
140
|
- spec/fixtures/vcr_cassettes/update_project_error.yml
|
140
141
|
- spec/fixtures/vcr_cassettes/update_stream.yml
|
@@ -195,6 +196,7 @@ test_files:
|
|
195
196
|
- spec/fixtures/vcr_cassettes/get_stream_recordings_error.yml
|
196
197
|
- spec/fixtures/vcr_cassettes/get_streams.yml
|
197
198
|
- spec/fixtures/vcr_cassettes/get_streams_error.yml
|
199
|
+
- spec/fixtures/vcr_cassettes/get_streams_with_name.yml
|
198
200
|
- spec/fixtures/vcr_cassettes/update_project.yml
|
199
201
|
- spec/fixtures/vcr_cassettes/update_project_error.yml
|
200
202
|
- spec/fixtures/vcr_cassettes/update_stream.yml
|