velir_kaltura-ruby 0.3.3 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,112 @@
1
+ module Kaltura
2
+ module Response
3
+
4
+ class BaseResponse < KalturaObjectBase
5
+ attr_accessor :objects
6
+ attr_accessor :total_count
7
+
8
+ def total_count=(val)
9
+ @total_count = val.to_i
10
+ end
11
+ end
12
+
13
+ class AccessControlListResponse < BaseResponse
14
+ end
15
+
16
+ class BaseEntryListResponse < BaseResponse
17
+ end
18
+
19
+ class ModerationFlagListResponse < BaseResponse
20
+ end
21
+
22
+ class BulkUploadListResponse < BaseResponse
23
+ end
24
+
25
+ class CategoryListResponse < BaseResponse
26
+ end
27
+
28
+ class ConversionProfileListResponse < BaseResponse
29
+ end
30
+
31
+ class DataListResponse < BaseResponse
32
+ end
33
+
34
+ class FlavorParamsListResponse < BaseResponse
35
+ end
36
+
37
+ class LiveStreamListResponse < BaseResponse
38
+ end
39
+
40
+ class MediaListResponse < BaseResponse
41
+ end
42
+
43
+ class MixListResponse < BaseResponse
44
+ end
45
+
46
+ class PlaylistListResponse < BaseResponse
47
+ end
48
+
49
+ class SearchResultResponse < KalturaObjectBase
50
+ attr_accessor :objects
51
+ attr_accessor :need_media_info
52
+
53
+ def need_media_info=(val)
54
+ @need_media_info = to_b(val)
55
+ end
56
+ end
57
+
58
+ class StartWidgetSessionResponse < KalturaObjectBase
59
+ attr_accessor :partner_id
60
+ attr_accessor :ks
61
+ attr_accessor :user_id
62
+
63
+ def partner_id=(val)
64
+ @partner_id = val.to_i
65
+ end
66
+ end
67
+
68
+ class BaseSyndicationFeedListResponse < BaseResponse
69
+ end
70
+
71
+ class UiConfListResponse < BaseResponse
72
+ end
73
+
74
+ class UploadResponse < KalturaObjectBase
75
+ attr_accessor :upload_token_id
76
+ attr_accessor :file_size
77
+ attr_accessor :error_code
78
+ attr_accessor :error_description
79
+
80
+ def file_size=(val)
81
+ @file_size = val.to_i
82
+ end
83
+ def error_code=(val)
84
+ @error_code = val.to_i
85
+ end
86
+ end
87
+
88
+ class UserListResponse < BaseResponse
89
+ end
90
+
91
+ class WidgetListResponse < BaseResponse
92
+ end
93
+
94
+ class SystemUserListResponse < BaseResponse
95
+ end
96
+
97
+ class SystemPartnerUsageListResponse < BaseResponse
98
+ end
99
+
100
+ class PartnerListResponse < BaseResponse
101
+ end
102
+
103
+ class FileSyncListResponse < BaseResponse
104
+ end
105
+
106
+ class FlavorParamsOutputListResponse < BaseResponse
107
+ end
108
+
109
+ class MediaInfoListResponse < BaseResponse
110
+ end
111
+ end #module Response
112
+ end #module Kaltura
@@ -1,4 +1,4 @@
1
-
1
+ include Kaltura
2
2
 
3
3
  module Kaltura
4
4
  module Service
@@ -9,2080 +9,1285 @@ module Kaltura
9
9
  def initialize(client)
10
10
  @client = client
11
11
  end
12
+
13
+ def perform_request(service_class,service_action,paramters,allow_multirequest=true)
14
+ if allow_multirequest == false && client.is_multirequest
15
+ return nil
16
+ else
17
+ client.queue_service_action_call(service_class,service_action,paramters)
18
+ return client.do_queue
19
+ end
20
+ end
12
21
  end #class BaseService
13
22
 
14
23
  class AccessControlService < BaseService
15
- def initialize(client)
16
- super(client)
17
- end
18
24
 
19
25
  def add(access_control)
20
26
  kparams = {}
21
- client.add_param(kparams, 'accessControl', access_control);
22
- client.queue_service_action_call('accessControl', 'add', kparams);
23
- if (client.is_multirequest)
24
- return nil;
25
- end
26
- return client.do_queue();
27
+ client.add_param(kparams, 'accessControl', access_control)
28
+ perform_request('accessControl','add',kparams,false)
27
29
  end
28
30
 
29
31
  def get(id)
30
32
  kparams = {}
31
- client.add_param(kparams, 'id', id);
32
- client.queue_service_action_call('accessControl', 'get', kparams);
33
- if (client.is_multirequest)
34
- return nil;
35
- end
36
- return client.do_queue();
33
+ client.add_param(kparams, 'id', id)
34
+ perform_request('accessControl','get',kparams,false)
37
35
  end
38
36
 
39
37
  def update(id, access_control)
40
38
  kparams = {}
41
- client.add_param(kparams, 'id', id);
42
- client.add_param(kparams, 'accessControl', access_control);
43
- client.queue_service_action_call('accessControl', 'update', kparams);
44
- if (client.is_multirequest)
45
- return nil;
46
- end
47
- return client.do_queue();
39
+ client.add_param(kparams, 'id', id)
40
+ client.add_param(kparams, 'accessControl', access_control)
41
+ perform_request('accessControl','update',kparams,false)
48
42
  end
49
43
 
50
44
  def delete(id)
51
45
  kparams = {}
52
- client.add_param(kparams, 'id', id);
53
- client.queue_service_action_call('accessControl', 'delete', kparams);
54
- if (client.is_multirequest)
55
- return nil;
56
- end
57
- return client.do_queue();
46
+ client.add_param(kparams, 'id', id)
47
+ perform_request('accessControl','delete',kparams,false)
58
48
  end
59
49
 
60
50
  def list(filter=nil, pager=nil)
61
51
  kparams = {}
62
- client.add_param(kparams, 'filter', filter);
63
- client.add_param(kparams, 'pager', pager);
64
- client.queue_service_action_call('accessControl', 'list', kparams);
65
- if (client.is_multirequest)
66
- return nil;
67
- end
68
- return client.do_queue();
52
+ client.add_param(kparams, 'filter', filter)
53
+ client.add_param(kparams, 'pager', pager)
54
+ perform_request('accessControl','list',kparams,false)
69
55
  end
70
56
  end #class AccessControlService
71
57
 
72
58
  class AdminUserService < BaseService
73
- def initialize(client)
74
- super(client)
75
- end
76
59
 
77
60
  def update_password(email, password, new_email='', new_password='')
78
61
  kparams = {}
79
- client.add_param(kparams, 'email', email);
80
- client.add_param(kparams, 'password', password);
81
- client.add_param(kparams, 'newEmail', new_email);
82
- client.add_param(kparams, 'newPassword', new_password);
83
- client.queue_service_action_call('adminUser', 'updatePassword', kparams);
84
- if (client.is_multirequest)
85
- return nil;
86
- end
87
- return client.do_queue();
62
+ client.add_param(kparams, 'email', email)
63
+ client.add_param(kparams, 'password', password)
64
+ client.add_param(kparams, 'newEmail', new_email)
65
+ client.add_param(kparams, 'newPassword', new_password)
66
+ perform_request('adminUser','updatePassword',kparams,false)
88
67
  end
89
68
 
90
69
  def reset_password(email)
91
70
  kparams = {}
92
- client.add_param(kparams, 'email', email);
93
- client.queue_service_action_call('adminUser', 'resetPassword', kparams);
94
- if (client.is_multirequest)
95
- return nil;
96
- end
97
- return client.do_queue();
71
+ client.add_param(kparams, 'email', email)
72
+ perform_request('adminUser','resetPassword',kparams,false)
98
73
  end
99
74
 
100
75
  def login(email, password)
101
76
  kparams = {}
102
- client.add_param(kparams, 'email', email);
103
- client.add_param(kparams, 'password', password);
104
- client.queue_service_action_call('adminUser', 'login', kparams);
105
- if (client.is_multirequest)
106
- return nil;
107
- end
108
- return client.do_queue();
77
+ client.add_param(kparams, 'email', email)
78
+ client.add_param(kparams, 'password', password)
79
+ perform_request('adminUser','login',kparams,false)
109
80
  end
110
81
  end #class AdminUserService
111
82
 
112
83
  class BaseEntryService < BaseService
113
- def initialize(client)
114
- super(client)
115
- end
116
84
 
117
85
  def add_from_uploaded_file(entry, upload_token_id, type=-1)
118
86
  kparams = {}
119
- client.add_param(kparams, 'entry', entry);
120
- client.add_param(kparams, 'uploadTokenId', upload_token_id);
121
- client.add_param(kparams, 'type', type);
122
- client.queue_service_action_call('baseEntry', 'addFromUploadedFile', kparams);
123
- if (client.is_multirequest)
124
- return nil;
125
- end
126
- return client.do_queue();
87
+ client.add_param(kparams, 'entry', entry)
88
+ client.add_param(kparams, 'uploadTokenId', upload_token_id)
89
+ client.add_param(kparams, 'type', type)
90
+ perform_request('baseEntry','addFromUploadedFile',kparams,false)
127
91
  end
128
92
 
129
93
  def get(entry_id, version=-1)
130
94
  kparams = {}
131
- client.add_param(kparams, 'entryId', entry_id);
132
- client.add_param(kparams, 'version', version);
133
- client.queue_service_action_call('baseEntry', 'get', kparams);
134
- if (client.is_multirequest)
135
- return nil;
136
- end
137
- return client.do_queue();
95
+ client.add_param(kparams, 'entryId', entry_id)
96
+ client.add_param(kparams, 'version', version)
97
+ perform_request('baseEntry','get',kparams,false)
138
98
  end
139
99
 
140
100
  def update(entry_id, base_entry)
141
101
  kparams = {}
142
- client.add_param(kparams, 'entryId', entry_id);
143
- client.add_param(kparams, 'baseEntry', base_entry);
144
- client.queue_service_action_call('baseEntry', 'update', kparams);
145
- if (client.is_multirequest)
146
- return nil;
147
- end
148
- return client.do_queue();
102
+ client.add_param(kparams, 'entryId', entry_id)
103
+ client.add_param(kparams, 'baseEntry', base_entry)
104
+ perform_request('baseEntry','update',kparams,false)
149
105
  end
150
106
 
151
107
  def get_by_ids(entry_ids)
152
108
  kparams = {}
153
- client.add_param(kparams, 'entryIds', entry_ids);
154
- client.queue_service_action_call('baseEntry', 'getByIds', kparams);
155
- if (client.is_multirequest)
156
- return nil;
157
- end
158
- return client.do_queue();
109
+ client.add_param(kparams, 'entryIds', entry_ids)
110
+ perform_request('baseEntry','getByIds',kparams,false)
159
111
  end
160
112
 
161
113
  def delete(entry_id)
162
114
  kparams = {}
163
- client.add_param(kparams, 'entryId', entry_id);
164
- client.queue_service_action_call('baseEntry', 'delete', kparams);
165
- if (client.is_multirequest)
166
- return nil;
167
- end
168
- return client.do_queue();
115
+ client.add_param(kparams, 'entryId', entry_id)
116
+ perform_request('baseEntry','delete',kparams,false)
169
117
  end
170
118
 
171
119
  def list(filter=nil, pager=nil)
172
120
  kparams = {}
173
- client.add_param(kparams, 'filter', filter);
174
- client.add_param(kparams, 'pager', pager);
175
- client.queue_service_action_call('baseEntry', 'list', kparams);
176
- if (client.is_multirequest)
177
- return nil;
178
- end
179
- return client.do_queue();
121
+ client.add_param(kparams, 'filter', filter)
122
+ client.add_param(kparams, 'pager', pager)
123
+ perform_request('baseEntry','list',kparams,false)
180
124
  end
181
125
 
182
126
  def count(filter=nil)
183
127
  kparams = {}
184
- client.add_param(kparams, 'filter', filter);
185
- client.queue_service_action_call('baseEntry', 'count', kparams);
186
- if (client.is_multirequest)
187
- return nil;
188
- end
189
- return client.do_queue();
128
+ client.add_param(kparams, 'filter', filter)
129
+ perform_request('baseEntry','count',kparams,false)
190
130
  end
191
131
 
192
132
  def upload(file_data)
193
133
  kparams = {}
194
- client.add_param(kparams, 'fileData', file_data);
195
- client.queue_service_action_call('baseEntry', 'upload', kparams);
196
- if (client.is_multirequest)
197
- return nil;
198
- end
199
- return client.do_queue();
134
+ client.add_param(kparams, 'fileData', file_data)
135
+ perform_request('baseEntry','upload',kparams,false)
200
136
  end
201
137
 
202
138
  def update_thumbnail_jpeg(entry_id, file_data)
203
139
  kparams = {}
204
- client.add_param(kparams, 'entryId', entry_id);
205
- client.add_param(kparams, 'fileData', file_data);
206
- client.queue_service_action_call('baseEntry', 'updateThumbnailJpeg', kparams);
207
- if (client.is_multirequest)
208
- return nil;
209
- end
210
- return client.do_queue();
140
+ client.add_param(kparams, 'entryId', entry_id)
141
+ client.add_param(kparams, 'fileData', file_data)
142
+ perform_request('baseEntry','updateThumbnailJpeg',kparams,false)
211
143
  end
212
144
 
213
145
  def update_thumbnail_from_url(entry_id, url)
214
146
  kparams = {}
