Example #1
0
        //this function checks if a given flavor system name exist in the account.
        static int?CheckIfFlavorExist(String name)
        {
            KalturaClient client = new KalturaClient(GetConfig());
            string        ks     = client.GenerateSession(ADMIN_SECRET, USER_ID, KalturaSessionType.ADMIN, PARTNER_ID, 86400, "");

            client.KS = ks;

            //verify that the account we're testing has the new iPad flavor enabled on the default conversion profile
            KalturaConversionProfile defaultProfile = client.ConversionProfileService.GetDefault();
            KalturaConversionProfileAssetParamsFilter flavorsListFilter = new KalturaConversionProfileAssetParamsFilter();

            flavorsListFilter.SystemNameEqual          = name;
            flavorsListFilter.ConversionProfileIdEqual = defaultProfile.Id;

            KalturaConversionProfileAssetParamsListResponse list = client.ConversionProfileAssetParamsService.List(flavorsListFilter);

            if (list.TotalCount > 0)
            {
                return(list.Objects[0].AssetParamsId);
            }
            else
            {
                return(null);
            }
        }
        public KalturaConversionProfileAssetParamsListResponse List(KalturaConversionProfileAssetParamsFilter filter, KalturaFilterPager pager)
        {
            KalturaParams kparams = new KalturaParams();

            if (filter != null)
            {
                kparams.Add("filter", filter.ToParams());
            }
            if (pager != null)
            {
                kparams.Add("pager", pager.ToParams());
            }
            _Client.QueueServiceCall("conversionprofileassetparams", "list", kparams);
            if (this._Client.IsMultiRequest)
            {
                return(null);
            }
            XmlElement result = _Client.DoQueue();

            return((KalturaConversionProfileAssetParamsListResponse)KalturaObjectFactory.Create(result));
        }
 public KalturaConversionProfileAssetParamsListResponse List(KalturaConversionProfileAssetParamsFilter filter)
 {
     return(this.List(filter, null));
 }