-
Notifications
You must be signed in to change notification settings - Fork 0
/
KalturaAnnouncementService.js
76 lines (70 loc) · 2.66 KB
/
KalturaAnnouncementService.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
*Class definition for the Kaltura service: announcement.
**/
var KalturaAnnouncementService = {
/**
* Add a new future scheduled system announcement push notification.
* @param announcement KalturaAnnouncement The announcement to be added.
* timezone parameter should be taken from the 'name of timezone' from: https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx
* Recipients values: All, LoggedIn, Guests (optional)
**/
add: function(announcement){
var kparams = new Object();
kparams.announcement = announcement;
return new KalturaRequestBuilder("announcement", "add", kparams);
},
/**
* Delete an existing announcing. Announcement cannot be delete while being sent..
* @param id int Id of the announcement. (optional)
**/
deleteAction: function(id){
var kparams = new Object();
kparams.id = id;
return new KalturaRequestBuilder("announcement", "delete", kparams);
},
/**
* Enable system announcements.
**/
enableSystemAnnouncements: function(){
var kparams = new Object();
return new KalturaRequestBuilder("announcement", "enableSystemAnnouncements", kparams);
},
/**
* Lists all announcements in the system..
* @param filter KalturaAnnouncementFilter Filter object (optional)
* @param pager KalturaFilterPager Paging the request (optional, default: null)
**/
listAction: function(filter, pager){
if(!pager)
pager = null;
var kparams = new Object();
kparams.filter = filter;
if (pager != null)
kparams.pager = pager;
return new KalturaRequestBuilder("announcement", "list", kparams);
},
/**
* Update an existing future system announcement push notification. Announcement can only be updated only before sending.
* @param announcementId int The announcement identifier (optional)
* @param announcement KalturaAnnouncement The announcement to update.
* timezone parameter should be taken from the 'name of timezone' from: https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx
* Recipients values: All, LoggedIn, Guests (optional)
**/
update: function(announcementId, announcement){
var kparams = new Object();
kparams.announcementId = announcementId;
kparams.announcement = announcement;
return new KalturaRequestBuilder("announcement", "update", kparams);
},
/**
* Update a system announcement status.
* @param id int Id of the announcement. (optional)
* @param status bool Status to update to. (optional)
**/
updateStatus: function(id, status){
var kparams = new Object();
kparams.id = id;
kparams.status = status;
return new KalturaRequestBuilder("announcement", "updateStatus", kparams);
}
}