215
- client.add_param(kparams, 'entryId', entry_id);
216
- client.add_param(kparams, 'url', url);
217
- client.queue_service_action_call('baseEntry', 'updateThumbnailFromUrl', kparams);
218
- if (client.is_multirequest)
219
- return nil;
220
- end
221
- return client.do_queue();
147
+ client.add_param(kparams, 'entryId', entry_id)
148
+ client.add_param(kparams, 'url', url)
149
+ perform_request('baseEntry','updateThumbnailFromUrl',kparams,false)
222
150
  end
223
151
 
224
152
  def update_thumbnail_from_source_entry(entry_id, source_entry_id, time_offset)
225
153
  kparams = {}
226
- client.add_param(kparams, 'entryId', entry_id);
227
- client.add_param(kparams, 'sourceEntryId', source_entry_id);
228
- client.add_param(kparams, 'timeOffset', time_offset);
229
- client.queue_service_action_call('baseEntry', 'updateThumbnailFromSourceEntry', kparams);
230
- if (client.is_multirequest)
231
- return nil;
232
- end
233
- return client.do_queue();
154
+ client.add_param(kparams, 'entryId', entry_id)
155
+ client.add_param(kparams, 'sourceEntryId', source_entry_id)
156
+ client.add_param(kparams, 'timeOffset', time_offset)
157
+ perform_request('baseEntry','updateThumbnailFromSourceEntry',kparams,false)
234
158
  end
235
159
 
236
160
  def flag(moderation_flag)
237
161
  kparams = {}
238
- client.add_param(kparams, 'moderationFlag', moderation_flag);
239
- client.queue_service_action_call('baseEntry', 'flag', kparams);
240
- if (client.is_multirequest)
241
- return nil;
242
- end
243
- return client.do_queue();
162
+ client.add_param(kparams, 'moderationFlag', moderation_flag)
163
+ perform_request('baseEntry','flag',kparams,false)
244
164
  end
245
165
 
246
166
  def reject(entry_id)
247
167
  kparams = {}
248
- client.add_param(kparams, 'entryId', entry_id);
249
- client.queue_service_action_call('baseEntry', 'reject', kparams);
250
- if (client.is_multirequest)
251
- return nil;
252
- end
253
- return client.do_queue();
168
+ client.add_param(kparams, 'entryId', entry_id)
169
+ perform_request('baseEntry','reject',kparams,false)
254
170
  end
255
171
 
256
172
  def approve(entry_id)
257
173
  kparams = {}
258
- client.add_param(kparams, 'entryId', entry_id);
259
- client.queue_service_action_call('baseEntry', 'approve', kparams);
260
- if (client.is_multirequest)
261
- return nil;
262
- end
263
- return client.do_queue();
174
+ client.add_param(kparams, 'entryId', entry_id)
175
+ perform_request('baseEntry','approve',kparams,false)
264
176
  end
265
177
 
266
178
  def list_flags(entry_id, pager=nil)
267
179
  kparams = {}
268
- client.add_param(kparams, 'entryId', entry_id);
269
- client.add_param(kparams, 'pager', pager);
270
- client.queue_service_action_call('baseEntry', 'listFlags', kparams);
271
- if (client.is_multirequest)
272
- return nil;
273
- end
274
- return client.do_queue();
180
+ client.add_param(kparams, 'entryId', entry_id)
181
+ client.add_param(kparams, 'pager', pager)
182
+ perform_request('baseEntry','listFlags',kparams,false)
275
183
  end
276
184
 
277
185
  def anonymous_rank(entry_id, rank)
278
186
  kparams = {}
279
- client.add_param(kparams, 'entryId', entry_id);
280
- client.add_param(kparams, 'rank', rank);
281
- client.queue_service_action_call('baseEntry', 'anonymousRank', kparams);
282
- if (client.is_multirequest)
283
- return nil;
284
- end
285
- return client.do_queue();
187
+ client.add_param(kparams, 'entryId', entry_id)
188
+ client.add_param(kparams, 'rank', rank)
189
+ perform_request('baseEntry','anonymousRank',kparams,false)
286
190
  end
287
191
 
288
192
  def get_context_data(entry_id, context_data_params)
289
193
  kparams = {}
290
- client.add_param(kparams, 'entryId', entry_id);
291
- client.add_param(kparams, 'contextDataParams', context_data_params);
292
- client.queue_service_action_call('baseEntry', 'getContextData', kparams);
293
- if (client.is_multirequest)
294
- return nil;
295
- end
296
- return client.do_queue();
194
+ client.add_param(kparams, 'entryId', entry_id)
195
+ client.add_param(kparams, 'contextDataParams', context_data_params)
196
+ perform_request('baseEntry','getContextData',kparams,false)
297
197
  end
298
198
  end #class BaseEntryService
299
199
 
300
200
  class BulkUploadService < BaseService
301
- def initialize(client)
302
- super(client)
303
- end
304
201
 
305
202
  def add(conversion_profile_id, csv_file_data)
306
203
  kparams = {}
307
- client.add_param(kparams, 'conversionProfileId', conversion_profile_id);
308
- client.add_param(kparams, 'csvFileData', csv_file_data);
309
- client.queue_service_action_call('bulkUpload', 'add', kparams);
310
- if (client.is_multirequest)
311
- return nil;
312
- end
313
- return client.do_queue();
204
+ client.add_param(kparams, 'conversionProfileId', conversion_profile_id)
205
+ client.add_param(kparams, 'csvFileData', csv_file_data)
206
+ perform_request('bulkUpload','add',kparams,false)
314
207
  end
315
208
 
316
209
  def get(id)
317
210
  kparams = {}
318
- client.add_param(kparams, 'id', id);
319
- client.queue_service_action_call('bulkUpload', 'get', kparams);
320
- if (client.is_multirequest)
321
- return nil;
322
- end
323
- return client.do_queue();
211
+ client.add_param(kparams, 'id', id)
212
+ perform_request('bulkUpload','get',kparams,false)
324
213
  end
325
214
 
326
215
  def list(pager=nil)
327
216
  kparams = {}
328
- client.add_param(kparams, 'pager', pager);
329
- client.queue_service_action_call('bulkUpload', 'list', kparams);
330
- if (client.is_multirequest)
331
- return nil;
332
- end
333
- return client.do_queue();
217
+ client.add_param(kparams, 'pager', pager)
218
+ perform_request('bulkUpload','list',kparams,false)
334
219
  end
335
220
  end #class BulkUploadService
336
221
 
337
222
  class CategoryService < BaseService
338
- def initialize(client)
339
- super(client)
340
- end
341
223
 
342
224
  def add(category)
343
225
  kparams = {}
344
- client.add_param(kparams, 'category', category);
345
- client.queue_service_action_call('category', 'add', kparams);
346
- if (client.is_multirequest)
347
- return nil;
348
- end
349
- return client.do_queue();
226
+ client.add_param(kparams, 'category', category)
227
+ perform_request('category','add',kparams,false)
350
228
  end
351
229
 
352
230
  def get(id)
353
231
  kparams = {}
354
- client.add_param(kparams, 'id', id);
355
- client.queue_service_action_call('category', 'get', kparams);
356
- if (client.is_multirequest)
357
- return nil;
358
- end
359
- return client.do_queue();
232
+ client.add_param(kparams, 'id', id)
233
+ perform_request('category','get',kparams,false)
360
234
  end
361
235
 
362
236
  def update(id, category)
363
237
  kparams = {}
364
- client.add_param(kparams, 'id', id);
365
- client.add_param(kparams, 'category', category);
366
- client.queue_service_action_call('category', 'update', kparams);
367
- if (client.is_multirequest)
368
- return nil;
369
- end
370
- return client.do_queue();
238
+ client.add_param(kparams, 'id', id)
239
+ client.add_param(kparams, 'category', category)
240
+ perform_request('category','update',kparams,false)
371
241
  end
372
242
 
373
243
  def delete(id)
374
244
  kparams = {}
375
- client.add_param(kparams, 'id', id);
376
- client.queue_service_action_call('category', 'delete', kparams);
377
- if (client.is_multirequest)
378
- return nil;
379
- end
380
- return client.do_queue();
245
+ client.add_param(kparams, 'id', id)
246
+ perform_request('category','delete',kparams,false)
381
247
  end
382
248
 
383
249
  def list(filter=nil)
384
250
  kparams = {}
385
- client.add_param(kparams, 'filter', filter);
386
- client.queue_service_action_call('category', 'list', kparams);
387
- if (client.is_multirequest)
388
- return nil;
389
- end
390
- return client.do_queue();
251
+ client.add_param(kparams, 'filter', filter)
252
+ perform_request('category','list',kparams,false)
391
253
  end
392
254
  end #class CategoryService
393
255
 
394
256
  class ConversionProfileService < BaseService
395
- def initialize(client)
396
- super(client)
397
- end
398
257
 
399
258
  def add(conversion_profile)
400
259
  kparams = {}
401
- client.add_param(kparams, 'conversionProfile', conversion_profile);
402
- client.queue_service_action_call('conversionProfile', 'add', kparams);
403
- if (client.is_multirequest)
404
- return nil;
405
- end
406
- return client.do_queue();
260
+ client.add_param(kparams, 'conversionProfile', conversion_profile)
261
+ perform_request('conversionProfile','add',kparams,false)
407
262
  end
408
263
 
409
264
  def get(id)
410
265
  kparams = {}
411
- client.add_param(kparams, 'id', id);
412
- client.queue_service_action_call('conversionProfile', 'get', kparams);
413
- if (client.is_multirequest)
414
- return nil;
415
- end
416
- return client.do_queue();
266
+ client.add_param(kparams, 'id', id)
267
+ perform_request('conversionProfile','get',kparams,false)
417
268
  end
418
269
 
419
270
  def update(id, conversion_profile)
420
271
  kparams = {}
421
- client.add_param(kparams, 'id', id);
422
- client.add_param(kparams, 'conversionProfile', conversion_profile);
423
- client.queue_service_action_call('conversionProfile', 'update', kparams);
424
- if (client.is_multirequest)
425
- return nil;
426
- end
427
- return client.do_queue();
272
+ client.add_param(kparams, 'id', id)
273
+ client.add_param(kparams, 'conversionProfile', conversion_profile)
274
+ perform_request('conversionProfile','update',kparams,false)
428
275
  end
429
276
 
430
277
  def delete(id)
431
278
  kparams = {}
432
- client.add_param(kparams, 'id', id);
433
- client.queue_service_action_call('conversionProfile', 'delete', kparams);
434
- if (client.is_multirequest)
435
- return nil;
436
- end
437
- return client.do_queue();
279
+ client.add_param(kparams, 'id', id)
280
+ perform_request('conversionProfile','delete',kparams,false)
438
281
  end
439
282
 
440
283
  def list(filter=nil, pager=nil)
441
284
  kparams = {}
442
- client.add_param(kparams, 'filter', filter);
443
- client.add_param(kparams, 'pager', pager);
444
- client.queue_service_action_call('conversionProfile', 'list', kparams);
445
- if (client.is_multirequest)
446
- return nil;
447
- end
448
- return client.do_queue();
285
+ client.add_param(kparams, 'filter', filter)
286
+ client.add_param(kparams, 'pager', pager)
287
+ perform_request('conversionProfile','list',kparams,false)
449
288
  end
450
289
  end #class ConversionProfileService
451
290
 
452
291
  class DataService < BaseService
453
- def initialize(client)
454
- super(client)
455
- end
456
292
 
457
293
  def add(data_entry)
458
294
  kparams = {}
459
- client.add_param(kparams, 'dataEntry', data_entry);
460
- client.queue_service_action_call('data', 'add', kparams);
461
- if (client.is_multirequest)
462
- return nil;
463
- end
464
- return client.do_queue();
295
+ client.add_param(kparams, 'dataEntry', data_entry)
296
+ perform_request('data','add',kparams,false)
465
297
  end
466
298
 
467
299
  def get(entry_id, version=-1)
468
300
  kparams = {}
469
- client.add_param(kparams, 'entryId', entry_id);
470
- client.add_param(kparams, 'version', version);
471
- client.queue_service_action_call('data', 'get', kparams);
472
- if (client.is_multirequest)
473
- return nil;
474
- end
475
- return client.do_queue();
301
+ client.add_param(kparams, 'entryId', entry_id)
302
+ client.add_param(kparams, 'version', version)
303
+ perform_request('data','get',kparams,false)
476
304
  end
477
305
 
478
306
  def update(entry_id, document_entry)
479
307
  kparams = {}
480
- client.add_param(kparams, 'entryId', entry_id);
481
- client.add_param(kparams, 'documentEntry', document_entry);
482
- client.queue_service_action_call('data', 'update', kparams);
483
- if (client.is_multirequest)
484
- return nil;
485
- end
486
- return client.do_queue();
308
+ client.add_param(kparams, 'entryId', entry_id)
309
+ client.add_param(kparams, 'documentEntry', document_entry)
310
+ perform_request('data','update',kparams,false)
487
311
  end
488
312
 
489
313
  def delete(entry_id)
490
314
  kparams = {}
491
- client.add_param(kparams, 'entryId', entry_id);
492
- client.queue_service_action_call('data', 'delete', kparams);
493
- if (client.is_multirequest)
494
- return nil;
495
- end
496
- return client.do_queue();
315
+ client.add_param(kparams, 'entryId', entry_id)
316
+ perform_request('data','delete',kparams,false)
497
317
  end
498
318
 
