velir_kaltura-ruby 0.3.2 → 0.3.3
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/README.markdown +56 -0
- data/VERSION.yml +1 -1
- data/lib/kaltura/kaltura_client_base.rb +0 -8
- data/lib/kaltura/service.rb +41 -32
- data/velir_kaltura-ruby.gemspec +3 -3
- metadata +5 -5
- data/README.rdoc +0 -45
data/README.markdown
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
[Kaltura.org 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
|
+
|
|
23
|
+
require 'yaml'
|
|
24
|
+
require 'kaltura'
|
|
25
|
+
|
|
26
|
+
# These values may be retrieved from your KMC account
|
|
27
|
+
login_email = your_login_email
|
|
28
|
+
login_password = your_login_password
|
|
29
|
+
partner_id = your_partner_id
|
|
30
|
+
subpartner_id = your_subpartner_id
|
|
31
|
+
administrator_secret = your_administrator_secret
|
|
32
|
+
user_secret = your_user_secret
|
|
33
|
+
|
|
34
|
+
config = Kaltura::KalturaConfiguration.new( partner_id )
|
|
35
|
+
client = Kaltura::KalturaClient.new( config )
|
|
36
|
+
session = client.session_service.start( admin_secret, '', Kaltura::Constants::SessionType::ADMIN )
|
|
37
|
+
client.ks = session
|
|
38
|
+
|
|
39
|
+
filter = KalturaFilter.new
|
|
40
|
+
pager = KalturaFilterPager.new
|
|
41
|
+
|
|
42
|
+
media = client.media_service.list(filter, pager)
|
|
43
|
+
puts "\nmedia:"
|
|
44
|
+
puts media.to_yaml
|
|
45
|
+
|
|
46
|
+
#video = File.open("/home/papyromancer/ovb.ogv")
|
|
47
|
+
#client.media_service.upload(video)
|
|
48
|
+
|
|
49
|
+
Copyright
|
|
50
|
+
---------
|
|
51
|
+
|
|
52
|
+
The original Ruby client library for Kaltura may be found at [http://www.kaltura.org/project/kcl_ruby](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.
|
|
53
|
+
|
|
54
|
+
This library is released in compliance with the GNU Affero General Public License.
|
|
55
|
+
|
|
56
|
+
Copyright (c) 2006-2010 Kaltura Inc. See LICENSE for details.
|
data/VERSION.yml
CHANGED
|
@@ -213,14 +213,6 @@ module Kaltura
|
|
|
213
213
|
end
|
|
214
214
|
end
|
|
215
215
|
|
|
216
|
-
class KalturaServiceBase
|
|
217
|
-
attr_accessor :client
|
|
218
|
-
|
|
219
|
-
def initialize(client)
|
|
220
|
-
@client = client
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
|
|
224
216
|
class KalturaConfiguration
|
|
225
217
|
attr_accessor :logger
|
|
226
218
|
attr_accessor :service_url
|
data/lib/kaltura/service.rb
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module Kaltura
|
|
4
4
|
module Service
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
class BaseService
|
|
7
|
+
attr_accessor :client
|
|
8
|
+
|
|
9
|
+
def initialize(client)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
end #class BaseService
|
|
13
|
+
|
|
14
|
+
class AccessControlService < BaseService
|
|
6
15
|
def initialize(client)
|
|
7
16
|
super(client)
|
|
8
17
|
end
|
|
@@ -60,7 +69,7 @@ module Kaltura
|
|
|
60
69
|
end
|
|
61
70
|
end #class AccessControlService
|
|
62
71
|
|
|
63
|
-
class AdminUserService <
|
|
72
|
+
class AdminUserService < BaseService
|
|
64
73
|
def initialize(client)
|
|
65
74
|
super(client)
|
|
66
75
|
end
|
|
@@ -100,7 +109,7 @@ module Kaltura
|
|
|
100
109
|
end
|
|
101
110
|
end #class AdminUserService
|
|
102
111
|
|
|
103
|
-
class BaseEntryService <
|
|
112
|
+
class BaseEntryService < BaseService
|
|
104
113
|
def initialize(client)
|
|
105
114
|
super(client)
|
|
106
115
|
end
|
|
@@ -288,7 +297,7 @@ module Kaltura
|
|
|
288
297
|
end
|
|
289
298
|
end #class BaseEntryService
|
|
290
299
|
|
|
291
|
-
class BulkUploadService <
|
|
300
|
+
class BulkUploadService < BaseService
|
|
292
301
|
def initialize(client)
|
|
293
302
|
super(client)
|
|
294
303
|
end
|
|
@@ -325,7 +334,7 @@ module Kaltura
|
|
|
325
334
|
end
|
|
326
335
|
end #class BulkUploadService
|
|
327
336
|
|
|
328
|
-
class CategoryService <
|
|
337
|
+
class CategoryService < BaseService
|
|
329
338
|
def initialize(client)
|
|
330
339
|
super(client)
|
|
331
340
|
end
|
|
@@ -382,7 +391,7 @@ module Kaltura
|
|
|
382
391
|
end
|
|
383
392
|
end #class CategoryService
|
|
384
393
|
|
|
385
|
-
class ConversionProfileService <
|
|
394
|
+
class ConversionProfileService < BaseService
|
|
386
395
|
def initialize(client)
|
|
387
396
|
super(client)
|
|
388
397
|
end
|
|
@@ -440,7 +449,7 @@ module Kaltura
|
|
|
440
449
|
end
|
|
441
450
|
end #class ConversionProfileService
|
|
442
451
|
|
|
443
|
-
class DataService <
|
|
452
|
+
class DataService < BaseService
|
|
444
453
|
def initialize(client)
|
|
445
454
|
super(client)
|
|
446
455
|
end
|
|
@@ -500,7 +509,7 @@ module Kaltura
|
|
|
500
509
|
end #class DataService
|
|
501
510
|
|
|
502
511
|
|
|
503
|
-
class EmailIngestionProfileService <
|
|
512
|
+
class EmailIngestionProfileService < BaseService
|
|
504
513
|
def initialize(client)
|
|
505
514
|
super(client)
|
|
506
515
|
end
|
|
@@ -571,7 +580,7 @@ module Kaltura
|
|
|
571
580
|
end
|
|
572
581
|
end #class EmailIngestionProfileService
|
|
573
582
|
|
|
574
|
-
class FlavorAssetService <
|
|
583
|
+
class FlavorAssetService < BaseService
|
|
575
584
|
def initialize(client)
|
|
576
585
|
super(client)
|
|
577
586
|
end
|
|
@@ -658,7 +667,7 @@ module Kaltura
|
|
|
658
667
|
end
|
|
659
668
|
end #class FlavorAssetService
|
|
660
669
|
|
|
661
|
-
class FlavorParamsService <
|
|
670
|
+
class FlavorParamsService < BaseService
|
|
662
671
|
def initialize(client)
|
|
663
672
|
super(client)
|
|
664
673
|
end
|
|
@@ -726,7 +735,7 @@ module Kaltura
|
|
|
726
735
|
end
|
|
727
736
|
end #class FlavorParamsService
|
|
728
737
|
|
|
729
|
-
class LiveStreamService <
|
|
738
|
+
class LiveStreamService < BaseService
|
|
730
739
|
def initialize(client)
|
|
731
740
|
super(client)
|
|
732
741
|
end
|
|
@@ -807,7 +816,7 @@ module Kaltura
|
|
|
807
816
|
end
|
|
808
817
|
end #class LiveStreamService
|
|
809
818
|
|
|
810
|
-
class MediaService <
|
|
819
|
+
class MediaService < BaseService
|
|
811
820
|
def initialize(client)
|
|
812
821
|
super(client)
|
|
813
822
|
end
|
|
@@ -1040,7 +1049,7 @@ module Kaltura
|
|
|
1040
1049
|
end
|
|
1041
1050
|
end #class MediaService
|
|
1042
1051
|
|
|
1043
|
-
class MixingService <
|
|
1052
|
+
class MixingService < BaseService
|
|
1044
1053
|
def initialize(client)
|
|
1045
1054
|
super(client)
|
|
1046
1055
|
end
|
|
@@ -1174,7 +1183,7 @@ module Kaltura
|
|
|
1174
1183
|
end
|
|
1175
1184
|
end #class MixingService
|
|
1176
1185
|
|
|
1177
|
-
class NotificationService <
|
|
1186
|
+
class NotificationService < BaseService
|
|
1178
1187
|
def initialize(client)
|
|
1179
1188
|
super(client)
|
|
1180
1189
|
end
|
|
@@ -1191,7 +1200,7 @@ module Kaltura
|
|
|
1191
1200
|
end
|
|
1192
1201
|
end #class NotificationService
|
|
1193
1202
|
|
|
1194
|
-
class PartnerService <
|
|
1203
|
+
class PartnerService < BaseService
|
|
1195
1204
|
def initialize(client)
|
|
1196
1205
|
super(client)
|
|
1197
1206
|
end
|
|
@@ -1252,7 +1261,7 @@ module Kaltura
|
|
|
1252
1261
|
end
|
|
1253
1262
|
end #class PartnerService
|
|
1254
1263
|
|
|
1255
|
-
class PlaylistService <
|
|
1264
|
+
class PlaylistService < BaseService
|
|
1256
1265
|
def initialize(client)
|
|
1257
1266
|
super(client)
|
|
1258
1267
|
end
|
|
@@ -1361,7 +1370,7 @@ module Kaltura
|
|
|
1361
1370
|
end
|
|
1362
1371
|
end #class PlaylistService
|
|
1363
1372
|
|
|
1364
|
-
class SearchService <
|
|
1373
|
+
class SearchService < BaseService
|
|
1365
1374
|
def initialize(client)
|
|
1366
1375
|
super(client)
|
|
1367
1376
|
end
|
|
@@ -1411,7 +1420,7 @@ module Kaltura
|
|
|
1411
1420
|
end
|
|
1412
1421
|
end #class SearchService
|
|
1413
1422
|
|
|
1414
|
-
class SessionService <
|
|
1423
|
+
class SessionService < BaseService
|
|
1415
1424
|
def initialize(client)
|
|
1416
1425
|
super(client)
|
|
1417
1426
|
end
|
|
@@ -1443,7 +1452,7 @@ module Kaltura
|
|
|
1443
1452
|
end
|
|
1444
1453
|
end #class SessionService
|
|
1445
1454
|
|
|
1446
|
-
class StatsService <
|
|
1455
|
+
class StatsService < BaseService
|
|
1447
1456
|
def initialize(client)
|
|
1448
1457
|
super(client)
|
|
1449
1458
|
end
|
|
@@ -1479,7 +1488,7 @@ module Kaltura
|
|
|
1479
1488
|
end
|
|
1480
1489
|
end #class StatsService
|
|
1481
1490
|
|
|
1482
|
-
class SyndicationFeedService <
|
|
1491
|
+
class SyndicationFeedService < BaseService
|
|
1483
1492
|
def initialize(client)
|
|
1484
1493
|
super(client)
|
|
1485
1494
|
end
|
|
@@ -1557,7 +1566,7 @@ module Kaltura
|
|
|
1557
1566
|
end
|
|
1558
1567
|
end #class SyndicationFeedService
|
|
1559
1568
|
|
|
1560
|
-
class KalturaSystemService <
|
|
1569
|
+
class KalturaSystemService < BaseService
|
|
1561
1570
|
def initialize(client)
|
|
1562
1571
|
super(client)
|
|
1563
1572
|
end
|
|
@@ -1572,7 +1581,7 @@ module Kaltura
|
|
|
1572
1581
|
end
|
|
1573
1582
|
end
|
|
1574
1583
|
|
|
1575
|
-
class UiConfService <
|
|
1584
|
+
class UiConfService < BaseService
|
|
1576
1585
|
def initialize(client)
|
|
1577
1586
|
super(client)
|
|
1578
1587
|
end
|
|
@@ -1651,7 +1660,7 @@ module Kaltura
|
|
|
1651
1660
|
end
|
|
1652
1661
|
end #class UiConfService
|
|
1653
1662
|
|
|
1654
|
-
class UploadService <
|
|
1663
|
+
class UploadService < BaseService
|
|
1655
1664
|
def initialize(client)
|
|
1656
1665
|
super(client)
|
|
1657
1666
|
end
|
|
@@ -1677,7 +1686,7 @@ module Kaltura
|
|
|
1677
1686
|
end
|
|
1678
1687
|
end #class UploadService
|
|
1679
1688
|
|
|
1680
|
-
class UserService <
|
|
1689
|
+
class UserService < BaseService
|
|
1681
1690
|
def initialize(client)
|
|
1682
1691
|
super(client)
|
|
1683
1692
|
end
|
|
@@ -1745,7 +1754,7 @@ module Kaltura
|
|
|
1745
1754
|
end
|
|
1746
1755
|
end #class UserService
|
|
1747
1756
|
|
|
1748
|
-
class WidgetService <
|
|
1757
|
+
class WidgetService < BaseService
|
|
1749
1758
|
def initialize(client)
|
|
1750
1759
|
super(client)
|
|
1751
1760
|
end
|
|
@@ -1803,7 +1812,7 @@ module Kaltura
|
|
|
1803
1812
|
end
|
|
1804
1813
|
end #class WidgetService
|
|
1805
1814
|
|
|
1806
|
-
class XInternalService <
|
|
1815
|
+
class XInternalService < BaseService
|
|
1807
1816
|
def initialize(client)
|
|
1808
1817
|
super(client)
|
|
1809
1818
|
end
|
|
@@ -1820,7 +1829,7 @@ module Kaltura
|
|
|
1820
1829
|
end
|
|
1821
1830
|
end #class XInternalService
|
|
1822
1831
|
|
|
1823
|
-
class SystemUserService <
|
|
1832
|
+
class SystemUserService < BaseService
|
|
1824
1833
|
def initialize(client)
|
|
1825
1834
|
super(client)
|
|
1826
1835
|
end
|
|
@@ -1919,7 +1928,7 @@ module Kaltura
|
|
|
1919
1928
|
end
|
|
1920
1929
|
end #class SystemUserService
|
|
1921
1930
|
|
|
1922
|
-
class SystemPartnerService <
|
|
1931
|
+
class SystemPartnerService < BaseService
|
|
1923
1932
|
def initialize(client)
|
|
1924
1933
|
super(client)
|
|
1925
1934
|
end
|
|
@@ -2009,7 +2018,7 @@ module Kaltura
|
|
|
2009
2018
|
end
|
|
2010
2019
|
end #class SystemPartnerService
|
|
2011
2020
|
|
|
2012
|
-
class FileSyncService <
|
|
2021
|
+
class FileSyncService < BaseService
|
|
2013
2022
|
def initialize(client)
|
|
2014
2023
|
super(client)
|
|
2015
2024
|
end
|
|
@@ -2026,7 +2035,7 @@ module Kaltura
|
|
|
2026
2035
|
end
|
|
2027
2036
|
end #class FileSyncService
|
|
2028
2037
|
|
|
2029
|
-
class FlavorParamsOutputService <
|
|
2038
|
+
class FlavorParamsOutputService < BaseService
|
|
2030
2039
|
def initialize(client)
|
|
2031
2040
|
super(client)
|
|
2032
2041
|
end
|
|
@@ -2043,7 +2052,7 @@ module Kaltura
|
|
|
2043
2052
|
end
|
|
2044
2053
|
end #class FlavorParamsOutputService
|
|
2045
2054
|
|
|
2046
|
-
class MediaInfoService <
|
|
2055
|
+
class MediaInfoService < BaseService
|
|
2047
2056
|
def initialize(client)
|
|
2048
2057
|
super(client)
|
|
2049
2058
|
end
|
|
@@ -2060,7 +2069,7 @@ module Kaltura
|
|
|
2060
2069
|
end
|
|
2061
2070
|
end #class MediaInfoService
|
|
2062
2071
|
|
|
2063
|
-
class EntryAdminService <
|
|
2072
|
+
class EntryAdminService < BaseService
|
|
2064
2073
|
def initialize(client)
|
|
2065
2074
|
super(client)
|
|
2066
2075
|
end
|
data/velir_kaltura-ruby.gemspec
CHANGED
|
@@ -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.
|
|
8
|
+
s.version = "0.3.3"
|
|
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,13 @@ 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.
|
|
16
|
+
"README.markdown"
|
|
17
17
|
]
|
|
18
18
|
s.files = [
|
|
19
19
|
".document",
|
|
20
20
|
".gitignore",
|
|
21
21
|
"LICENSE",
|
|
22
|
-
"README.
|
|
22
|
+
"README.markdown",
|
|
23
23
|
"Rakefile",
|
|
24
24
|
"VERSION",
|
|
25
25
|
"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:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 0.3.
|
|
9
|
+
- 3
|
|
10
|
+
version: 0.3.3
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Patrick Robertson
|
|
@@ -84,12 +84,12 @@ extensions: []
|
|
|
84
84
|
|
|
85
85
|
extra_rdoc_files:
|
|
86
86
|
- LICENSE
|
|
87
|
-
- README.
|
|
87
|
+
- README.markdown
|
|
88
88
|
files:
|
|
89
89
|
- .document
|
|
90
90
|
- .gitignore
|
|
91
91
|
- LICENSE
|
|
92
|
-
- README.
|
|
92
|
+
- README.markdown
|
|
93
93
|
- Rakefile
|
|
94
94
|
- VERSION
|
|
95
95
|
- VERSION.yml
|
data/README.rdoc
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
= kaltura-ruby
|
|
2
|
-
|
|
3
|
-
A gem implementation of Kaltura's Ruby API client
|
|
4
|
-
|
|
5
|
-
http://www.kaltura.org/project/kcl_ruby
|
|
6
|
-
|
|
7
|
-
= Installation
|
|
8
|
-
|
|
9
|
-
$ gem install kaltura-ruby
|
|
10
|
-
|
|
11
|
-
= Usage
|
|
12
|
-
|
|
13
|
-
require 'yaml'
|
|
14
|
-
require 'kaltura-ruby'
|
|
15
|
-
|
|
16
|
-
# These values may be retrieved from your KMC account
|
|
17
|
-
login_email = your_login_email
|
|
18
|
-
login_password = your_login_password
|
|
19
|
-
partner_id = your_partner_id
|
|
20
|
-
subpartner_id = your_subpartner_id
|
|
21
|
-
administrator_secret = your_administrator_secret
|
|
22
|
-
user_secret = your_user_secret
|
|
23
|
-
|
|
24
|
-
config = Kaltura::KalturaConfiguration.new( partner_id )
|
|
25
|
-
client = Kaltura::KalturaClient.new( config )
|
|
26
|
-
session = client.session_service.start( admin_secret, '', KalturaSessionType::ADMIN )
|
|
27
|
-
client.ks = session
|
|
28
|
-
|
|
29
|
-
filter = KalturaFilter.new
|
|
30
|
-
pager = KalturaFilterPager.new
|
|
31
|
-
|
|
32
|
-
media = client.media_service.list(filter, pager)
|
|
33
|
-
puts "\nmedia:"
|
|
34
|
-
puts media.to_yaml
|
|
35
|
-
|
|
36
|
-
#video = File.open("/home/papyromancer/ovb.ogv")
|
|
37
|
-
#client.media_service.upload(video)
|
|
38
|
-
|
|
39
|
-
== Copyright
|
|
40
|
-
|
|
41
|
-
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.
|
|
42
|
-
|
|
43
|
-
This library is released in compliance with the GNU Affero General Public License.
|
|
44
|
-
|
|
45
|
-
Copyright (c) 2006-2010 Kaltura Inc. See LICENSE for details.
|