velir_kaltura-ruby 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +1,57 @@
1
1
  module Kaltura
2
2
  module Service
3
+
4
+ ##
5
+ # The Flavor Params service is responsible for adding and managing flavor params
6
+ ##
3
7
  class FlavorParamsService < BaseService
4
8
 
9
+ ##
10
+ # Adds a new Flavor param.
11
+ #
12
+ # @param [Kaltura::FlavorParams] flavor_params The flavor params object to add to Kaltura.
13
+ #
14
+ # @return [Kaltura::FlavorParams] Returns the flavor params object as stored in the Kaltura system.
15
+ # Would be helpful to store the ID for later use.
16
+ #
17
+ # @raise [Kaltura::APIError] Raises default Kaltura API errors
18
+ ##
5
19
  def add(flavor_params)
6
20
  kparams = {}
7
21
  client.add_param(kparams, 'flavorParams', flavor_params)
8
22
  perform_request('flavorParams','add',kparams,false)
9
23
  end
10
24
 
25
+ ##
26
+ # Retrieves a flavor param.
27
+ #
28
+ # @param [Integer] id The flavor param ID.
29
+ #
30
+ # @return [Kaltura::FlavorParams] The requested flavor params.
31
+ #
32
+ # @raise [Kaltura::APIError] Raises default Kaltura API errors.
33
+ ##
11
34
  def get(id)
12
35
  kparams = {}
13
36
  client.add_param(kparams, 'id', id)
14
37
  perform_request('flavorParams','get',kparams,false)
15
38
  end
16
39
 
40
+ ##
41
+ # Updates an existing flavor params object.
42
+ # As with other Kaltura API update actions, it is best to instantiate a new flavor params
43
+ # object instead of retrieving the existing one. You only add fields for the fields you wish to
44
+ # change.
45
+ #
46
+ # @param [Integer] id The flavor param ID.
47
+ # @param [Kaltura::FlavorParams] A newly instantiated flavor params object that contains the fields
48
+ # you wish to change on the existing flavor params object.
49
+ #
50
+ # @return [Kaltura::FlavorParams] The newly updated flavor param object. The version will have been bumped.
51
+ #
52
+ # @raise [Kaltura::APIError] Raises default Kaltura API errors.
53
+ #
54
+ ##
17
55
  def update(id, flavor_params)
18
56
  kparams = {}
19
57
  client.add_param(kparams, 'id', id)
@@ -21,12 +59,32 @@ module Kaltura
21
59
  perform_request('flavorParams','update',kparams,false)
22
60
  end
23
61
 
62
+ ##
63
+ # Deletes the requested flavor param.
64
+ #
65
+ # @param [Integer] id The flavor param id.
66
+ #
67
+ # @return [nil] Returns nothing.
68
+ #
69
+ # @raise [Kaltura::APIError] Raises default Kaltura API errors.
70
+ ##
24
71
  def delete(id)
25
72
  kparams = {}
26
73
  client.add_param(kparams, 'id', id)
27
74
  perform_request('flavorParams','delete',kparams,false)
28
75
  end
29
76
 
77
+ ##
78
+ # Lists flavor params by filter with paging support.
79
+ # In addition, all system default parameters will be listed as well.
80
+ #
81
+ # @param [Kaltura::Filter::FlavorParamsFilter] filter The filter to apply.
82
+ # @param [Kaltura::FilterPager] The default Kaltura pager.
83
+ #
84
+ # @return [Kaltura::Response::FlavorParamsListResponse] Wrapper for Kaltura::Response::BaseResponse.
85
+ #
86
+ # @raise [Kaltura::APIError] Raises default Kaltura API errors.
87
+ ##
30
88
  def list(filter=nil, pager=nil)
31
89
  kparams = {}
32
90
  client.add_param(kparams, 'filter', filter)
@@ -34,6 +92,15 @@ module Kaltura
34
92
  perform_request('flavorParams','list',kparams,false)
35
93
  end
36
94
 
95
+ ##
96
+ # Retrieves all flavor params from a specific Conversion Profile.
97
+ #
98
+ # @param [Integer] conversion_profile_id The conversion profile ID.
99
+ #
100
+ # @return [Array] Returns an array of Flavor Params with a specific conversion profile.
101
+ #
102
+ # @raise [Kaltura::APIError] Raises default Kaltura API errors
103
+ ##
37
104
  def get_by_conversion_profile_id(conversion_profile_id)
38
105
  kparams = {}
39
106
  client.add_param(kparams, 'conversionProfileId', conversion_profile_id)
@@ -1,20 +1,61 @@
1
1
  module Kaltura
2
2
  module Service
3
+
4
+ ##
5
+ # The live stream service lets you manage live stream channels.
6
+ ##
3
7
  class LiveStreamService < BaseService