499
319
  def list(filter=nil, pager=nil)
500
320
  kparams = {}
501
- client.add_param(kparams, 'filter', filter);
502
- client.add_param(kparams, 'pager', pager);
503
- client.queue_service_action_call('data', 'list', kparams);
504
- if (client.is_multirequest)
505
- return nil;
506
- end
507
- return client.do_queue();
321
+ client.add_param(kparams, 'filter', filter)
322
+ client.add_param(kparams, 'pager', pager)
323
+ perform_request('data','list',kparams,false)
508
324
  end
509
325
  end #class DataService
510
326
 
511
327
 
512
328
  class EmailIngestionProfileService < BaseService
513
- def initialize(client)
514
- super(client)
515
- end
516
329
 
517
330
  def add(email_ip)
518
331
  kparams = {}
519
- client.add_param(kparams, 'EmailIP', email_ip);
520
- client.queue_service_action_call('EmailIngestionProfile', 'add', kparams);
521
- if (client.is_multirequest)
522
- return nil;
523
- end
524
- return client.do_queue();
332
+ client.add_param(kparams, 'EmailIP', email_ip)
333
+ perform_request('EmailIngestionProfile','add',kparams,false)
525
334
  end
526
335
 
527
336
  def get_by_email_address(email_address)
528
337
  kparams = {}
529
- client.add_param(kparams, 'emailAddress', email_address);
530
- client.queue_service_action_call('EmailIngestionProfile', 'getByEmailAddress', kparams);
531
- if (client.is_multirequest)
532
- return nil;
533
- end
534
- return client.do_queue();
338
+ client.add_param(kparams, 'emailAddress', email_address)
339
+ perform_request('EmailIngestionProfile','getByEmailAddress',kparams,false)
535
340
  end
536
341
 
537
342
  def get(id)
538
343
  kparams = {}
539
- client.add_param(kparams, 'id', id);
540
- client.queue_service_action_call('EmailIngestionProfile', 'get', kparams);
541
- if (client.is_multirequest)
542
- return nil;
543
- end
544
- return client.do_queue();
344
+ client.add_param(kparams, 'id', id)
345
+ perform_request('EmailIngestionProfile','get',kparams,false)
545
346
  end
546
347
 
547
348
  def update(id, email_ip)
548
349
  kparams = {}
549
- client.add_param(kparams, 'id', id);
550
- client.add_param(kparams, 'EmailIP', email_ip);
551
- client.queue_service_action_call('EmailIngestionProfile', 'update', kparams);
552
- if (client.is_multirequest)
553
- return nil;
554
- end
555
- return client.do_queue();
350
+ client.add_param(kparams, 'id', id)
351
+ client.add_param(kparams, 'EmailIP', email_ip)
352
+ perform_request('EmailIngestionProfile','update',kparams,false)
556
353
  end
557
354
 
558
355
  def delete(id)
559
356
  kparams = {}
560
- client.add_param(kparams, 'id', id);
561
- client.queue_service_action_call('EmailIngestionProfile', 'delete', kparams);
562
- if (client.is_multirequest)
563
- return nil;
564
- end
565
- return client.do_queue();
357
+ client.add_param(kparams, 'id', id)
358
+ perform_request('EmailIngestionProfile','delete',kparams,false)
566
359
  end
567
360
 
568
361
  def add_media_entry(media_entry, upload_token_id, email_prof_id, from_address, email_msg_id)
569
362
  kparams = {}
570
- client.add_param(kparams, 'mediaEntry', media_entry);
571
- client.add_param(kparams, 'uploadTokenId', upload_token_id);
572
- client.add_param(kparams, 'emailProfId', email_prof_id);
573
- client.add_param(kparams, 'fromAddress', from_address);
574
- client.add_param(kparams, 'emailMsgId', email_msg_id);
575
- client.queue_service_action_call('EmailIngestionProfile', 'addMediaEntry', kparams);
576
- if (client.is_multirequest)
577
- return nil;
578
- end
579
- return client.do_queue();
363
+ client.add_param(kparams, 'mediaEntry', media_entry)
364
+ client.add_param(kparams, 'uploadTokenId', upload_token_id)
365
+ client.add_param(kparams, 'emailProfId', email_prof_id)
366
+ client.add_param(kparams, 'fromAddress', from_address)
367
+ client.add_param(kparams, 'emailMsgId', email_msg_id)
368
+ perform_request('EmailIngestionProfile','addMediaEntry',kparams,false)
580
369
  end
581
370
  end #class EmailIngestionProfileService
582
371
 
583
372
  class FlavorAssetService < BaseService
584
- def initialize(client)
585
- super(client)
586
- end
587
373
 
588
374
  def get(id)
589
375
  kparams = {}
590
- client.add_param(kparams, 'id', id);
591
- client.queue_service_action_call('flavorAsset', 'get', kparams);
592
- if (client.is_multirequest)
593
- return nil;
594
- end
595
- return client.do_queue();
376
+ client.add_param(kparams, 'id', id)
377
+ perform_request('flavorAsset','get',kparams,false)
596
378
  end
597
379
 
598
380
  def get_by_entry_id(entry_id)
599
381
  kparams = {}
600
- client.add_param(kparams, 'entryId', entry_id);
601
- client.queue_service_action_call('flavorAsset', 'getByEntryId', kparams);
602
- if (client.is_multirequest)
603
- return nil;
604
- end
605
- return client.do_queue();
382
+ client.add_param(kparams, 'entryId', entry_id)
383
+ perform_request('flavorAsset','getByEntryId',kparams,false)
606
384
  end
607
385
 
608
386
  def get_web_playable_by_entry_id(entry_id)
609
387
  kparams = {}
610
- client.add_param(kparams, 'entryId', entry_id);
611
- client.queue_service_action_call('flavorAsset', 'getWebPlayableByEntryId', kparams);
612
- if (client.is_multirequest)
613
- return nil;
614
- end
615
- return client.do_queue();
388
+ client.add_param(kparams, 'entryId', entry_id)
389
+ perform_request('flavorAsset','getWebPlayableByEntryId',kparams,false)
616
390
  end
617
391
 
618
392
  def convert(entry_id, flavor_params_id)
619
393
  kparams = {}
620
- client.add_param(kparams, 'entryId', entry_id);
621
- client.add_param(kparams, 'flavorParamsId', flavor_params_id);
622
- client.queue_service_action_call('flavorAsset', 'convert', kparams);
623
- if (client.is_multirequest)
624
- return nil;
625
- end
626
- return client.do_queue();
394
+ client.add_param(kparams, 'entryId', entry_id)
395
+ client.add_param(kparams, 'flavorParamsId', flavor_params_id)
396
+ perform_request('flavorAsset','convert',kparams,false)
627
397
  end
628
398
 
629
399
  def reconvert(id)
630
400
  kparams = {}
631
- client.add_param(kparams, 'id', id);
632
- client.queue_service_action_call('flavorAsset', 'reconvert', kparams);
633
- if (client.is_multirequest)
634
- return nil;
635
- end
636
- return client.do_queue();
401
+ client.add_param(kparams, 'id', id)
402
+ perform_request('flavorAsset','reconvert',kparams,false)
637
403
  end
638
404
 
639
405
  def delete(id)
640
406
  kparams = {}
641
- client.add_param(kparams, 'id', id);
642
- client.queue_service_action_call('flavorAsset', 'delete', kparams);
643
- if (client.is_multirequest)
644
- return nil;
645
- end
646
- return client.do_queue();
407
+ client.add_param(kparams, 'id', id)
408
+ perform_request('flavorAsset','delete',kparams,false)
647
409
  end
648
410
 
649
411
  def get_download_url(id)
650
412
  kparams = {}
651
- client.add_param(kparams, 'id', id);
652
- client.queue_service_action_call('flavorAsset', 'getDownloadUrl', kparams);
653
- if (client.is_multirequest)
654
- return nil;
655
- end
656
- return client.do_queue();
413
+ client.add_param(kparams, 'id', id)
414
+ perform_request('flavorAsset','getDownloadUrl',kparams,false)
657
415
  end
658
416
 
659
417
  def get_flavor_assets_with_params(entry_id)
660
418
  kparams = {}
661
- client.add_param(kparams, 'entryId', entry_id);
662
- client.queue_service_action_call('flavorAsset', 'getFlavorAssetsWithParams', kparams);
663
- if (client.is_multirequest)
664
- return nil;
665
- end
666
- return client.do_queue();
419
+ client.add_param(kparams, 'entryId', entry_id)
420
+ perform_request('flavorAsset','getFlavorAssetsWithParams',kparams,false)
667
421
  end
668
422
  end #class FlavorAssetService
669
423
 
670
424
  class FlavorParamsService < BaseService
671
- def initialize(client)
672
- super(client)
673
- end
674
425
 
675
426
  def add(flavor_params)
676
427
  kparams = {}
677
- client.add_param(kparams, 'flavorParams', flavor_params);
678
- client.queue_service_action_call('flavorParams', 'add', kparams);
679
- if (client.is_multirequest)
680
- return nil;
681
- end
682
- return client.do_queue();
428
+ client.add_param(kparams, 'flavorParams', flavor_params)
429
+ perform_request('flavorParams','add',kparams,false)
683
430
  end
684
431
 
685
432
  def get(id)
686
433
  kparams = {}
687
- client.add_param(kparams, 'id', id);
688
- client.queue_service_action_call('flavorParams', 'get', kparams);
689
- if (client.is_multirequest)
690
- return nil;
691
- end
692
- return client.do_queue();
434
+ client.add_param(kparams, 'id', id)
435
+ perform_request('flavorParams','get',kparams,false)
693
436
  end
694
437
 
695
438
  def update(id, flavor_params)
696
439
  kparams = {}
697
- client.add_param(kparams, 'id', id);
698
- client.add_param(kparams, 'flavorParams', flavor_params);
699
- client.queue_service_action_call('flavorParams', 'update', kparams);
700
- if (client.is_multirequest)
701
- return nil;
702
- end
703
- return client.do_queue();
440
+ client.add_param(kparams, 'id', id)
441
+ client.add_param(kparams, 'flavorParams', flavor_params)
442
+ perform_request('flavorParams','update',kparams,false)
704
443
  end
705
444
 
706
445
  def delete(id)
707
446
  kparams = {}
708
- client.add_param(kparams, 'id', id);
709
- client.queue_service_action_call('flavorParams', 'delete', kparams);
710
- if (client.is_multirequest)
711
- return nil;
712
- end
713
- return client.do_queue();
447
+ client.add_param(kparams, 'id', id)
448
+ perform_request('flavorParams','delete',kparams,false)
714
449
  end
715
450
 
716
451
  def list(filter=nil, pager=nil)
717
452
  kparams = {}
718
- client.add_param(kparams, 'filter', filter);
719
- client.add_param(kparams, 'pager', pager);
720
- client.queue_service_action_call('flavorParams', 'list', kparams);
721
- if (client.is_multirequest)
722
- return nil;
723
- end
724
- return client.do_queue();
453
+ client.add_param(kparams, 'filter', filter)
454
+ client.add_param(kparams, 'pager', pager)
455
+ perform_request('flavorParams','list',kparams,false)
725
456
  end
726
457
 
727
458
  def get_by_conversion_profile_id(conversion_profile_id)
728
459
  kparams = {}
729
- client.add_param(kparams, 'conversionProfileId', conversion_profile_id);
730
- client.queue_service_action_call('flavorParams', 'getByConversionProfileId', kparams);
731
- if (client.is_multirequest)
732
- return nil;
733
- end
734
- return client.do_queue();
460
+ client.add_param(kparams, 'conversionProfileId', conversion_profile_id)
461
+ perform_request('flavorParams','getByConversionProfileId',kparams,false)
735
462
  end
736
463
  end #class FlavorParamsService
737
464
 
738
465
  class LiveStreamService < BaseService
739
- def initialize(client)
740
- super(client)
741
- end
742
466
 
743
467
  def add(live_stream_entry)
744
468
  kparams = {}
745
- client.add_param(kparams, 'liveStreamEntry', live_stream_entry);
746
- client.queue_service_action_call('liveStream', 'add', kparams);
747
- if (client.is_multirequest)
748
- return nil;
749
- end
750
- return client.do_queue();
469
+ client.add_param(kparams, 'liveStreamEntry', live_stream_entry)
470
+ perform_request('liveStream','add',kparams,false)
751
471
  end
752
472
 
753
473
  def get(entry_id, version=-1)
754
474
  kparams = {}
755
- client.add_param(kparams, 'entryId', entry_id);
756
- client.add_param(kparams, 'version', version);
757
- client.queue_service_action_call('liveStream', 'get', kparams);
758
- if (client.is_multirequest)
759
- return nil;
760
- end
761
- return client.do_queue();
475
+ client.add_param(kparams, 'entryId', entry_id)
476
+ client.add_param(kparams, 'version', version)
477
+ perform_request('liveStream','get',kparams,false)
762
478
  end
763
479
 
764
480
  def update(entry_id, live_stream_entry)
765
481
  kparams = {}
766
- client.add_param(kparams, 'entryId', entry_id);
767
- client.add_param(kparams, 'liveStreamEntry', live_stream_entry);
768
- client.queue_service_action_call('liveStream', 'update', kparams);
769
- if (client.is_multirequest)
770
- return nil;
771
- end
772
- return client.do_queue();
482
+ client.add_param(kparams, 'entryId', entry_id)
483
+ client.add_param(kparams, 'liveStreamEntry', live_stream_entry)
484
+ perform_request('liveStream','update',kparams,false)
773
485
  end
