360_services 1.0.8 → 1.0.9
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.
- data/360_services.gemspec +2 -2
- data/Rakefile +1 -1
- data/lib/sorenson/services/asset.rb +14 -2
- metadata +2 -2
data/360_services.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{360_services}
|
|
5
|
-
s.version = "1.0.
|
|
5
|
+
s.version = "1.0.9"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Sorenson Media"]
|
|
9
|
-
s.date = %q{2010-03-
|
|
9
|
+
s.date = %q{2010-03-19}
|
|
10
10
|
s.description = %q{Ruby bindings for Sorenson 360}
|
|
11
11
|
s.email = %q{video@sorensonmedia.com}
|
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/sorenson/services.rb", "lib/sorenson/services/account.rb", "lib/sorenson/services/array.rb", "lib/sorenson/services/asset.rb", "lib/sorenson/services/base.rb", "lib/sorenson/services/category.rb", "lib/sorenson/services/core_ext.rb", "lib/sorenson/services/core_ext/attribute_accessors.rb", "lib/sorenson/services/core_ext/hash.rb", "lib/sorenson/services/core_ext/object.rb", "lib/sorenson/services/event.rb", "lib/sorenson/services/flag.rb", "lib/sorenson/services/group.rb", "lib/sorenson/services/metric.rb", "lib/sorenson/services/preset.rb", "lib/sorenson/services/rate_plan.rb", "lib/sorenson/services/site.rb", "lib/sorenson/services/subaccount.rb", "lib/sorenson/services/tag.rb"]
|
data/Rakefile
CHANGED
|
@@ -4,7 +4,7 @@ require 'cucumber/rake/task'
|
|
|
4
4
|
require 'echoe'
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
Echoe.new('360_services', '1.0.
|
|
7
|
+
Echoe.new('360_services', '1.0.9') do |p|
|
|
8
8
|
p.description = "Ruby bindings for Sorenson 360"
|
|
9
9
|
p.url = "http://github.com/sorenson/360_services"
|
|
10
10
|
p.author = "Sorenson Media"
|
|
@@ -11,7 +11,7 @@ module Sorenson
|
|
|
11
11
|
:permalink_location, :status, :description, :video_duration, :abstract_file_id, :version_id,
|
|
12
12
|
:date_retrieved, :audio_data_rate, :audio_bitrate_mode, :video_codec, :display_name, :name,
|
|
13
13
|
:video_data_rate, :author_id, :width, :file_size, :thumbnail_image_url, :direct_asset_url,
|
|
14
|
-
:password, :metadata, :embed_list, :group_id
|
|
14
|
+
:password, :metadata, :embed_list, :group_id, :video_guid, :streaming_server_and_video_path
|
|
15
15
|
|
|
16
16
|
# Get all of the assets as a list of guids. Use offset and quantity to return subsets.
|
|
17
17
|
# Sorenson::Services::Account.login('username', 'password')
|
|
@@ -123,8 +123,19 @@ module Sorenson
|
|
|
123
123
|
|
|
124
124
|
def add_group(group)
|
|
125
125
|
data = Base.put_to("/groups/#{group.id}/assets/#{id}")
|
|
126
|
-
if data[
|
|
126
|
+
if data['status'].eql?('Success')
|
|
127
127
|
@group_id = group.id
|
|
128
|
+
else
|
|
129
|
+
data['status']
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def streaming_server_and_video_path
|
|
134
|
+
data = Base.get_from("/videos/#{id}/streaming_url")
|
|
135
|
+
if data['status'].eql?("not found")
|
|
136
|
+
nil
|
|
137
|
+
else
|
|
138
|
+
data
|
|
128
139
|
end
|
|
129
140
|
end
|
|
130
141
|
|
|
@@ -160,6 +171,7 @@ module Sorenson
|
|
|
160
171
|
@direct_asset_url = data['direct_asset_url']
|
|
161
172
|
@group_id = data['group_id']
|
|
162
173
|
@embed_list = data['embed_list']
|
|
174
|
+
@video_guid = @embed_list.empty? ? nil : @embed_list.first[1].match(/videoGUID=(.*?)&/)[1]
|
|
163
175
|
end
|
|
164
176
|
end
|
|
165
177
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: 360_services
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sorenson Media
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2010-03-
|
|
12
|
+
date: 2010-03-19 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|