This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retry a promise until succeed or reach max retry count. | |
* | |
* Options includes: | |
* - maxRetryCount: | |
* If -1 -> retry until success. Terminate if exceed max count. | |
* If 0 -> No retry | |
* Default: -1 | |
* | |
* - retryPeriod: Timer period. Default: 3 seconds; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author ntd251 | |
* @dependency underscore.js | |
* @example | |
* | |
* input = { | |
* arrayItems: [ | |
* numericKey: 10, | |
* jsonKey: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MOVIE_TYPE = 493 | |
EPISODE_TYPE = 494 | |
SERIES_TYPE = 496 | |
# Suits series id | |
channel_id = '310401' | |
filter = Kaltura::KalturaSearchAssetFilter.new | |
# Comma separated list of EPG channel ids to search within. | |
filter.id_in = channel_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'kaltura' | |
# Kindly replace partnerID, email, and pwd with corresponding values | |
# | |
KALTURA_PARTNER_ID = 'partnerID' | |
KALTURA_USERNAME = 'email' | |
KALTURA_PASSWORD = 'pwd' | |
KALTURA_SERVICE_URL = 'http://console-sgs1.ott.kaltura.com/restful' | |
config = Kaltura::KalturaConfiguration.new |