774
486
 
775
487
  def delete(entry_id)
776
488
  kparams = {}
777
- client.add_param(kparams, 'entryId', entry_id);
778
- client.queue_service_action_call('liveStream', 'delete', kparams);
779
- if (client.is_multirequest)
780
- return nil;
781
- end
782
- return client.do_queue();
489
+ client.add_param(kparams, 'entryId', entry_id)
490
+ perform_request('liveStream','delete',kparams,false)
783
491
  end
784
492
 
785
493
  def list(filter=nil, pager=nil)
786
494
  kparams = {}
787
- client.add_param(kparams, 'filter', filter);
788
- client.add_param(kparams, 'pager', pager);
789
- client.queue_service_action_call('liveStream', 'list', kparams);
790
- if (client.is_multirequest)
791
- return nil;
792
- end
793
- return client.do_queue();
495
+ client.add_param(kparams, 'filter', filter)
496
+ client.add_param(kparams, 'pager', pager)
497
+ perform_request('liveStream','list',kparams,false)
794
498
  end
795
499
 
796
500
  def update_offline_thumbnail_jpeg(entry_id, file_data)
797
501
  kparams = {}
798
- client.add_param(kparams, 'entryId', entry_id);
799
- client.add_param(kparams, 'fileData', file_data);
800
- client.queue_service_action_call('liveStream', 'updateOfflineThumbnailJpeg', kparams);
801
- if (client.is_multirequest)
802
- return nil;
803
- end
804
- return client.do_queue();
502
+ client.add_param(kparams, 'entryId', entry_id)
503
+ client.add_param(kparams, 'fileData', file_data)
504
+ perform_request('liveStream','updateOfflineThumbnailJpeg',kparams,false)
805
505
  end
806
506
 
807
507
  def update_offline_thumbnail_from_url(entry_id, url)
808
508
  kparams = {}
809
- client.add_param(kparams, 'entryId', entry_id);
810
- client.add_param(kparams, 'url', url);
811
- client.queue_service_action_call('liveStream', 'updateOfflineThumbnailFromUrl', kparams);
812
- if (client.is_multirequest)
813
- return nil;
814
- end
815
- return client.do_queue();
509
+ client.add_param(kparams, 'entryId', entry_id)
510
+ client.add_param(kparams, 'url', url)
511
+ perform_request('liveStream','updateOfflineThumbnailFromUrl',kparams,false)
816
512
  end
817
513
  end #class LiveStreamService
818
514
 
819
515
  class MediaService < BaseService
820
- def initialize(client)
821
- super(client)
822
- end
823
-
516
+
824
517
  def add_from_bulk(media_entry, url, bulk_upload_id)
825
518
  kparams = {}
826
- client.add_param(kparams, 'mediaEntry', media_entry);
827
- client.add_param(kparams, 'url', url);
828
- client.add_param(kparams, 'bulkUploadId', bulk_upload_id);
829
- client.queue_service_action_call('media', 'addFromBulk', kparams);
830
- if (client.is_multirequest)
831
- return nil;
832
- end
833
- return client.do_queue();
519
+ client.add_param(kparams, 'mediaEntry', media_entry)
520
+ client.add_param(kparams, 'url', url)
521
+ client.add_param(kparams, 'bulkUploadId', bulk_upload_id)
522
+ perform_request('media','addFromBulk',kparams,false)
834
523
  end
835
524
 
836
525
  def add_from_url(media_entry, url)
837
526
  kparams = {}
838
- client.add_param(kparams, 'mediaEntry', media_entry);
839
- client.add_param(kparams, 'url', url);
840
- client.queue_service_action_call('media', 'addFromUrl', kparams);
841
- if (client.is_multirequest)
842
- return nil;
843
- end
844
- return client.do_queue();
527
+ client.add_param(kparams, 'mediaEntry', media_entry)
528
+ client.add_param(kparams, 'url', url)
529
+ perform_request('media','addFromUrl',kparams,false)
845
530
  end
846
531
 
847
532
  def add_from_search_result(media_entry=nil, search_result=nil)
848
533
  kparams = {}
849
- client.add_param(kparams, 'mediaEntry', media_entry);
850
- client.add_param(kparams, 'searchResult', search_result);
851
- client.queue_service_action_call('media', 'addFromSearchResult', kparams);
852
- if (client.is_multirequest)
853
- return nil;
854
- end
855
- return client.do_queue();
534
+ client.add_param(kparams, 'mediaEntry', media_entry)
535
+ client.add_param(kparams, 'searchResult', search_result)
536
+ perform_request('media','addFromSearchResult',kparams,false)
856
537
  end
857
538
 
858
539
  def add_from_uploaded_file(media_entry, upload_token_id)
859
540
  kparams = {}
860
- client.add_param(kparams, 'mediaEntry', media_entry);
861
- client.add_param(kparams, 'uploadTokenId', upload_token_id);
862
- client.queue_service_action_call('media', 'addFromUploadedFile', kparams);
863
- if (client.is_multirequest)
864
- return nil;
865
- end
866
- return client.do_queue();
541
+ client.add_param(kparams, 'mediaEntry', media_entry)
542
+ client.add_param(kparams, 'uploadTokenId', upload_token_id)
543
+ perform_request('media','addFromUploadedFile',kparams,false)
867
544
  end
868
545
 
869
546
  def add_from_recorded_webcam(media_entry, webcam_token_id)
870
547
  kparams = {}
871
- client.add_param(kparams, 'mediaEntry', media_entry);
872
- client.add_param(kparams, 'webcamTokenId', webcam_token_id);
873
- client.queue_service_action_call('media', 'addFromRecordedWebcam', kparams);
874
- if (client.is_multirequest)
875
- return nil;
876
- end
877
- return client.do_queue();
548
+ client.add_param(kparams, 'mediaEntry', media_entry)
549
+ client.add_param(kparams, 'webcamTokenId', webcam_token_id)
550
+ perform_request('media','addFromRecordedWebcam',kparams,false)
878
551
  end
879
552
 
880
553
  def get(entry_id, version=-1)
881
554
  kparams = {}
882
- client.add_param(kparams, 'entryId', entry_id);
883
- client.add_param(kparams, 'version', version);
884
- client.queue_service_action_call('media', 'get', kparams);
885
- if (client.is_multirequest)
886
- return nil;
887
- end
888
- return client.do_queue();
555
+ client.add_param(kparams, 'entryId', entry_id)
556
+ client.add_param(kparams, 'version', version)
557
+ perform_request('media','get',kparams,false)
889
558
  end
890
559
 
891
560
  def update(entry_id, media_entry)
892
561
  kparams = {}
893
- client.add_param(kparams, 'entryId', entry_id);
894
- client.add_param(kparams, 'mediaEntry', media_entry);
895
- client.queue_service_action_call('media', 'update', kparams);
896
- if (client.is_multirequest)
897
- return nil;
898
- end
899
- return client.do_queue();
562
+ client.add_param(kparams, 'entryId', entry_id)
563
+ client.add_param(kparams, 'mediaEntry', media_entry)
564
+ perform_request('media','update',kparams,false)
900
565
  end
901
566
 
902
567
  def delete(entry_id)
903
568
  kparams = {}
904
- client.add_param(kparams, 'entryId', entry_id);
905
- client.queue_service_action_call('media', 'delete', kparams);
906
- if (client.is_multirequest)
907
- return nil;
908
- end
909
- return client.do_queue();
569
+ client.add_param(kparams, 'entryId', entry_id)
570
+ perform_request('media','delete',kparams,false)
910
571
  end
911
572
 
912
573
  def list(filter=nil, pager=nil)
913
574
  kparams = {}
914
- client.add_param(kparams, 'filter', filter);
915
- client.add_param(kparams, 'pager', pager);
916
- client.queue_service_action_call('media', 'list', kparams);
917
- if (client.is_multirequest)
918
- return nil;
919
- end
920
- return client.do_queue();
575
+ client.add_param(kparams, 'filter', filter)
576
+ client.add_param(kparams, 'pager', pager)
577
+ perform_request('media','list',kparams,false)
921
578
  end
922
579
 
923
580
  def count(filter=nil)
924
581
  kparams = {}
925
- client.add_param(kparams, 'filter', filter);
926
- client.queue_service_action_call('media', 'count', kparams);
927
- if (client.is_multirequest)
928
- return nil;
929
- end
930
- return client.do_queue();
582
+ client.add_param(kparams, 'filter', filter)
583
+ perform_request('media','count',kparams,false)
931
584
  end
932
585
 
933
586
  def upload(file_data)
934
587
  kparams = {}
935
- client.add_param(kparams, 'fileData', file_data);
936
- client.queue_service_action_call('media', 'upload', kparams);
937
- if (client.is_multirequest)
938
- return nil;
939
- end
940
- return client.do_queue();
588
+ client.add_param(kparams, 'fileData', file_data)
589
+ perform_request('media','upload',kparams,false)
941
590
  end
942
591
 
943
592
  def update_thumbnail(entry_id, time_offset)
944
593
  kparams = {}
945
- client.add_param(kparams, 'entryId', entry_id);
946
- client.add_param(kparams, 'timeOffset', time_offset);
947
- client.queue_service_action_call('media', 'updateThumbnail', kparams);
948
- if (client.is_multirequest)
949
- return nil;
950
- end
951
- return client.do_queue();
594
+ client.add_param(kparams, 'entryId', entry_id)
595
+ client.add_param(kparams, 'timeOffset', time_offset)
596
+ perform_request('media','updateThumbnail',kparams,false)
952
597
  end
953
598
 
954
599
  def update_thumbnail_from_source_entry(entry_id, source_entry_id, time_offset)
955
600
  kparams = {}
956
- client.add_param(kparams, 'entryId', entry_id);
957
- client.add_param(kparams, 'sourceEntryId', source_entry_id);
958
- client.add_param(kparams, 'timeOffset', time_offset);
959
- client.queue_service_action_call('media', 'updateThumbnailFromSourceEntry', kparams);
960
- if (client.is_multirequest)
961
- return nil;
962
- end
963
- return client.do_queue();
601
+ client.add_param(kparams, 'entryId', entry_id)
602
+ client.add_param(kparams, 'sourceEntryId', source_entry_id)
603
+ client.add_param(kparams, 'timeOffset', time_offset)
604
+ perform_request('media','updateThumbnailFromSourceEntry',kparams,false)
964
605
  end
965
606
 
966
607
  def update_thumbnail_jpeg(entry_id, file_data)
967
608
  kparams = {}
968
- client.add_param(kparams, 'entryId', entry_id);
969
- client.add_param(kparams, 'fileData', file_data);
970
- client.queue_service_action_call('media', 'updateThumbnailJpeg', kparams);
971
- if (client.is_multirequest)
972
- return nil;
973
- end
974
- return client.do_queue();
609
+ client.add_param(kparams, 'entryId', entry_id)
610
+ client.add_param(kparams, 'fileData', file_data)
611
+ perform_request('media','updateThumbnailJpeg',kparams,false)
975
612
  end
976
613
 
977
614
  def update_thumbnail_from_url(entry_id, url)
978
615
  kparams = {}
979
- client.add_param(kparams, 'entryId', entry_id);
980
- client.add_param(kparams, 'url', url);
981
- client.queue_service_action_call('media', 'updateThumbnailFromUrl', kparams);
982
- if (client.is_multirequest)
983
- return nil;
984
- end
985
- return client.do_queue();
616
+ client.add_param(kparams, 'entryId', entry_id)
617
+ client.add_param(kparams, 'url', url)
618
+ perform_request('media','updateThumbnailFromUrl',kparams,false)
986
619
  end
987
620
 
988
621
  def request_conversion(entry_id, file_format)
989
622
  kparams = {}
990
- client.add_param(kparams, 'entryId', entry_id);
991
- client.add_param(kparams, 'fileFormat', file_format);
992
- client.queue_service_action_call('media', 'requestConversion', kparams);
993
- if (client.is_multirequest)
994
- return nil;
995
- end
996
- return client.do_queue();
623
+ client.add_param(kparams, 'entryId', entry_id)
624
+ client.add_param(kparams, 'fileFormat', file_format)
625
+ perform_request('media','requestConversion',kparams,false)
997
626
  end
998
627
 
999
628
  def flag(moderation_flag)
1000
629
  kparams = {}
1001
- client.add_param(kparams, 'moderationFlag', moderation_flag);
1002
- client.queue_service_action_call('media', 'flag', kparams);
1003
- if (client.is_multirequest)
1004
- return nil;
1005
- end
1006
- return client.do_queue();
630
+ client.add_param(kparams, 'moderationFlag', moderation_flag)
631
+ perform_request('media','flag',kparams,false)
1007
632
  end
1008
633
 
1009
634
  def reject(entry_id)
1010
635
  kparams = {}
1011
- client.add_param(kparams, 'entryId', entry_id);
1012
- client.queue_service_action_call('media', 'reject', kparams);
1013
- if (client.is_multirequest)
1014
- return nil;
1015
- end
1016
- return client.do_queue();
636
+ client.add_param(kparams, 'entryId', entry_id)
637
+ perform_request('media','request',kparams,false)
1017
638
  end
1018
639
 
1019
640
  def approve(entry_id)
1020
641
  kparams = {}
1021
- client.add_param(kparams, 'entryId', entry_id);
1022
- client.queue_service_action_call('media', 'approve', kparams);
1023
- if (client.is_multirequest)
1024
- return nil;
1025
- end
1026
- return client.do_queue();
642
+ client.add_param(kparams, 'entryId', entry_id)
643
+ perform_request('media','approve',kparams,false)
1027
644
  end
1028
645
 
1029
646
  def list_flags(entry_id, pager=nil)
1030
647
  kparams = {}
1031
- client.add_param(kparams, 'entryId', entry_id);
1032
- client.add_param(kparams, 'pager', pager);
1033
- client.queue_service_action_call('media', 'listFlags', kparams);
1034
- if (client.is_multirequest)
1035
- return nil;
1036
- end
1037
- return client.do_queue();
648
+ client.add_param(kparams, 'entryId', entry_id)
649
+ client.add_param(kparams, 'pager', pager)
650
+ perform_request('media','listFlags',kparams,false)
1038
651
  end
1039
652
 
1040
653
  def anonymous_rank(entry_id, rank)
1041
654
  kparams = {}
1042
- client.add_param(kparams, 'entryId', entry_id);
1043
- client.add_param(kparams, 'rank', rank);
1044
- client.queue_service_action_call('media', 'anonymousRank', kparams);
1045
- if (client.is_multirequest)
1046
- return nil;
1047
- end
1048
- return client.do_queue();
655
+ client.add_param(kparams, 'entryId', entry_id)
656
+ client.add_param(kparams, 'rank', rank)
657
+ perform_request('media','anonymousRank',kparams,false)
1049
658
  end
1050
659
  end #class MediaService
1051
660
 
1052
661
  class MixingService < BaseService
1053
- def initialize(client)
1054
- super(client)
1055
- end
1056
662
 
1057
663
  def add(mix_entry)
1058
664
  kparams = {}
1059
- client.add_param(kparams, 'mixEntry', mix_entry);
1060
- client.queue_service_action_call('mixing', 'add', kparams);
1061
- if (client.is_multirequest)
1062
- return nil;
1063
- end
1064
- return client.do_queue();
665
+ client.add_param(kparams, 'mixEntry', mix_entry)
666
+ perform_request('mixing','add',kparams,false)
1065
667
  end
1066
668
 
1067
669
  def get(entry_id, version=-1)
1068
670
  kparams = {}
1069
- client.add_param(kparams, 'entryId', entry_id);
1070
- client.add_param(kparams, 'version', version);
1071
- client.queue_service_action_call('mixing', 'get', kparams);
1072
- if (client.is_multirequest)
1073
- return nil;
1074
- end
1075
- return client.do_queue();
671
+ client.add_param(kparams, 'entryId', entry_id)
672
+ client.add_param(kparams, 'version', version)
673
+ perform_request('mixing','get',kparams,false)
1076
674
  end
1077
675
 
1078
676
  def update(entry_id, mix_entry)
1079
677
  kparams = {}
1080
- client.add_param(kparams, 'entryId', entry_id);
1081
- client.add_param(kparams, 'mixEntry', mix_entry);
1082
- client.queue_service_action_call('mixing', 'update', kparams);
1083
- if (client.is_multirequest)
1084
- return nil;
1085
- end
1086
- return client.do_queue();
678
+ client.add_param(kparams, 'entryId', entry_id)
679
+ client.add_param(kparams, 'mixEntry', mix_entry)
680
+ perform_request('mixing','update',kparams,false)
1087
681
  end
1088
682
 
1089
683
  def delete(entry_id)
1090
684
  kparams = {}
1091
- client.add_param(kparams, 'entryId', entry_id);
1092
- client.queue_service_action_call('mixing', 'delete', kparams);
1093
- if (client.is_multirequest)
1094
- return nil;
1095
- end
1096
- return client.do_queue();
685
+ client.add_param(kparams, 'entryId', entry_id)
686
+ perform_request('mixing','delete',kparams,false)
1097
687
  end
1098
688
 
1099
689
  def list(filter=nil, pager=nil)
1100
690
  kparams = {}
1101
- client.add_param(kparams, 'filter', filter);
1102
- client.add_param(kparams, 'pager', pager);
1103
- client.queue_service_action_call('mixing', 'list', kparams);
1104
- if (client.is_multirequest)
1105
- return nil;
1106
- end
1107
- return client.do_queue();
691
+ client.add_param(kparams, 'filter', filter)
692
+ client.add_param(kparams, 'pager', pager)
693
+ perform_request('mixing','list',kparams,false)
1108
694
  end
1109
695
 
1110
696
  def count(filter=nil)
1111
697
  kparams = {}
1112
- client.add_param(kparams, 'filter', filter);
1113
- client.queue_service_action_call('mixing', 'count', kparams);
1114
- if (client.is_multirequest)
1115
- return nil;
1116
- end
1117
- return client.do_queue();
698
+ client.add_param(kparams, 'filter', filter)
699
+ perform_request('mixing','count',kparams,false)
1118
700
  end
1119
701
 
1120
702
  def clone(entry_id)
1121
703
  kparams = {}
1122
- client.add_param(kparams, 'entryId', entry_id);
1123
- client.queue_service_action_call('mixing', 'clone', kparams);
1124
- if (client.is_multirequest)
1125
- return nil;
1126
- end
1127
- return client.do_queue();
704
+ client.add_param(kparams, 'entryId', entry_id)
705
+ perform_request('mixing','clone',kparams,false)
1128
706
  end
1129
707
 
1130
708
  def append_media_entry(mix_entry_id, media_entry_id)
1131
709
  kparams = {}
1132
- client.add_param(kparams, 'mixEntryId', mix_entry_id);
1133
- client.add_param(kparams, 'mediaEntryId', media_entry_id);
1134
- client.queue_service_action_call('mixing', 'appendMediaEntry', kparams);
1135
- if (client.is_multirequest)
1136
- return nil;
1137
- end
1138
- return client.do_queue();
710
+ client.add_param(kparams, 'mixEntryId', mix_entry_id)
711
+ client.add_param(kparams, 'mediaEntryId', media_entry_id)
712
+ perform_request('mixing','appendMediaEntry',kparams,false)
1139
713
  end
1140
714
 
1141
715
  def request_flattening(entry_id, file_format, version=-1)
1142
716
  kparams = {}
1143
- client.add_param(kparams, 'entryId', entry_id);
1144
- client.add_param(kparams, 'fileFormat', file_format);
1145
- client.add_param(kparams, 'version', version);
1146
- client.queue_service_action_call('mixing', 'requestFlattening', kparams);
1147
- if (client.is_multirequest)
1148
- return nil;
1149
- end
1150
- return client.do_queue();
717
+ client.add_param(kparams, 'entryId', entry_id)
718
+ client.add_param(kparams, 'fileFormat', file_format)
719
+ client.add_param(kparams, 'version', version)
720
+ perform_request('mixing','requestFlattening',kparams,false)
1151
721
  end
1152
722
 
1153
723
  def get_mixes_by_media_id(media_entry_id)
1154
724
  kparams = {}
1155
- client.add_param(kparams, 'mediaEntryId', media_entry_id);
1156
- client.queue_service_action_call('mixing', 'getMixesByMediaId', kparams);
1157
- if (client.is_multirequest)
1158
- return nil;
1159
- end
1160
- return client.do_queue();
725
+ client.add_param(kparams, 'mediaEntryId', media_entry_id)
726
+ perform_request('mixing','getMixesByMediaId',kparams,false)
1161
727
  end
1162
728
 
1163
729
  def get_ready_media_entries(mix_id, version=-1)
1164
730
  kparams = {}
1165
- client.add_param(kparams, 'mixId', mix_id);
1166
- client.add_param(kparams, 'version', version);
1167
- client.queue_service_action_call('mixing', 'getReadyMediaEntries', kparams);
1168
- if (client.is_multirequest)
1169
- return nil;
1170
- end
1171
- return client.do_queue();
731
+ client.add_param(kparams, 'mixId', mix_id)
732
+ client.add_param(kparams, 'version', version)
733
+ perform_request('mixing','getReadyMediaEntries',kparams,false)
1172
734
  end
1173
735
 
1174
736
  def anonymous_rank(entry_id, rank)
1175
737
  kparams = {}
1176
- client.add_param(kparams, 'entryId', entry_id);
1177
- client.add_param(kparams, 'rank', rank);
1178
- client.queue_service_action_call('mixing', 'anonymousRank', kparams);
1179
- if (client.is_multirequest)
1180
- return nil;
1181
- end
1182
- return client.do_queue();
738
+ client.add_param(kparams, 'entryId', entry_id)
739
+ client.add_param(kparams, 'rank', rank)
740
+ perform_request('mixing','anonymousRank',kparams,false)
1183
741
  end
1184
742
  end #class MixingService
1185
743
 
1186
744
  class NotificationService < BaseService
1187
- def initialize(client)
1188
- super(client)
1189
- end
1190
745
 
1191
746
  def get_client_notification(entry_id, type)
1192
747
  kparams = {}
1193
- client.add_param(kparams, 'entryId', entry_id);
1194
- client.add_param(kparams, 'type', type);
1195
- client.queue_service_action_call('notification', 'getClientNotification', kparams);
1196
- if (client.is_multirequest)
1197
- return nil;
1198
- end
1199
- return client.do_queue();
748
+ client.add_param(kparams, 'entryId', entry_id)
749
+ client.add_param(kparams, 'type', type)
750
+ perform_request('notification','getClientNotification',kparams,false)
1200
751
  end
1201
752
  end #class NotificationService
1202
753
 
1203
754
  class PartnerService < BaseService
1204
- def initialize(client)
1205
- super(client)
1206
- end
1207
755
 
1208
756
  def register(partner, cms_password='')
1209
757
  kparams = {}
1210
- client.add_param(kparams, 'partner', partner);
1211
- client.add_param(kparams, 'cmsPassword', cms_password);
1212
- client.queue_service_action_call('partner', 'register', kparams);
1213
- if (client.is_multirequest)
1214
- return nil;
1215
- end
1216
- return client.do_queue();
758
+ client.add_param(kparams, 'partner', partner)
759
+ client.add_param(kparams, 'cmsPassword', cms_password)
760
+ perform_request('partner','register',kparams,false)
1217
761
  end
1218
762
 
1219
763
  def update(partner, allow_empty=false)
1220
764
  kparams = {}
1221
- client.add_param(kparams, 'partner', partner);
1222
- client.add_param(kparams, 'allowEmpty', allow_empty);
1223
- client.queue_service_action_call('partner', 'update', kparams);
1224
- if (client.is_multirequest)
1225
- return nil;
1226
- end
1227
- return client.do_queue();
765
+ client.add_param(kparams, 'partner', partner)
766
+ client.add_param(kparams, 'allowEmpty', allow_empty)
767
+ perform_request('partner','update',kparams,false)
1228
768
  end
1229
769
 
1230
770
  def get_secrets(partner_id, admin_email, cms_password)
1231
771
  kparams = {}
1232
- client.add_param(kparams, 'partnerId', partner_id);
1233
- client.add_param(kparams, 'adminEmail', admin_email);
1234
- client.add_param(kparams, 'cmsPassword', cms_password);
1235
- client.queue_service_action_call('partner', 'getSecrets', kparams);
1236
- if (client.is_multirequest)
1237
- return nil;
1238
- end
1239
- return client.do_queue();
772
+ client.add_param(kparams, 'partnerId', partner_id)
773
+ client.add_param(kparams, 'adminEmail', admin_email)
774
+ client.add_param(kparams, 'cmsPassword', cms_password)
775
+ perform_request('partner','getSecrets',kparams,false)
1240
776
  end
1241
777
 
1242
778
  def get_info()
1243
779
  kparams = {}
1244
- client.queue_service_action_call('partner', 'getInfo', kparams);
1245
- if (client.is_multirequest)
1246
- return nil;
1247
- end
1248
- return client.do_queue();
780
+ perform_request('partner','getInfo',kparams,false)
1249
781
  end
1250
782
 
1251
783
  def get_usage(year='', month=1, resolution='days')
1252
784
  kparams = {}
1253
- client.add_param(kparams, 'year', year);
1254
- client.add_param(kparams, 'month', month);
1255
- client.add_param(kparams, 'resolution', resolution);
1256
- client.queue_service_action_call('partner', 'getUsage', kparams);
1257
- if (client.is_multirequest)
1258
- return nil;
1259
- end
1260
- return client.do_queue();
785
+ client.add_param(kparams, 'year', year)
786
+ client.add_param(kparams, 'month', month)
787
+ client.add_param(kparams, 'resolution', resolution)
788
+ perform_request('partner','getUsage',kparams,false)
1261
789
  end
1262
790
  end #class PartnerService
1263
791
 
1264
792
  class PlaylistService < BaseService
1265
- def initialize(client)
1266
- super(client)
1267
- end
1268
793
 
1269
794
  def add(playlist, update_stats=false)
1270
795
  kparams = {}
1271
- client.add_param(kparams, 'playlist', playlist);
1272
- client.add_param(kparams, 'updateStats', update_stats);
1273
- client.queue_service_action_call('playlist', 'add', kparams);
1274
- if (client.is_multirequest)
1275
- return nil;
1276
- end
1277
- return client.do_queue();
796
+ client.add_param(kparams, 'playlist', playlist)
797
+ client.add_param(kparams, 'updateStats', update_stats)
798
+ perform_request('playList','add',kparams,false)
1278
799
  end
1279
800
 
1280
801
  def get(id, version=-1)
1281
802
  kparams = {}