4
-
8
+
9
+ ##
10
+ # Adds a new live stream entry.
11
+ # The entry will be queued for provision. Note, this uses a LiveStreamAdminEntry instead of a
12
+ # normal LiveStreamEntry object. LiveStreamAdminEntry is a child class, and adds a few fields
13
+ # pertinent to administering a Live stream.
14
+ #
15
+ # @param [Kaltura::LiveStreamAdminEntry] live_stream_entry The live stream entry metadata.
16
+ # In order to succesfully create a live stream entry you need to have the media_type,
17
+ # encoding_ip1, and encoding_ip2 fields populated.
18
+ #
19
+ # @return [Kaltura::LiveStreamAdminEntry] Returns the live stream entry saved on the database.
20
+ # It might be a good idea to save the ID field on return.
21
+ #
22
+ # @raise [Kaltura::APIError] Raises 'PROPERTY_VALIDATION_CANNOT_BE_NULL' if media_type, encoding_ip1,
23
+ # or encoding_ip2 are null.
24
+ #
25
+ ##
5
26
  def add(live_stream_entry)
6
27
  kparams = {}
7
28
  client.add_param(kparams, 'liveStreamEntry', live_stream_entry)
8
29
  perform_request('liveStream','add',kparams,false)
9
30
  end
10
31
 
32
+ ##
33
+ # Retrieves a live stream entry by ID.
34
+ # The Kaltura API docs indicate that this action will return a LiveStreamEntry object,
35
+ # but the reality is that it will return a LiveStreamAdminEntry object instead.
36
+ #
37
+ # @param [String] entry_id The live stream entry ID.
38
+ # @param [Integer] version The version of the entry.
39
+ #
40
+ # @return [Kaltura::LiveStreamAdminEntry] The requested live stream object.
41
+ #
42
+ # @raise [Kaltura::APIError] Raises 'ENTRY_ID_NOT_FOUND' if the entry doesn't exist.
43
+ ##
11
44
  def get(entry_id, version=-1)
12
45
  kparams = {}
13
46
  client.add_param(kparams, 'entryId', entry_id)
14
47
  client.add_param(kparams, 'version', version)
15
48
  perform_request('liveStream','get',kparams,false)
16
49
  end
17
-
50
+
51
+ ##
52
+ # Updates a live stream entry object.
53
+ # Like all of the other Kaltura API update actions it is best to instantiate a new LiveStreamAdminEntry object
54
+ # instead of pulling the existing one and updating its fields.
55
+ #
56
+ # @param [String] The
57
+ #
58
+ ##
18
59
  def update(entry_id, live_stream_entry)
19
60
  kparams = {}
20
61
  client.add_param(kparams, 'entryId', entry_id)
@@ -31,10 +31,35 @@ require 'kaltura/service/system_user_service'
31
31
  require 'kaltura/service/system_partner_service'
32
32
 
33
33
  module Kaltura
34
+ ##
35
+ # The service module provides instance methods to the Kaltura::Client class. This is the bulk of API actions.
36
+ ##
34
37
  module Service
35
-
38
+
39
+ ##
40
+ # FileSyncService is a system user service.
41
+ #
42
+ # @example List up to 100 file sync objects with an error status:
43
+ # client = Kaltura::Client.new
44
+ # filter = Kaltura::Filter::FileSyncFilter.new
45
+ # filter.status_equal = Kaltura::Constants::FileSync::Status::ERROR
46
+ # pager = Kaltura::FilterPager.new
47
+ # pager.page_size = 100
48
+ # client.file_sync_service.list(filter,pager)
49
+ #
50
+ ##
36
51
  class FileSyncService < BaseService
37
-
52
+
53
+ ##
54
+ # Lists file sync objects by a filter and a pager.
55
+ #
56
+ # @param [Kaltura::Filter::FileSyncFilter] filter The filter to apply to the list.
57
+ # @param [Kaltura::FilterPager] pager The default pager to apply to large lists.
58
+ #
59
+ # @return [Kaltura::Response::FileSyncListResponse] FileSyncListResponse is equivalent to Kaltura::Response::BaseResponse
60
+ #
61
+ # @raise [Kaltura::APIError] raises default Kaltura errors.
62
+ ##
38
63
  def list(filter=nil, pager=nil)
39
64
  kparams = {}
40
65
  client.add_param(kparams, 'filter', filter)
@@ -43,8 +68,22 @@ module Kaltura
43
68
  end
44
69
  end #class FileSyncService
45
70
 
71
+ ##
72
+ # FlavorParamsOutputService is not documented by Kaltura. Probably best to not play with this.
73
+ # This is likely just used internally by the KMC.
74
+ ##
46
75
  class FlavorParamsOutputService < BaseService
47
76
 
77
+ ##
78
+ # Lists file sync objects by a filter and a pager.
79
+ #
80
+ # @param [Kaltura::Filter::FlavorParamsOutputFilter] filter The filter to apply to the list action.
81
+ # @param [Kaltura::FilterPager] pager The default pager to apply to large lists.
82
+ #
83
+ # @return [Kaltura::Response::FlavorParamsOutputListResponse] This is equivalent to the BaseResponse class.
84
+ #
85
+ # @raise [Kaltura::APIError] raises default Kaltura errors.
86
+ ##
48
87
  def list(filter=nil, pager=nil)
