本文整理汇总了C#中SortBy.ToBrightcoveName方法的典型用法代码示例。如果您正苦于以下问题:C# SortBy.ToBrightcoveName方法的具体用法?C# SortBy.ToBrightcoveName怎么用?C# SortBy.ToBrightcoveName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SortBy
的用法示例。
在下文中一共展示了SortBy.ToBrightcoveName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindAllPlaylists
/// <summary>
/// Find all playlists in this account.
/// </summary>
/// <param name="pageSize">Number of playlists returned per page. A page is a subset of all of the playlists that
/// satisfy the request. The maximum page size is 50.</param>
/// <param name="pageNumber">The zero-indexed number of the page to return.</param>
/// <param name="sortBy">The property that you'd like to sort the results by.</param>
/// <param name="sortOrder">The order that you'd like the results sorted - ascending or descending.</param>
/// <param name="videoFields">A list of the fields you wish to have populated in the Videos
/// contained in the playlists. 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 the Videos' FLVURL, renditions, FLVFullLength,
/// videoFullLength.</param>
/// <param name="playlistFields">A list of the fields you wish to have populated in the Playlists
/// contained in the returned object. If you omit this parameter, all playlist fields are returned.</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>A collection of Playlists that is the specified subset of all the playlists in this account.</returns>
public BrightcoveItemCollection<BrightcovePlaylist> FindAllPlaylists(int pageSize, int pageNumber, SortBy sortBy, SortOrder sortOrder, IEnumerable<string> videoFields,
IEnumerable<string> playlistFields, IEnumerable<string> customFields, bool getItemCount)
{
NameValueCollection parms = BuildBasicReadParams("find_all_playlists");
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 (playlistFields != null)
{
parms.AddRange("playlist_fields", playlistFields);
}
if (customFields != null)
{
parms.AddRange("custom_fields", customFields);
}
return RunQuery<BrightcoveItemCollection<BrightcovePlaylist>>(parms);
}
示例2: FindAllAudioTracks
/// <summary>
/// Find all audio tracks in the Brightcove media library for this account.
/// </summary>
/// <param name="pageSize">Number of items returned per page. Maximum page size is 100.</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 audiotracks
/// contained in the returned object.</param>
/// <param name="getItemCount">If true, also return how many total results there are.</param>
/// <returns>A collection of audio tracks matching the specified search criteria.</returns>
public BrightcoveItemCollection<BrightcoveAudioTrack> FindAllAudioTracks(int pageSize, int pageNumber, SortBy sortBy, SortOrder sortOrder, IEnumerable<string> audioTrackFields, bool getItemCount)
{
NameValueCollection parms = BuildBasicReadParams("find_all_audiotracks");
parms.Add("get_item_count", getItemCount.ToString().ToLower());
parms.Add("page_size", pageSize.ToString());
parms.Add("page_number", pageNumber.ToString());
parms.Add("sort_by", sortBy.ToBrightcoveName());
parms.Add("sort_order", sortOrder.ToBrightcoveName());
if (audioTrackFields != null)
{
parms.AddRange("audiotrack_fields", audioTrackFields);
}
return RunQuery<BrightcoveItemCollection<BrightcoveAudioTrack>>(parms);
}
示例3: FindVideosByUserId
/// <summary>
/// Retrieves the videos uploaded by the specified user id. This method can be used to find videos submitted using
/// the consumer-generated media (CGM) module.
/// </summary>
/// <param name="userId">The id of the user whose videos we'd like to retrieve.</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 100.</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>An ItemCollection representing the requested page of Videos uploaded by the specified user,
/// in the order specified.</returns>
public BrightcoveItemCollection<BrightcoveVideo> FindVideosByUserId(string userId, int pageSize, int pageNumber, SortBy sortBy, SortOrder sortOrder,
IEnumerable<string> videoFields, IEnumerable<string> customFields, bool getItemCount)
{
NameValueCollection parms = BuildBasicReadParams("find_videos_by_user_id");
parms.Add("user_id", userId);
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);
}
示例4: SearchVideos
/// <summary>
/// Searches videos according to the criteria provided by the user.
/// </summary>
/// <param name="all">Specifies the field:value pairs for search criteria that MUST be present in
/// the index in order to return a hit in the result set. If the field's name is not present, it is
/// assumed to be name and shortDescription.</param>
/// <param name="any">Specifies the field:value pairs for search criteria AT LEAST ONE of which
/// must be present to return a hit in the result set. If the field's name is not present, it is
/// assumed to be name and shortDescription.</param>
/// <param name="none">Specifies the field:value pairs for search criteria that MUST NOT be present
/// to return a hit in the result set. If the field's name is not present, it is assumed to be
/// name and shortDescription.</param>
/// <param name="pageSize">Number of items returned per page. (max 100)</param>
/// <param name="pageNumber">The zero-indexed number of the page to return.</param>
/// <param name="exact">If true, disables fuzzy search and requires an exact match of search terms.
/// A fuzzy search does not require an exact match of the indexed terms, but will return a hit for
/// terms that are closely related based on language-specific criteria. The fuzzy search is
/// available only if your account is based in the United States.</param>
/// <param name="sortBy">Specifies the field by which to sort results.</param>
/// <param name="sortOrder">Specifies the direction in which to sort results</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>A collection of videos matching the specified criteria.</returns>
public BrightcoveItemCollection<BrightcoveVideo> SearchVideos(IEnumerable<FieldValuePair> all, IEnumerable<FieldValuePair> any, IEnumerable<FieldValuePair> none,
int pageSize, int pageNumber, bool exact, SortBy sortBy, SortOrder sortOrder,
IEnumerable<string> videoFields, IEnumerable<string> customFields, bool getItemCount)
{
NameValueCollection parms = BuildBasicReadParams("search_videos");
parms.Add("get_item_count", getItemCount.ToString().ToLower());
parms.Add("exact", exact.ToString().ToLower());
parms.Add("page_size", pageSize.ToString());
parms.Add("page_number", pageNumber.ToString());
parms.Add("sort_by", sortBy.ToBrightcoveName());
parms.Add("sort_order", sortOrder.ToBrightcoveName());
if (videoFields != null)
{
parms.AddRange("video_fields", videoFields);
}
if (customFields != null)
{
parms.AddRange("custom_fields", customFields);
}
if (all != null)
{
parms.AddRange("all", all.Select(o => o.ToBrightcoveString()));
}
if (any != null)
{
parms.AddRange("any", any.Select(o => o.ToBrightcoveString()));
}
if (none != null)
{
parms.AddRange("none", none.Select(o => o.ToBrightcoveString()));
}
return RunQuery<BrightcoveItemCollection<BrightcoveVideo>>(parms);
}
示例5: FindModifiedVideos
/// <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);
}
示例6: FindModifiedAudioTracks
/// <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);
}