1282
- client.add_param(kparams, 'id', id);
1283
- client.add_param(kparams, 'version', version);
1284
- client.queue_service_action_call('playlist', 'get', kparams);
1285
- if (client.is_multirequest)
1286
- return nil;
1287
- end
1288
- return client.do_queue();
803
+ client.add_param(kparams, 'id', id)
804
+ client.add_param(kparams, 'version', version)
805
+ perform_request('playList','get',kparams,false)
1289
806
  end
1290
807
 
1291
808
  def update(id, playlist, update_stats=false)
1292
809
  kparams = {}
1293
- client.add_param(kparams, 'id', id);
1294
- client.add_param(kparams, 'playlist', playlist);
1295
- client.add_param(kparams, 'updateStats', update_stats);
1296
- client.queue_service_action_call('playlist', 'update', kparams);
1297
- if (client.is_multirequest)
1298
- return nil;
1299
- end
1300
- return client.do_queue();
810
+ client.add_param(kparams, 'id', id)
811
+ client.add_param(kparams, 'playlist', playlist)
812
+ client.add_param(kparams, 'updateStats', update_stats)
813
+ perform_request('playList','update',kparams,false)
1301
814
  end
1302
815
 
1303
816
  def delete(id)
1304
817
  kparams = {}
1305
- client.add_param(kparams, 'id', id);
1306
- client.queue_service_action_call('playlist', 'delete', kparams);
1307
- if (client.is_multirequest)
1308
- return nil;
1309
- end
1310
- return client.do_queue();
818
+ client.add_param(kparams, 'id', id)
819
+ perform_request('playList','delete',kparams,false)
1311
820
  end
1312
821
 
1313
822
  def list(filter=nil, pager=nil)
1314
823
  kparams = {}
1315
- client.add_param(kparams, 'filter', filter);
1316
- client.add_param(kparams, 'pager', pager);
1317
- client.queue_service_action_call('playlist', 'list', kparams);
1318
- if (client.is_multirequest)
1319
- return nil;
1320
- end
1321
- return client.do_queue();
824
+ client.add_param(kparams, 'filter', filter)
825
+ client.add_param(kparams, 'pager', pager)
826
+ perform_request('playList','list',kparams,false)
1322
827
  end
1323
828
 
1324
829
  def execute(id, detailed='')
1325
830
  kparams = {}
1326
- client.add_param(kparams, 'id', id);
1327
- client.add_param(kparams, 'detailed', detailed);
1328
- client.queue_service_action_call('playlist', 'execute', kparams);
1329
- if (client.is_multirequest)
1330
- return nil;
1331
- end
1332
- return client.do_queue();
831
+ client.add_param(kparams, 'id', id)
832
+ client.add_param(kparams, 'detailed', detailed)
833
+ perform_request('playList','execute',kparams,false)
1333
834
  end
1334
835
 
1335
836
  def execute_from_content(playlist_type, playlist_content, detailed='')
1336
837
  kparams = {}
1337
- client.add_param(kparams, 'playlistType', playlist_type);
1338
- client.add_param(kparams, 'playlistContent', playlist_content);
1339
- client.add_param(kparams, 'detailed', detailed);
1340
- client.queue_service_action_call('playlist', 'executeFromContent', kparams);
1341
- if (client.is_multirequest)
1342
- return nil;
1343
- end
1344
- return client.do_queue();
838
+ client.add_param(kparams, 'playlistType', playlist_type)
839
+ client.add_param(kparams, 'playlistContent', playlist_content)
840
+ client.add_param(kparams, 'detailed', detailed)
841
+ perform_request('playList','executeFromContent',kparams,false)
1345
842
  end
1346
843
 
1347
844
  def execute_from_filters(filters, total_results, detailed='')
1348
845
  kparams = {}
1349
846
  filters.each do |obj|
1350
- client.add_param(kparams, 'filters', obj);
847
+ client.add_param(kparams, 'filters', obj)
1351
848
  end
1352
- client.add_param(kparams, 'totalResults', total_results);
1353
- client.add_param(kparams, 'detailed', detailed);
1354
- client.queue_service_action_call('playlist', 'executeFromFilters', kparams);
1355
- if (client.is_multirequest)
1356
- return nil;
1357
- end
1358
- return client.do_queue();
849
+ client.add_param(kparams, 'totalResults', total_results)
850
+ client.add_param(kparams, 'detailed', detailed)
851
+ perform_request('playList','executeFromFilters',kparams)
1359
852
  end
1360
853
 
1361
854
  def get_stats_from_content(playlist_type, playlist_content)
1362
855
  kparams = {}
1363
- client.add_param(kparams, 'playlistType', playlist_type);
1364
- client.add_param(kparams, 'playlistContent', playlist_content);
1365
- client.queue_service_action_call('playlist', 'getStatsFromContent', kparams);
1366
- if (client.is_multirequest)
1367
- return nil;
1368
- end
1369
- return client.do_queue();
856
+ client.add_param(kparams, 'playlistType', playlist_type)
857
+ client.add_param(kparams, 'playlistContent', playlist_content)
858
+ perform_request('playList','getStatsFromContent',kparams,false)
1370
859
  end
1371
860
  end #class PlaylistService
1372
861
 
1373
862
  class SearchService < BaseService
1374
- def initialize(client)
1375
- super(client)
1376
- end
1377
863
 
1378
864
  def search(search, pager=nil)
1379
865
  kparams = {}
1380
- client.add_param(kparams, 'search', search);
1381
- client.add_param(kparams, 'pager', pager);
1382
- client.queue_service_action_call('search', 'search', kparams);
1383
- if (client.is_multirequest)
1384
- return nil;
1385
- end
1386
- return client.do_queue();
866
+ client.add_param(kparams, 'search', search)
867
+ client.add_param(kparams, 'pager', pager)
868
+ perform_request('search','search',kparams,false)
1387
869
  end
1388
870
 
1389
871
  def get_media_info(search_result)
1390
872
  kparams = {}
1391
- client.add_param(kparams, 'searchResult', search_result);
1392
- client.queue_service_action_call('search', 'getMediaInfo', kparams);
1393
- if (client.is_multirequest)
1394
- return nil;
1395
- end
1396
- return client.do_queue();
873
+ client.add_param(kparams, 'searchResult', search_result)
874
+ perform_request('search','getMediaInfo',kparams,false)
1397
875
  end
1398
876
 
1399
877
  def search_url(media_type, url)
1400
878
  kparams = {}
1401
- client.add_param(kparams, 'mediaType', media_type);
1402
- client.add_param(kparams, 'url', url);
1403
- client.queue_service_action_call('search', 'searchUrl', kparams);
1404
- if (client.is_multirequest)
1405
- return nil;
1406
- end
1407
- return client.do_queue();
879
+ client.add_param(kparams, 'mediaType', media_type)
880
+ client.add_param(kparams, 'url', url)
881
+ perform_request('search','searchUrl',kparams,false)
1408
882
  end
1409
883
 
1410
884
  def external_login(search_source, user_name, password)
1411
885
  kparams = {}
1412
- client.add_param(kparams, 'searchSource', search_source);
1413
- client.add_param(kparams, 'userName', user_name);
1414
- client.add_param(kparams, 'password', password);
1415
- client.queue_service_action_call('search', 'externalLogin', kparams);
1416
- if (client.is_multirequest)
1417
- return nil;
1418
- end
1419
- return client.do_queue();
886
+ client.add_param(kparams, 'searchSource', search_source)
887
+ client.add_param(kparams, 'userName', user_name)
888
+ client.add_param(kparams, 'password', password)
889
+ perform_request('search','externalLogin',kparams,false)
1420
890
  end
1421
891
  end #class SearchService
1422
892
 
1423
893
  class SessionService < BaseService
1424
- def initialize(client)
1425
- super(client)
1426
- end
1427
894
 
1428
895
  def start(secret, user_id='', type=0, partner_id=-1, expiry=86400, privileges='')
1429
896
  kparams = {}
1430
- client.add_param(kparams, 'secret', secret);
1431
- client.add_param(kparams, 'userId', user_id);
1432
- client.add_param(kparams, 'type', type);
1433
- client.add_param(kparams, 'partnerId', partner_id);
1434
- client.add_param(kparams, 'expiry', expiry);
1435
- client.add_param(kparams, 'privileges', privileges);
1436
- client.queue_service_action_call('session', 'start', kparams);
1437
- if (client.is_multirequest)
1438
- return nil;
1439
- end
1440
- return client.do_queue();
897
+ client.add_param(kparams, 'secret', secret)
898
+ client.add_param(kparams, 'userId', user_id)
899
+ client.add_param(kparams, 'type', type)
900
+ client.add_param(kparams, 'partnerId', partner_id)
901
+ client.add_param(kparams, 'expiry', expiry)
902
+ client.add_param(kparams, 'privileges', privileges)
903
+ perform_request('session','start',kparams,false)
1441
904
  end
1442
905
 
1443
906
  def start_widget_session(widget_id, expiry=86400)
1444
907
  kparams = {}
1445
- client.add_param(kparams, 'widgetId', widget_id);
1446
- client.add_param(kparams, 'expiry', expiry);
1447
- client.queue_service_action_call('session', 'startWidgetSession', kparams);
1448
- if (client.is_multirequest)
1449
- return nil;
1450
- end
1451
- return client.do_queue();
908
+ client.add_param(kparams, 'widgetId', widget_id)
909
+ client.add_param(kparams, 'expiry', expiry)
910
+ perform_request('session','startWidgetSession',kparams,false)
1452
911
  end
1453
912
  end #class SessionService
1454
913
 
1455
914
  class StatsService < BaseService
1456
- def initialize(client)
1457
- super(client)
1458
- end
1459
915
 
1460
916
  def collect(event)
1461
917
  kparams = {}
1462
- client.add_param(kparams, 'event', event);
1463
- client.queue_service_action_call('stats', 'collect', kparams);
1464
- if (client.is_multirequest)
1465
- return nil;
1466
- end
1467
- return client.do_queue();
918
+ client.add_param(kparams, 'event', event)
919
+ perform_request('stats','collect',kparams,false)
1468
920
  end
1469
921
 
1470
922
  def kmc_collect(kmc_event)
1471
923
  kparams = {}
1472
- client.add_param(kparams, 'kmcEvent', kmc_event);
1473
- client.queue_service_action_call('stats', 'kmcCollect', kparams);
1474
- if (client.is_multirequest)
1475
- return nil;
1476
- end
1477
- return client.do_queue();
924
+ client.add_param(kparams, 'kmcEvent', kmc_event)
925
+ perform_request('stats','kmcCollect',kparams,false)
1478
926
  end
1479
927
 
1480
928
  def report_kce_error(kaltura_ce_error)
1481
929
  kparams = {}
1482
- client.add_param(kparams, 'kalturaCEError', kaltura_ce_error);
1483
- client.queue_service_action_call('stats', 'reportKceError', kparams);
1484
- if (client.is_multirequest)
1485
- return nil;
1486
- end
1487
- return client.do_queue();
930
+ client.add_param(kparams, 'kalturaCEError', kaltura_ce_error)
931
+ perform_request('stats','reportKceError',kparams,false)
1488
932
  end
1489
933
  end #class StatsService
1490
934
 
1491
935
  class SyndicationFeedService < BaseService
1492
- def initialize(client)
1493
- super(client)
1494
- end
1495
936
 
1496
937
  def add(syndication_feed)
1497
938
  kparams = {}
1498
- client.add_param(kparams, 'syndicationFeed', syndication_feed);
1499
- client.queue_service_action_call('syndicationFeed', 'add', kparams);
1500
- if (client.is_multirequest)
1501
- return nil;
1502
- end
1503
- return client.do_queue();
939
+ client.add_param(kparams, 'syndicationFeed', syndication_feed)
940
+ perform_request('syndicationFeed','add',kparams,false)
1504
941
  end
1505
942
 
1506
943
  def get(id)
1507
944
  kparams = {}
1508
- client.add_param(kparams, 'id', id);
1509
- client.queue_service_action_call('syndicationFeed', 'get', kparams);
1510
- if (client.is_multirequest)
1511
- return nil;
1512
- end
1513
- return client.do_queue();
945
+ client.add_param(kparams, 'id', id)
946
+ perform_request('syndicationFeed','get',kparams,false)
1514
947
  end
1515
948
 
1516
949
  def update(id, syndication_feed)
1517
950
  kparams = {}
1518
- client.add_param(kparams, 'id', id);
1519
- client.add_param(kparams, 'syndicationFeed', syndication_feed);
1520
- client.queue_service_action_call('syndicationFeed', 'update', kparams);
1521
- if (client.is_multirequest)
1522
- return nil;
1523
- end
1524
- return client.do_queue();
951
+ client.add_param(kparams, 'id', id)
952
+ client.add_param(kparams, 'syndicationFeed', syndication_feed)
953
+ perform_request('syndicationFeed','update',kparams,false)
1525
954
  end
1526
955
 
1527
956
  def delete(id)
1528
957
  kparams = {}
1529
- client.add_param(kparams, 'id', id);
1530
- client.queue_service_action_call('syndicationFeed', 'delete', kparams);
1531
- if (client.is_multirequest)
1532
- return nil;
1533
- end
1534
- return client.do_queue();
958
+ client.add_param(kparams, 'id', id)
959
+ perform_request('syndicationFeed','delete',kparams,false)
1535
960
  end
1536
961
 
1537
962
  def list(filter=nil, pager=nil)
1538
963
  kparams = {}