49
88
  kparams = {}
50
89
  client.add_param(kparams, 'filter', filter)
@@ -53,8 +92,21 @@ module Kaltura
53
92
  end
54
93
  end #class FlavorParamsOutputService
55
94
 
95
+ ##
96
+ # MediaInfoService is not documented by Kaltura. Probably best to not play with this.
97
+ # This is likely just used internally by the KMC.
98
+ ##
56
99
  class MediaInfoService < BaseService
57
-
100
+ ##
101
+ # Lists media info objects by a filter and a pager.
102
+ #
103
+ # @param [Kaltura::Filter::MediaInfoFilter] filter The filter to apply to the list action.
104
+ # @param [Kaltura::FilterPager] pager The default pager to apply to large lists.
105
+ #
106
+ # @return [Kaltura::Response::MediaInfoListResponse] This is equivalent to the BaseResponse class.
107
+ #
108
+ # @raise [Kaltura::APIError] raises default Kaltura errors.
109
+ ##
58
110
  def list(filter=nil, pager=nil)
59
111
  kparams = {}
60
112
  client.add_param(kparams, 'filter', filter)
@@ -63,8 +115,22 @@ module Kaltura
63
115
  end
64
116
  end #class MediaInfoService
65
117
 
118
+ ##
119
+ # EntryAdminService is not documented by Kaltura. Probably best not to play with this.
120
+ # This is likely just used internally by the KMC.
121
+ ##
66
122
  class EntryAdminService < BaseService
67
123
 
124
+ ##
125
+ # Gets an EntryAdmin object by entry_id.
126
+ #
127
+ # @param [String] entry_id Media entry id
128
+ # @param [Integer] version Desired version of the data.
129
+ #
130
+ # @return [Object] Not entirely sure what this returns.
131
+ #
132
+ # @raise [Kaltura::APIError] Raises default Kaltura errors.
133
+ ##
68
134
  def get(entry_id, version=-1)
69
135
  kparams = {}
70
136
  client.add_param(kparams, 'entryId', entry_id)
data/lib/kaltura.rb CHANGED
@@ -12,8 +12,8 @@ require 'net/http'
12
12
  require 'digest/md5'
13
13
  require 'rexml/document'
14
14
 
15
- #include Kaltura
16
-
15
+ ##
16
+ # the Kaltura Module's sole function is to provide the top level namespace for the Kaltura API Library client.
17
+ ##
17
18
  module Kaltura
18
-
19
19
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{velir_kaltura-ruby}
8
- s.version = "0.4.5"
8
+ s.version = "0.4.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Patrick Robertson"]
12
- s.date = %q{2010-09-29}
12
+ s.date = %q{2010-10-11}
13
13
  s.email = %q{patrick.robertson@velir.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -159,19 +159,19 @@ Gem::Specification.new do |s|
159
159
  s.specification_version = 3
160
160
 
161
161
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
162
- s.add_runtime_dependency(%q<activesupport>, ["<= 2.3.8"])
163
- s.add_runtime_dependency(%q<activeresource>, ["<= 2.3.8"])
162
+ s.add_runtime_dependency(%q<activesupport>, [">= 2.3.8"])
163
+ s.add_runtime_dependency(%q<activeresource>, [">= 2.3.8"])
164
164
  s.add_runtime_dependency(%q<json>, [">= 0"])
165
165
  s.add_runtime_dependency(%q<rest-client>, [">= 1.5.1"])
166
166
  else
167
- s.add_dependency(%q<activesupport>, ["<= 2.3.8"])
168
- s.add_dependency(%q<activeresource>, ["<= 2.3.8"])
167
+ s.add_dependency(%q<activesupport>, [">= 2.3.8"])
168
+ s.add_dependency(%q<activeresource>, [">= 2.3.8"])
169
169
  s.add_dependency(%q<json>, [">= 0"])
170
170
  s.add_dependency(%q<rest-client>, [">= 1.5.1"])
171
171
  end
172
172
  else
173
- s.add_dependency(%q<activesupport>, ["<= 2.3.8"])
174
- s.add_dependency(%q<activeresource>, ["<= 2.3.8"])
173
+ s.add_dependency(%q<activesupport>, [">= 2.3.8"])
174
+ s.add_dependency(%q<activeresource>, [">= 2.3.8"])
175
175
  s.add_dependency(%q<json>, [">= 0"])
176
176
  s.add_dependency(%q<rest-client>, [">= 1.5.1"])
177
177
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: velir_kaltura-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 5
10
- version: 0.4.5
9
+ - 6
10
+ version: 0.4.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Robertson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-29 00:00:00 -04:00
18
+ date: 2010-10-11 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -24,7 +24,7 @@ dependencies:
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - <=
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  hash: 19
30
30
  segments:
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - <=
43
+ - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  hash: 19
46
46
  segments: