-
Notifications
You must be signed in to change notification settings - Fork 0
/
KalturaCollectionService.js
55 lines (51 loc) · 1.5 KB
/
KalturaCollectionService.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
*Class definition for the Kaltura service: collection.
**/
var KalturaCollectionService = {
/**
* Insert new collection for partner.
* @param collection KalturaCollection collection object (optional)
**/
add: function(collection){
var kparams = new Object();
kparams.collection = collection;
return new KalturaRequestBuilder("collection", "add", kparams);
},
/**
* Delete collection.
* @param id int Collection id (optional)
**/
deleteAction: function(id){
var kparams = new Object();
kparams.id = id;
return new KalturaRequestBuilder("collection", "delete", kparams);
},
/**
* Returns a list of collections requested by Collection IDs or file identifier or coupon group identifier.
* @param filter KalturaCollectionFilter Filter request (optional, default: null)
* @param pager KalturaFilterPager Page size and index (optional, default: null)
**/
listAction: function(filter, pager){
if(!filter)
filter = null;
if(!pager)
pager = null;
var kparams = new Object();
if (filter != null)
kparams.filter = filter;
if (pager != null)
kparams.pager = pager;
return new KalturaRequestBuilder("collection", "list", kparams);
},
/**
* Update Collection.
* @param id int Collection id (optional)
* @param collection KalturaCollection Collection (optional)
**/
update: function(id, collection){
var kparams = new Object();
kparams.id = id;
kparams.collection = collection;
return new KalturaRequestBuilder("collection", "update", kparams);
}
}