velir_kaltura-ruby 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc ADDED
@@ -0,0 +1,54 @@
1
+ = kaltura-ruby
2
+
3
+
4
+ A gem implementation of Kaltura's Ruby API client. The kaltura-ruby library suffers from poor namespacing, file separation, and a bug preventing multipart POST requests to the Kaltura API. This gem is a work in progress, and the interface may change between versions as this this library is one giant refactoring project.
5
+
6
+ Project Page - http://www.kaltura.org/project/kcl_ruby
7
+
8
+ Gem Documentation - http://rdoc.info/Velir/kaltura-ruby
9
+
10
+ = Installation
11
+
12
+ $ gem install velir_kaltura-ruby
13
+
14
+ In a rails application:
15
+
16
+ # config/environment.rb
17
+ config.gem "velir_kaltura-ruby,:lib=>"kaltura"
18
+
19
+
20
+ = Usage
21
+
22
+ require 'yaml'
23
+ require 'kaltura'
24
+
25
+ # These values may be retrieved from your KMC account
26
+ login_email = your_login_email
27
+ login_password = your_login_password
28
+ partner_id = your_partner_id
29
+ subpartner_id = your_subpartner_id
30
+ administrator_secret = your_administrator_secret
31
+ user_secret = your_user_secret
32
+
33
+ config = Kaltura::KalturaConfiguration.new( partner_id )
34
+ client = Kaltura::KalturaClient.new( config )
35
+ session = client.session_service.start( admin_secret, '', Kaltura::Constants::SessionType::ADMIN )
36
+ client.ks = session
37
+
38
+ filter = KalturaFilter.new
39
+ pager = KalturaFilterPager.new
40
+
41
+ media = client.media_service.list(filter, pager)
42
+ puts "\nmedia:"
43
+ puts media.to_yaml
44
+
45
+ #video = File.open("/home/papyromancer/ovb.ogv")
46
+ #client.media_service.upload(video)
47
+
48
+ == Copyright
49
+
50
+ The original Ruby client library for Kaltura may be found at http://www.kaltura.org/project/kcl_ruby . This implementation of the library as a gem attempts to track the Kaltura svn as closely as possible while adding relevant documentation.
51
+
52
+ This library is released in compliance with the GNU Affero General Public License.
53
+
54
+ Copyright (c) 2006-2010 Kaltura Inc. See LICENSE for details.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :patch: 5
4
+ :patch: 6
5
5
  :build:
@@ -859,6 +859,51 @@ module Kaltura
859
859
  end
860
860
  end #class PlaylistService
861
861
 
862
+ class ReportService < BaseService
863
+
864
+ def get_graphs(report_type, report_input_filter, dimension='', object_ids='')
865
+ kparams = {}
866
+ client.add_param(kparams, 'reportType', report_type)
867
+ client.add_param(kparams, 'reportInputFilter', report_input_filter)
868
+ client.add_param(kparams, 'dimension', dimension)
869
+ client.add_param(kparams, 'objectIds', object_ids)
870
+ perform_requesT('report','getGraphs',kparams,false)
871
+ end
872
+
873
+ def get_total(report_type, report_input_filter, object_ids='')
874
+ kparams = {}
875
+ client.add_param(kparams, 'reportType', report_type)
876
+ client.add_param(kparams, 'reportInputFilter', report_input_filter)
877
+ client.add_param(kparams, 'objectIds', object_ids)
878
+ perform_request('report','getTotal',kparams,false)
879
+ end
880
+
881
+ def get_table(report_type, report_input_filter, pager, order='', object_ids='')
882
+ kparams = {}
883
+ client.add_param(kparams, 'reportType', report_type)
884
+ client.add_param(kparams, 'reportInputFilter', report_input_filter)
885
+ client.add_param(kparams, 'pager', pager)
886
+ client.add_param(kparams, 'order', order)
887
+ client.add_param(kparams, 'objectIds', object_ids)
888
+ perform_request('report','getTable',kparams,false)
889
+ end
890
+
891
+ def get_url_for_report_as_csv(report_title, report_text, headers, report_type, report_input_filter, dimension='', pager=nil, order='', object_ids='')
892
+ kparams = {}
893
+ client.add_param(kparams, 'reportTitle', report_title)
894
+ client.add_param(kparams, 'reportText', report_text)
895
+ client.add_param(kparams, 'headers', headers)
896
+ client.add_param(kparams, 'reportType', report_type)
897
+ client.add_param(kparams, 'reportInputFilter', report_input_filter)
898
+ client.add_param(kparams, 'dimension', dimension)
899
+ client.add_param(kparams, 'pager', pager)
900
+ client.add_param(kparams, 'order', order)
901
+ client.add_param(kparams, 'objectIds', object_ids)
902
+ perform_request('report','getUrlForReportAsCsv',kparams,false)
903
+ end
904
+ end #class ReportService
905
+
906
+
862
907
  class SearchService < BaseService
863
908
 
864
909
  def search(search, pager=nil)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{velir_kaltura-ruby}
8
- s.version = "0.3.5"
8
+ s.version = "0.3.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"]
@@ -13,13 +13,15 @@ Gem::Specification.new do |s|
13
13
  s.email = %q{patrick.robertson@velir.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
16
- "README.markdown"
16
+ "README.markdown",
17
+ "README.rdoc"
17
18
  ]
18
19
  s.files = [
19
20
  ".document",
20
21
  ".gitignore",
21
22
  "LICENSE",
22
23
  "README.markdown",
24
+ "README.rdoc",
23
25
  "Rakefile",
24
26
  "VERSION",
25
27
  "VERSION.yml",
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: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 5
10
- version: 0.3.5
9
+ - 6
10
+ version: 0.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Robertson
@@ -85,11 +85,13 @@ extensions: []
85
85
  extra_rdoc_files:
86
86
  - LICENSE
87
87
  - README.markdown
88
+ - README.rdoc
88
89
  files:
89
90
  - .document
90
91
  - .gitignore
91
92
  - LICENSE
92
93
  - README.markdown
94
+ - README.rdoc
93
95
  - Rakefile
94
96
  - VERSION
95
97
  - VERSION.yml