/// <summary> /// Gets all the videos that have been modified since the given time. /// </summary> /// <param name="fromDate">The date of the oldest Video which you would like returned, specified in UTC time.</param> /// <param name="filters">A list of filters, specifying which categories of videos you would like returned. /// Valid filter values are PLAYABLE, UNSCHEDULED, INACTIVE, and DELETED.</param> /// <param name="pageSize">Number of items returned per page. A page is a subset of all of the items that /// satisfy the request. The maximum page size is 25.</param> /// <param name="pageNumber">The zero-indexed number of the page to return.</param> /// <param name="sortBy">The field by which to sort the results.</param> /// <param name="sortOrder">How to order the results: ascending or descending.</param> /// <param name="videoFields">A list of the fields you wish to have populated in the /// Videos contained in the returned object. If you omit this parameter, the method returns the /// following fields of the video: id, name, shortDescription, longDescription, creationDate, /// publisheddate, lastModifiedDate, linkURL, linkText, tags, videoStillURL, thumbnailURL, /// referenceId, length, economics, playsTotal, playsTrailingWeek. If you use a token with URL /// access, this method also returns FLVURL, renditions, FLVFullLength, videoFullLength.</param> /// <param name="customFields">A list of the custom fields you wish to have populated /// in the videos contained in the returned object. If you omit this parameter, no custom fields are /// returned, unless you include the value 'customFields' in the video_fields parameter.</param> /// <param name="getItemCount">If true, also return how many total results there are.</param> /// <returns>All videos that have been modified since the given time.</returns> public BrightcoveItemCollection<BrightcoveVideo> FindModifiedVideos(DateTime fromDate, IEnumerable<ModifiedVideoFilter> filters, int pageSize, int pageNumber, SortBy sortBy, SortOrder sortOrder, IEnumerable<string> videoFields, IEnumerable<string> customFields, bool getItemCount) { NameValueCollection parms = BuildBasicReadParams("find_modified_videos"); parms.Add("from_date", fromDate.ToUnixMinutesUtc().ToString()); if (filters != null) { parms.AddRange("filter", filters.Select(o => o.ToBrightcoveName())); } parms.Add("page_size", pageSize.ToString()); parms.Add("page_number", pageNumber.ToString()); parms.Add("sort_by", sortBy.ToBrightcoveName()); parms.Add("sort_order", sortOrder.ToBrightcoveName()); parms.Add("get_item_count", getItemCount.ToString().ToLower()); if (videoFields != null) { parms.AddRange("video_fields", videoFields); } if (customFields != null) { parms.AddRange("custom_fields", customFields); } return RunQuery<BrightcoveItemCollection<BrightcoveVideo>>(parms); }
/// <summary> /// Gets all the audio tracks that have been modified since the given time. /// </summary> /// <param name="fromDate">The date of the oldest Audio Track which you would like returned, specified in UTC.</param> /// <param name="filters">A comma-separated list of filters, specifying which categories of audio tracks you would /// like returned. Valid filter values are PLAYABLE, UNSCHEDULED, INACTIVE, and DELETED.</param> /// <param name="pageSize">Number of items returned per page. A page is a subset of all of the items that satisfy /// the request. The maximum page size is 25.</param> /// <param name="pageNumber">The zero-indexed number of the page to return.</param> /// <param name="sortBy">The field by which to sort the results.</param> /// <param name="sortOrder">How to order the results: ascending or descending.</param> /// <param name="audioTrackFields">A list of the fields you wish to have populated in the audio tracks /// contained in the returned object.</param> /// <param name="getItemCount">If true, also return how many total results there are in this campaign.</param> /// <returns>All audio tracks that have been modified since the given time.</returns> public BrightcoveItemCollection<BrightcoveAudioTrack> FindModifiedAudioTracks(DateTime fromDate, IEnumerable<ModifiedVideoFilter> filters, int pageSize, int pageNumber, SortBy sortBy, SortOrder sortOrder, IEnumerable<string> audioTrackFields, bool getItemCount) { NameValueCollection parms = BuildBasicReadParams("find_modified_audiotracks"); parms.Add("from_date", fromDate.ToUnixMinutesUtc().ToString()); if (filters != null) { parms.AddRange("filter", filters.Select(o => o.ToBrightcoveName())); } parms.Add("page_size", pageSize.ToString()); parms.Add("page_number", pageNumber.ToString()); parms.Add("get_item_count", getItemCount.ToString().ToLower()); parms.Add("sort_by", sortBy.ToBrightcoveName()); // work around an apparent bug in the API by not specifying sort order when it's "Ascending" if (sortOrder != SortOrder.Ascending) { parms.Add("sort_order", sortOrder.ToBrightcoveName()); } if (audioTrackFields != null) { parms.AddRange("audiotrack_fields", audioTrackFields); } return RunQuery<BrightcoveItemCollection<BrightcoveAudioTrack>>(parms); }