1539
- client.add_param(kparams, 'filter', filter);
1540
- client.add_param(kparams, 'pager', pager);
1541
- client.queue_service_action_call('syndicationFeed', 'list', kparams);
1542
- if (client.is_multirequest)
1543
- return nil;
1544
- end
1545
- return client.do_queue();
964
+ client.add_param(kparams, 'filter', filter)
965
+ client.add_param(kparams, 'pager', pager)
966
+ perform_request('syndicationFeed','list',kparams,false)
1546
967
  end
1547
968
 
1548
969
  def get_entry_count(feed_id)
1549
970
  kparams = {}
1550
- client.add_param(kparams, 'feedId', feed_id);
1551
- client.queue_service_action_call('syndicationFeed', 'getEntryCount', kparams);
1552
- if (client.is_multirequest)
1553
- return nil;
1554
- end
1555
- return client.do_queue();
971
+ client.add_param(kparams, 'feedId', feed_id)
972
+ perform_request('syndicationFeed','getEntryCount',kparams,false)
1556
973
  end
1557
974
 
1558
975
  def request_conversion(feed_id)
1559
976
  kparams = {}
1560
- client.add_param(kparams, 'feedId', feed_id);
1561
- client.queue_service_action_call('syndicationFeed', 'requestConversion', kparams);
1562
- if (client.is_multirequest)
1563
- return nil;
1564
- end
1565
- return client.do_queue();
977
+ client.add_param(kparams, 'feedId', feed_id)
978
+ perform_request('syndicationFeed','requestConversion',kparams,false)
1566
979
  end
1567
980
  end #class SyndicationFeedService
1568
981
 
1569
- class KalturaSystemService < BaseService
1570
- def initialize(client)
1571
- super(client)
1572
- end
982
+ class SystemService < BaseService
1573
983
 
1574
984
  def ping()
1575
985
  kparams = {}
1576
- client.queue_service_action_call('system', 'ping', kparams);
1577
- if (client.is_multirequest)
1578
- return nil;
1579
- end
1580
- return client.do_queue();
986
+ perform_request('system','ping',kparams,false)
1581
987
  end
1582
- end
988
+ end #class SystemService
1583
989
 
1584
990
  class UiConfService < BaseService
1585
- def initialize(client)
1586
- super(client)
1587
- end
1588
991
 
1589
992
  def add(ui_conf)
1590
993
  kparams = {}
1591
- client.add_param(kparams, 'uiConf', ui_conf);
1592
- client.queue_service_action_call('uiConf', 'add', kparams);
1593
- if (client.is_multirequest)
1594
- return nil;
1595
- end
1596
- return client.do_queue();
994
+ client.add_param(kparams, 'uiConf', ui_conf)
995
+ perform_request('uiConf','add',kparams,false)
1597
996
  end
1598
997
 
1599
998
  def update(id, ui_conf)
1600
999
  kparams = {}
1601
- client.add_param(kparams, 'id', id);
1602
- client.add_param(kparams, 'uiConf', ui_conf);
1603
- client.queue_service_action_call('uiConf', 'update', kparams);
1604
- if (client.is_multirequest)
1605
- return nil;
1606
- end
1607
- return client.do_queue();
1000
+ client.add_param(kparams, 'id', id)
1001
+ client.add_param(kparams, 'uiConf', ui_conf)
1002
+ perform_request('uiConf','update',kparams,false)
1608
1003
  end
1609
1004
 
1610
1005
  def get(id)
1611
1006
  kparams = {}
1612
- client.add_param(kparams, 'id', id);
1613
- client.queue_service_action_call('uiConf', 'get', kparams);
1614
- if (client.is_multirequest)
1615
- return nil;
1616
- end
1617
- return client.do_queue();
1007
+ client.add_param(kparams, 'id', id)
1008
+ perform_request('uiConf','get',kparams,false)
1618
1009
  end
1619
1010
 
1620
1011
  def delete(id)
1621
1012
  kparams = {}
1622
- client.add_param(kparams, 'id', id);
1623
- client.queue_service_action_call('uiConf', 'delete', kparams);
1624
- if (client.is_multirequest)
1625
- return nil;
1626
- end
1627
- return client.do_queue();
1013
+ client.add_param(kparams, 'id', id)
1014
+ perform_request('uiConf','delete',kparams,false)
1628
1015
  end
1629
1016
 
1630
1017
  def clone(id)
1631
1018
  kparams = {}
1632
- client.add_param(kparams, 'id', id);
1633
- client.queue_service_action_call('uiConf', 'clone', kparams);
1634
- if (client.is_multirequest)
1635
- return nil;
1636
- end
1637
- return client.do_queue();
1019
+ client.add_param(kparams, 'id', id)
1020
+ perform_request('uiConf','clone',kparams,false)
1638
1021
  end
1639
1022
 
1640
1023
  def list_templates(filter=nil, pager=nil)
1641
1024
  kparams = {}
1642
- client.add_param(kparams, 'filter', filter);
1643
- client.add_param(kparams, 'pager', pager);
1644
- client.queue_service_action_call('uiConf', 'listTemplates', kparams);
1645
- if (client.is_multirequest)
1646
- return nil;
1647
- end
1648
- return client.do_queue();
1025
+ client.add_param(kparams, 'filter', filter)
1026
+ client.add_param(kparams, 'pager', pager)
1027
+ perform_request('uiConf','listTemplates',kparams,false)
1649
1028
  end
1650
1029
 
1651
1030
  def list(filter=nil, pager=nil)
1652
1031
  kparams = {}
1653
- client.add_param(kparams, 'filter', filter);
1654
- client.add_param(kparams, 'pager', pager);
1655
- client.queue_service_action_call('uiConf', 'list', kparams);
1656
- if (client.is_multirequest)
1657
- return nil;
1658
- end
1659
- return client.do_queue();
1032
+ client.add_param(kparams, 'filter', filter)
1033
+ client.add_param(kparams, 'pager', pager)
1034
+ perform_request('uiConf','list',kparams,false)
1660
1035
  end
1661
1036
  end #class UiConfService
1662
1037
 
1663
1038
  class UploadService < BaseService
1664
- def initialize(client)
1665
- super(client)
1666
- end
1667
1039
 
1668
1040
  def upload(file_data)
1669
1041
  kparams = {}
1670
- client.add_param(kparams, 'fileData', file_data);
1671
- client.queue_service_action_call('upload', 'upload', kparams);
1672
- if (client.is_multirequest)
1673
- return nil;
1674
- end
1675
- return client.do_queue();
1042
+ client.add_param(kparams, 'fileData', file_data)
1043
+ perform_request('upload','upload',kparams,false)
1676
1044
  end
1677
1045
 
1678
1046
  def get_uploaded_file_token_by_file_name(file_name)
1679
1047
  kparams = {}
1680
- client.add_param(kparams, 'fileName', file_name);
1681
- client.queue_service_action_call('upload', 'getUploadedFileTokenByFileName', kparams);
1682
- if (client.is_multirequest)
1683
- return nil;
1684
- end
1685
- return client.do_queue();
1048
+ client.add_param(kparams, 'fileName', file_name)
1049
+ perform_request('upload','getUploadedFileTokenByFileName',kparams,false)
1686
1050
  end
1687
1051
  end #class UploadService
1688
1052
 
1689
1053
  class UserService < BaseService
1690
- def initialize(client)
1691
- super(client)
1692
- end
1693
1054
 
1694
1055
  def add(user)
1695
1056
  kparams = {}
1696
- client.add_param(kparams, 'user', user);
1697
- client.queue_service_action_call('user', 'add', kparams);
1698
- if (client.is_multirequest)
1699
- return nil;
1700
- end
1701
- return client.do_queue();
1057
+ client.add_param(kparams, 'user', user)
1058
+ perform_request('user','add',kparams,false)
1702
1059
  end
1703
1060
 
1704
1061
  def update(user_id, user)
1705
1062
  kparams = {}
1706
- client.add_param(kparams, 'userId', user_id);
1707
- client.add_param(kparams, 'user', user);
1708
- client.queue_service_action_call('user', 'update', kparams);
1709
- if (client.is_multirequest)
1710
- return nil;
1711
- end
1712
- return client.do_queue();
1063
+ client.add_param(kparams, 'userId', user_id)
1064
+ client.add_param(kparams, 'user', user)
1065
+ perform_request('user','update',kparams,false)
1713
1066
  end
1714
1067
 
1715
1068
  def get(user_id)
1716
1069
  kparams = {}
1717
- client.add_param(kparams, 'userId', user_id);
1718
- client.queue_service_action_call('user', 'get', kparams);
1719
- if (client.is_multirequest)
1720
- return nil;
1721
- end
1722
- return client.do_queue();
1070
+ client.add_param(kparams, 'userId', user_id)
1071
+ perform_request('user','get',kparams,false)
1723
1072
  end
1724
1073
 
1725
1074
  def delete(user_id)
1726
1075
  kparams = {}
1727
- client.add_param(kparams, 'userId', user_id);
1728
- client.queue_service_action_call('user', 'delete', kparams);
1729
- if (client.is_multirequest)
1730
- return nil;
1731
- end
1732
- return client.do_queue();
1076
+ client.add_param(kparams, 'userId', user_id)
1077
+ perform_request('user','delete',kparams,false)
1733
1078
  end
1734
1079
 
1735
1080
  def list(filter=nil, pager=nil)
1736
1081
  kparams = {}
1737
- client.add_param(kparams, 'filter', filter);
1738
- client.add_param(kparams, 'pager', pager);
1739
- client.queue_service_action_call('user', 'list', kparams);
1740
- if (client.is_multirequest)
1741
- return nil;
1742
- end
1743
- return client.do_queue();
1082
+ client.add_param(kparams, 'filter', filter)
1083
+ client.add_param(kparams, 'pager', pager)
1084
+ perform_request('user','list',kparams,false)
1744
1085
  end
1745
1086
 
1746
1087
  def notify_ban(user_id)
1747
1088
  kparams = {}
1748
- client.add_param(kparams, 'userId', user_id);
1749
- client.queue_service_action_call('user', 'notifyBan', kparams);
1750
- if (client.is_multirequest)
1751
- return nil;
1752
- end
1753
- return client.do_queue();
1089
+ client.add_param(kparams, 'userId', user_id)
1090
+ perform_request('user','notifyBan',kparams,false)
1754
1091
  end
1755
1092
  end #class UserService
1756
1093
 
1757
1094
  class WidgetService < BaseService
1758
- def initialize(client)
1759
- super(client)
1760
- end
1761
1095
 
1762
1096
  def add(widget)
1763
1097
  kparams = {}
1764
- client.add_param(kparams, 'widget', widget);
1765
- client.queue_service_action_call('widget', 'add', kparams);
1766
- if (client.is_multirequest)
1767
- return nil;
1768
- end
1769
- return client.do_queue();
1098
+ client.add_param(kparams, 'widget', widget)
1099
+ perform_request('widget','add',kparams,false)
1770
1100
  end
1771
1101
 
1772
1102
  def update(id, widget)
1773
1103
  kparams = {}
1774
- client.add_param(kparams, 'id', id);
1775
- client.add_param(kparams, 'widget', widget);
1776
- client.queue_service_action_call('widget', 'update', kparams);
1777
- if (client.is_multirequest)
1778
- return nil;
1779
- end
1780
- return client.do_queue();
1104
+ client.add_param(kparams, 'id', id)
1105
+ client.add_param(kparams, 'widget', widget)
1106
+ perform_request('widget','update',kparams,false)
1781
1107
  end
1782
1108
 
1783
1109
  def get(id)
1784
1110
  kparams = {}
1785
- client.add_param(kparams, 'id', id);
1786
- client.queue_service_action_call('widget', 'get', kparams);
1787
- if (client.is_multirequest)
1788
- return nil;
1789
- end
1790
- return client.do_queue();
1111
+ client.add_param(kparams, 'id', id)
1112
+ perform_request('widget','get',kparams,false)
1791
1113
  end
1792
1114
 
1793
1115
  def clone(widget)
1794
1116
  kparams = {}
1795
- client.add_param(kparams, 'widget', widget);
1796
- client.queue_service_action_call('widget', 'clone', kparams);
1797
- if (client.is_multirequest)
1798
- return nil;
1799
- end
1800
- return client.do_queue();
1117
+ client.add_param(kparams, 'widget', widget)
1118
+ perform_request('widget','clone',kparams,false)
1801
1119
  end
1802
1120
 
1803
1121
  def list(filter=nil, pager=nil)
1804
1122
  kparams = {}
1805
- client.add_param(kparams, 'filter', filter);
1806
- client.add_param(kparams, 'pager', pager);
1807
- client.queue_service_action_call('widget', 'list', kparams);
1808
- if (client.is_multirequest)
1809
- return nil;
1810
- end
1811
- return client.do_queue();
1123
+ client.add_param(kparams, 'filter', filter)
1124
+ client.add_param(kparams, 'pager', pager)
1125
+ perform_request('widget','list',kparams,false)
1812
1126
  end
1813
1127
  end #class WidgetService
1814
1128
 
1815
1129
  class XInternalService < BaseService
1816
- def initialize(client)
1817
- super(client)
1818
- end
1819
1130
 
1820
1131
  def x_add_bulk_download(entry_ids, flavor_params_id='')
1821
1132
  kparams = {}
1822
- client.add_param(kparams, 'entryIds', entry_ids);
1823
- client.add_param(kparams, 'flavorParamsId', flavor_params_id);
1824
- client.queue_service_action_call('xInternal', 'xAddBulkDownload', kparams);
1825
- if (client.is_multirequest)
1826
- return nil;
1827
- end
1828
- return client.do_queue();
1133
+ client.add_param(kparams, 'entryIds', entry_ids)
1134
+ client.add_param(kparams, 'flavorParamsId', flavor_params_id)
1135
+ perform_request('xInternal','xAddBulkDownload',kparams,false)
1829
1136
  end
1830
1137
  end #class XInternalService
1831
1138
 
1832
1139
  class SystemUserService < BaseService
1833
- def initialize(client)
1834
- super(client)
1835
- end
1836
1140
 
1837
1141
  def verify_password(email, password)
1838
1142
  kparams = {}
1839
- client.add_param(kparams, 'email', email);
1840
- client.add_param(kparams, 'password', password);
1841
- client.queue_service_action_call('systemUser', 'verifyPassword', kparams);
1842
- if (client.is_multirequest)
1843
- return nil;
1844
- end
1845
- return client.do_queue();
1143
+ client.add_param(kparams, 'email', email)
1144
+ client.add_param(kparams, 'password', password)
1145
+ perform_request('systemUser','verifyPassword',kparams,false)
1846
1146
  end
1847
1147
 
1848
1148
  def generate_new_password()
1849
1149
  kparams = {}
1850
- client.queue_service_action_call('systemUser', 'generateNewPassword', kparams);
1851
- if (client.is_multirequest)
1852
- return nil;
1853
- end
1854
- return client.do_queue();
1150
+ perform_request('systemUser','generateNewPassword',kparams,false)
1855
1151
  end
1856
1152
 
1857
1153
  def set_new_password(user_id, password)
1858
1154
  kparams = {}
1859
- client.add_param(kparams, 'userId', user_id);
1860
- client.add_param(kparams, 'password', password);
1861
- client.queue_service_action_call('systemUser', 'setNewPassword', kparams);
1862
- if (client.is_multirequest)
1863
- return nil;
1864
- end
1865
- return client.do_queue();
1155
+ client.add_param(kparams, 'userId', user_id)
1156
+ client.add_param(kparams, 'password', password)
1157
+ perform_request('systemUser','setNewPassword',kparams,false)
1866
1158
  end
1867
1159
 
1868
1160
  def add(system_user)
1869
1161
  kparams = {}
1870
- client.add_param(kparams, 'systemUser', system_user);
1871
- client.queue_service_action_call('systemUser', 'add', kparams);
1872
- if (client.is_multirequest)
1873
- return nil;
1874
- end
1875
- return client.do_queue();
1162
+ client.add_param(kparams, 'systemUser', system_user)
1163
+ perform_request('systemUser','add',kparams,false)
1876
1164
  end
1877
1165
 
1878
1166
  def get(user_id)
1879
1167
  kparams = {}
1880
- client.add_param(kparams, 'userId', user_id);
1881
- client.queue_service_action_call('systemUser', 'get', kparams);
1882
- if (client.is_multirequest)
1883
- return nil;
1884
- end
1885
- return client.do_queue();
1168
+ client.add_param(kparams, 'userId', user_id)
1169
+ perform_request('systemUser','get',kparams,false)
1886
1170
  end
1887
1171
 
1888
1172
  def get_by_email(email)
1889
1173
  kparams = {}
1890
- client.add_param(kparams, 'email', email);
1891
- client.queue_service_action_call('systemUser', 'getByEmail', kparams);
1892
- if (client.is_multirequest)
1893
- return nil;
1894
- end
1895
- return client.do_queue();
1174
+ client.add_param(kparams, 'email', email)
1175
+ perform_request('systemUser','getByEmail',kparams,false)
1896
1176
  end
1897
1177
 
1898
1178
  def update(user_id, system_user)
1899
1179
  kparams = {}
1900
- client.add_param(kparams, 'userId', user_id);
1901
- client.add_param(kparams, 'systemUser', system_user);
1902
- client.queue_service_action_call('systemUser', 'update', kparams);
1903
- if (client.is_multirequest)
1904
- return nil;
1905
- end
1906
- return client.do_queue();
1180
+ client.add_param(kparams, 'userId', user_id)
1181
+ client.add_param(kparams, 'systemUser', system_user)
1182
+ perform_request('systemUser','update',kparams,false)
1907
1183
  end
1908
1184
 
1909
1185
  def delete(user_id)
1910
1186
  kparams = {}
1911
- client.add_param(kparams, 'userId', user_id);
1912
- client.queue_service_action_call('systemUser', 'delete', kparams);
1913
- if (client.is_multirequest)
1914
- return nil;
1915
- end
1916
- return client.do_queue();
1187
+ client.add_param(kparams, 'userId', user_id)
1188
+ perform_request('systemUser','delete',kparams,false)
1917
1189
  end
1918
1190
 
1919
1191
  def list(filter=nil, pager=nil)
1920
1192
  kparams = {}
1921
- client.add_param(kparams, 'filter', filter);
1922
- client.add_param(kparams, 'pager', pager);
1923
- client.queue_service_action_call('systemUser', 'list', kparams);
1924
- if (client.is_multirequest)
1925
- return nil;
1926
- end
1927
- return client.do_queue();
1193
+ client.add_param(kparams, 'filter', filter)
1194
+ client.add_param(kparams, 'pager', pager)
1195
+ perform_request('systemUser','list',kparams,false)
1928
1196
  end
1929
1197
  end #class SystemUserService
1930
1198
 
1931
1199
  class SystemPartnerService < BaseService
1932
- def initialize(client)
1933
- super(client)
1934
- end
1935
1200
 
1936
1201
  def get(partner_id)
1937
1202
  kparams = {}
1938
- client.add_param(kparams, 'partnerId', partner_id);
1939
- client.queue_service_action_call('systemPartner', 'get', kparams);
1940
- if (client.is_multirequest)
1941
- return nil;
1942
- end
1943
- return client.do_queue();
1203
+ client.add_param(kparams, 'partnerId', partner_id)
1204
+ perform_request('systemPartner','get',kparams,false)
1944
1205
  end
1945
1206
 
1946
1207
  def get_usage(partner_filter=nil, usage_filter=nil, pager=nil)
1947
1208
  kparams = {}
1948
- client.add_param(kparams, 'partnerFilter', partner_filter);
1949
- client.add_param(kparams, 'usageFilter', usage_filter);
1950
- client.add_param(kparams, 'pager', pager);
1951
- client.queue_service_action_call('systemPartner', 'getUsage', kparams);
1952
- if (client.is_multirequest)
1953
- return nil;
1954
- end
1955
- return client.do_queue();
1209
+ client.add_param(kparams, 'partnerFilter', partner_filter)
1210
+ client.add_param(kparams, 'usageFilter', usage_filter)
1211
+ client.add_param(kparams, 'pager', pager)
1212
+ perform_request('systemPartner','getUsage',kparams,false)
1956
1213
  end
1957
1214
 
1958
1215
  def list(filter=nil, pager=nil)
1959
1216
  kparams = {}
1960
- client.add_param(kparams, 'filter', filter);
1961
- client.add_param(kparams, 'pager', pager);
1962
- client.queue_service_action_call('systemPartner', 'list', kparams);
1963
- if (client.is_multirequest)
1964
- return nil;
1965
- end
1966
- return client.do_queue();
1217
+ client.add_param(kparams, 'filter', filter)
1218
+ client.add_param(kparams, 'pager', pager)
1219
+ perform_request('systemPartner','list',kparams,false)
1967
1220
  end
1968
1221
 
1969
1222
  def update_status(partner_id, status)
1970
1223
  kparams = {}
1971
- client.add_param(kparams, 'partnerId', partner_id);
1972
- client.add_param(kparams, 'status', status);
1973
- client.queue_service_action_call('systemPartner', 'updateStatus', kparams);
1974
- if (client.is_multirequest)
1975
- return nil;
1976
- end
1977
- return client.do_queue();
1224
+ client.add_param(kparams, 'partnerId', partner_id)
1225
+ client.add_param(kparams, 'status', status)
1226
+ perform_request('systemPartner','updateStatus',kparams,false)
1978
1227
  end
1979
1228
 
1980
1229
  def get_admin_session(partner_id)
1981
1230
  kparams = {}
1982
- client.add_param(kparams, 'partnerId', partner_id);
1983
- client.queue_service_action_call('systemPartner', 'getAdminSession', kparams);
1984
- if (client.is_multirequest)
1985
- return nil;
1986
- end
1987
- return client.do_queue();
1231
+ client.add_param(kparams, 'partnerId', partner_id)
1232
+ perform_request('systemPartner','getAdminSession',kparams,false)
1988
1233
  end
1989
1234
 
1990
1235
  def update_configuration(partner_id, configuration)
1991
1236
  kparams = {}
1992
- client.add_param(kparams, 'partnerId', partner_id);
1993
- client.add_param(kparams, 'configuration', configuration);
1994
- client.queue_service_action_call('systemPartner', 'updateConfiguration', kparams);
1995
- if (client.is_multirequest)
1996
- return nil;
1997
- end
1998
- return client.do_queue();
1237
+ client.add_param(kparams, 'partnerId', partner_id)
1238
+ client.add_param(kparams, 'configuration', configuration)
1239
+ perform_request('systemPartner','updateConfiguration',kparams,false)
1999
1240
  end
2000
1241
 
2001
1242
  def get_configuration(partner_id)
2002
1243
  kparams = {}
2003
- client.add_param(kparams, 'partnerId', partner_id);
2004
- client.queue_service_action_call('systemPartner', 'getConfiguration', kparams);
2005
- if (client.is_multirequest)
2006
- return nil;
2007
- end
2008
- return client.do_queue();
1244
+ client.add_param(kparams, 'partnerId', partner_id)
1245
+ perform_request('systemPartner','getConfiguration',kparams,false)
2009
1246
  end
2010
1247
 
2011
1248
  def get_packages()
2012
1249
  kparams = {}
2013
- client.queue_service_action_call('systemPartner', 'getPackages', kparams);
2014
- if (client.is_multirequest)
2015
- return nil;
2016
- end
2017
- return client.do_queue();
1250
+ perform_request('systemPartner','getPackages',kparams,false)
2018
1251
  end
2019
1252
  end #class SystemPartnerService
2020
1253
 
2021
1254
  class FileSyncService < BaseService
2022
- def initialize(client)
2023
- super(client)
2024
- end
2025
1255
 
2026
1256
  def list(filter=nil, pager=nil)
2027
1257
  kparams = {}
2028
- client.add_param(kparams, 'filter', filter);
2029
- client.add_param(kparams, 'pager', pager);
2030
- client.queue_service_action_call('fileSync', 'list', kparams);
2031
- if (client.is_multirequest)
2032
- return nil;
2033
- end
2034
- return client.do_queue();
1258
+ client.add_param(kparams, 'filter', filter)
1259
+ client.add_param(kparams, 'pager', pager)
1260
+ perform_request('fileSync','list',kparams,false)
2035
1261
  end
2036
1262
  end #class FileSyncService
2037
1263
 
2038
1264
  class FlavorParamsOutputService < BaseService
2039
- def initialize(client)
2040
- super(client)
2041
- end
2042
1265
 
2043
1266
  def list(filter=nil, pager=nil)
2044
1267
  kparams = {}
2045
- client.add_param(kparams, 'filter', filter);
2046
- client.add_param(kparams, 'pager', pager);
2047
- client.queue_service_action_call('flavorParamsOutput', 'list', kparams);
2048
- if (client.is_multirequest)
2049
- return nil;
2050
- end
2051
- return client.do_queue();
1268
+ client.add_param(kparams, 'filter', filter)
1269
+ client.add_param(kparams, 'pager', pager)
1270
+ perform_request('flavorParamsOutput','list',kparams,false)
2052
1271
  end
2053
1272
  end #class FlavorParamsOutputService
2054
1273
 
2055
1274
  class MediaInfoService < BaseService
2056
- def initialize(client)
2057
- super(client)
2058
- end
2059
1275
 
2060
1276
  def list(filter=nil, pager=nil)
2061
1277
  kparams = {}
2062
- client.add_param(kparams, 'filter', filter);
2063
- client.add_param(kparams, 'pager', pager);
2064
- client.queue_service_action_call('mediaInfo', 'list', kparams);
2065
- if (client.is_multirequest)
2066
- return nil;
2067
- end
2068
- return client.do_queue();
1278
+ client.add_param(kparams, 'filter', filter)
1279
+ client.add_param(kparams, 'pager', pager)
1280
+ perform_request('mediaInfo','list',kparams,false)
2069
1281
  end
2070
1282
  end #class MediaInfoService
2071
1283
 
2072
1284
  class EntryAdminService < BaseService
2073
- def initialize(client)
2074
- super(client)
2075
- end
2076
1285
 
2077
1286
  def get(entry_id, version=-1)
2078
1287
  kparams = {}
2079
- client.add_param(kparams, 'entryId', entry_id);
2080
- client.add_param(kparams, 'version', version);
2081
- client.queue_service_action_call('entryAdmin', 'get', kparams);
2082
- if (client.is_multirequest)
2083
- return nil;
2084
- end
2085
- return client.do_queue();
1288
+ client.add_param(kparams, 'entryId', entry_id)
1289
+ client.add_param(kparams, 'version', version)
1290
+ perform_request('entryAdmin','get',kparams,false)
2086
1291
  end
2087
1292
  end #class EntryAdminService
2088
1293
  end #module Service