Example #1
0
 public void SetUp()
 {
     _api = BrightcoveApiFactory.CreateApi(ApiKeys.ReadToken);
 }
        public void FindAllVideos()
        {
            Api = BrightcoveApiFactory.CreateApi(ApiKey);
            // Perform the API call
            BrightcoveItemCollection<BrightcoveVideo> videos = Api.SearchVideos(new List<FieldValuePair>(),
                                                                                new List<FieldValuePair>(),
                                                                                new List<FieldValuePair>());

            int k = 0;

            while (k <= Math.Floor((decimal)videos.TotalCount / (decimal)videos.PageSize))
            {
                if (k != 0)
                {
                    videos = Api.SearchVideos(new List<FieldValuePair>(),
                                               new List<FieldValuePair>(),
                                               new List<FieldValuePair>(),
                                               videos.PageSize,
                                               k);
                }

                AllVideos.AddRange(videos);

                k++;
            }
        }