limelight_video 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -77,6 +77,13 @@ class Limelight
77
77
  JSON.parse response.body
78
78
  end
79
79
 
80
+ def publish_channel(id)
81
+ path = generate_encoded_path('put', "#{@base_channels_url}/#{id}/properties")
82
+ response = @client.put(path, state: "Published")
83
+
84
+ JSON.parse response.body
85
+ end
86
+
80
87
  def create_metadata(names)
81
88
  # http://api.videoplatform.limelight.com/rest/organizations/<org id>/media/properties/custom/<property name>
82
89
  Array(names).each do |name|
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "limelight_video"
3
- s.version = "0.0.5"
3
+ s.version = "0.0.6"
4
4
  s.summary = "Limelight video client"
5
5
  s.description = "Interact with the Limelight CDN platform"
6
6
  s.authors = ["elcuervo"]
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://api.videoplatform.limelight.com/rest/organizations/889457f434f14057bdcc9a1f39bd9614/channels?access_key=5CIILY3Sw1P%2FqF2VHikRPXMEPdA%3D&expires=1340974510&signature=w71jfoX%2BSfFflZxbsGdpTkK8z9KHDpbPnetmKMWsBj4%3D
5
+ uri: http://api.videoplatform.limelight.com/rest/organizations/889457f434f14057bdcc9a1f39bd9614/channels?access_key=5CIILY3Sw1P%2FqF2VHikRPXMEPdA%3D&expires=1340976150&signature=dUNBjrNO86jFOLXXTRY%2FJCrgXCFe9lOGVyjx4WmippU%3D
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: title=test
@@ -23,7 +23,7 @@ http_interactions:
23
23
  server:
24
24
  - nginx/0.8.54
25
25
  date:
26
- - Fri, 29 Jun 2012 12:50:12 GMT
26
+ - Fri, 29 Jun 2012 13:17:32 GMT
27
27
  content-type:
28
28
  - application/json; charset=utf-8
29
29
  connection:
@@ -33,14 +33,59 @@ http_interactions:
33
33
  status:
34
34
  - 201 Created
35
35
  x-runtime:
36
- - 1650ms
36
+ - 903ms
37
37
  content-length:
38
38
  - "393"
39
39
  via:
40
- - 1.0 vps-099.iad.llnw.net
40
+ - 1.0 vps-095.iad.llnw.net
41
41
  body:
42
42
  encoding: US-ASCII
43
- string: "{\"publish_date\": null, \"email_enabled\": false, \"thumbnail_url\": \"\", \"description\": null, \"embed_enabled\": false, \"title\": \"test\", \"channel_id\": \"49f3caaa940f4ddeb32d0149e9ccb15e\", \"search_inside_enabled\": false, \"rss_enabled\": false, \"create_date\": 1340974212, \"state\": \"NotPublished\", \"itunes_rss_enabled\": false, \"autoplay_enabled\": false, \"update_date\": 1340974212, \"custom_property\": null}"
43
+ string: "{\"publish_date\": null, \"email_enabled\": false, \"thumbnail_url\": \"\", \"description\": null, \"embed_enabled\": false, \"title\": \"test\", \"channel_id\": \"d7203f2eacdb4c27bf6e44a9814c8cc8\", \"search_inside_enabled\": false, \"rss_enabled\": false, \"create_date\": 1340975852, \"state\": \"NotPublished\", \"itunes_rss_enabled\": false, \"autoplay_enabled\": false, \"update_date\": 1340975852, \"custom_property\": null}"
44
44
  http_version: "1.1"
45
- recorded_at: Fri, 29 Jun 2012 12:50:12 GMT
45
+ recorded_at: Fri, 29 Jun 2012 13:17:32 GMT
46
+ - request:
47
+ method: put
48
+ uri: http://api.videoplatform.limelight.com/rest/organizations/889457f434f14057bdcc9a1f39bd9614/channels/d7203f2eacdb4c27bf6e44a9814c8cc8/properties?access_key=5CIILY3Sw1P%2FqF2VHikRPXMEPdA%3D&expires=1340976152&signature=PvybEx4CJlL5D2Ho0mHypdAjec2vByjEqyUpPRZxvSs%3D
49
+ body:
50
+ encoding: US-ASCII
51
+ string: state=Published
52
+ headers:
53
+ content-type:
54
+ - application/x-www-form-urlencoded
55
+ accept:
56
+ - "*/*"
57
+ user-agent:
58
+ - Ruby
59
+ connection:
60
+ - close
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ server:
67
+ - nginx/0.8.54
68
+ date:
69
+ - Fri, 29 Jun 2012 13:17:34 GMT
70
+ content-type:
71
+ - application/json; charset=utf-8
72
+ connection:
73
+ - close
74
+ cache-control:
75
+ - private, max-age=0, must-revalidate
76
+ status:
77
+ - 200 OK
78
+ x-runtime:
79
+ - 1347ms
80
+ etag:
81
+ - "\"08b7b5cfa2c13cf020f9dc1663f9f0ea\""
82
+ content-length:
83
+ - "396"
84
+ via:
85
+ - 1.0 vps-098.iad.llnw.net
86
+ body:
87
+ encoding: US-ASCII
88
+ string: "{\"publish_date\": 1340975854, \"email_enabled\": false, \"thumbnail_url\": \"\", \"description\": null, \"embed_enabled\": false, \"title\": \"test\", \"channel_id\": \"d7203f2eacdb4c27bf6e44a9814c8cc8\", \"search_inside_enabled\": false, \"rss_enabled\": false, \"create_date\": 1340975852, \"state\": \"Published\", \"itunes_rss_enabled\": false, \"autoplay_enabled\": false, \"update_date\": 1340975854, \"custom_property\": null}"
89
+ http_version: "1.1"
90
+ recorded_at: Fri, 29 Jun 2012 13:17:35 GMT
46
91
  recorded_with: VCR 2.1.1
@@ -48,6 +48,10 @@ describe Limelight do
48
48
  with_a_cassette('create a channel') do
49
49
  channel = @limelight.create_channel('test')
50
50
  assert channel["channel_id"]
51
+
52
+ channel = @limelight.publish_channel channel["channel_id"]
53
+ assert_equal channel["state"], "Published"
54
+
51
55
  end
52
56
  end
53
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limelight_video
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: