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.
Project Page - www.kaltura.org/project/kcl_ruby
Gem Documentation - rdoc.info/projects/Velir/kaltura-ruby
$ gem install velir_kaltura-ruby
In a rails application:
# config/environment.rb config.gem "velir_kaltura-ruby",:lib=>"kaltura"
require 'yaml' require 'kaltura' # These values may be retrieved from your KMC account login_email = your_login_email login_password = your_login_password partner_id = your_partner_id subpartner_id = your_subpartner_id administrator_secret = your_administrator_secret user_secret = your_user_secret
service_url = custom_kce_service_url # url to your own kaltura ce instance.
config = Kaltura::Configuration.new( service_url, partner_id ) client = Kaltura::Client.new( config ) session = client.session_service.start( administrator_secret, '', Kaltura::Constants::SessionType::ADMIN ) client.ks = session filter = Kaltura::Filter::BaseFilter.new pager = Kaltura::FilterPager.new media = client.media_service.list(filter, pager) puts "\nmedia:" puts media.to_yaml
If your running tests you need the following dependencies. sudo gem install jeweler
sudo gem install spicycode-rcov sudo gem install shoulda
Set up yaml file: copy the config/server.yml.template to config/server.yml and enter your kaltura information Execute the tests: rake test You should see the following results: 3 tests, 2 assertions, 0 failures, 0 errors, 0 skips
Venturit team is in the process of adding more tests. Should be available soon.
The original Ruby client library for Kaltura may be found at 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.
This library is released in compliance with the GNU Affero General Public License.
Copyright © 2006-2010 Kaltura Inc. See LICENSE for details.