本文整理汇总了C#中PhotoSearchExtras类的典型用法代码示例。如果您正苦于以下问题:C# PhotoSearchExtras类的具体用法?C# PhotoSearchExtras怎么用?C# PhotoSearchExtras使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PhotoSearchExtras类属于命名空间,在下文中一共展示了PhotoSearchExtras类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TagsGetClusterPhotos
/// <summary>
/// Returns the first 24 photos for a given tag cluster.
/// </summary>
/// <param name="tag">The tag whose cluster photos you want to return.</param>
/// <param name="clusterId">The cluster id for the cluster you want to return the photos. This is the first three subtags of the tag cluster appended with hyphens ('-').</param>
/// <param name="extras">Extra information to return with each photo.</param>
/// <returns></returns>
public PhotoCollection TagsGetClusterPhotos(string tag, string clusterId, PhotoSearchExtras extras)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.tags.getClusterPhotos");
parameters.Add("tag", tag);
parameters.Add("cluster_id", clusterId);
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
return GetResponseCache<PhotoCollection>(parameters);
}
开发者ID:ghostnguyen,项目名称:f503cd14-7a08-48cb-a2b6-d607c618743e,代码行数:17,代码来源:Flickr_Tags.cs
示例2: TagsGetClusterPhotosAsync
/// <summary>
/// Returns the first 24 photos for a given tag cluster.
/// </summary>
/// <param name="tag">The tag whose cluster photos you want to return.</param>
/// <param name="clusterId">The cluster id for the cluster you want to return the photos. This is the first three subtags of the tag cluster appended with hyphens ('-').</param>
/// <param name="extras">Extra information to return with each photo.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void TagsGetClusterPhotosAsync(string tag, string clusterId, PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.tags.getClusterPhotos");
parameters.Add("tag", tag);
parameters.Add("cluster_id", clusterId);
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
GetResponseAsync<PhotoCollection>(parameters, callback);
}
开发者ID:simm0n,项目名称:Synchronizr,代码行数:17,代码来源:Flickr_TagsAsync.cs
示例3: PandaGetPhotosAsync
/// <summary>
/// Gets a list of photos for the given panda.
/// </summary>
/// <param name="pandaName">The name of the panda to return photos for.</param>
/// <param name="extras">The extras to return with the photos.</param>
/// <param name="perPage">The number of photos to return per page.</param>
/// <param name="page">The age to return.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void PandaGetPhotosAsync(string pandaName, PhotoSearchExtras extras, int page, int perPage, Action<FlickrResult<PandaPhotoCollection>> callback)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.panda.getPhotos");
parameters.Add("panda_name", pandaName);
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
GetResponseAsync<PandaPhotoCollection>(parameters, callback);
}
开发者ID:simm0n,项目名称:Synchronizr,代码行数:19,代码来源:Flickr_PandaAsync.cs
示例4: PandaGetPhotos
/// <summary>
/// Gets a list of photos for the given panda.
/// </summary>
/// <param name="pandaName">The name of the panda to return photos for.</param>
/// <param name="extras">The extras to return with the photos.</param>
/// <param name="perPage">The number of photos to return per page.</param>
/// <param name="page">The age to return.</param>
/// <returns>A list of photos for the panda.</returns>
public PandaPhotoCollection PandaGetPhotos(string pandaName, PhotoSearchExtras extras, int page, int perPage)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.panda.getPhotos");
parameters.Add("panda_name", pandaName);
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
return GetResponseCache<PandaPhotoCollection>(parameters);
}
开发者ID:simm0n,项目名称:Synchronizr,代码行数:19,代码来源:Flickr_Panda.cs
示例5: FavoritesGetContext
/// <summary>
/// Get the next and previous favorites in a users list of favorites, based on one of their favorites.
/// </summary>
/// <param name="photoId">The photo id of the photo for which to find the next and previous favorites.</param>
/// <param name="userId">The user id of the users whose favorites you wish to search.</param>
/// <param name="numPrevious">The number of previous favorites to list. Defaults to 1.</param>
/// <param name="numNext">The number of next favorites to list. Defaults to 1.</param>
/// <param name="extras">Any extras to return for each photo in the previous and next list.</param>
/// <returns></returns>
public FavoriteContext FavoritesGetContext(string photoId, string userId, int numPrevious, int numNext, PhotoSearchExtras extras)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.favorites.getContext");
parameters.Add("user_id", userId);
parameters.Add("photo_id", photoId);
parameters.Add("num_prev", Math.Max(1, numPrevious).ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
parameters.Add("num_next", Math.Max(1, numNext).ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
return GetResponseCache<FavoriteContext>(parameters);
}
开发者ID:simm0n,项目名称:Synchronizr,代码行数:21,代码来源:Flickr_Favorites.cs
示例6: FavoritesGetContextAsync
/// <summary>
/// Get the next and previous favorites in a users list of favorites, based on one of their favorites.
/// </summary>
/// <param name="photoId">The photo id of the photo for which to find the next and previous favorites.</param>
/// <param name="userId">The user id of the users whose favorites you wish to search.</param>
/// <param name="numPrevious">The number of previous favorites to list. Defaults to 1.</param>
/// <param name="numNext">The number of next favorites to list. Defaults to 1.</param>
/// <param name="extras">Any extras to return for each photo in the previous and next list.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
/// <returns></returns>
public void FavoritesGetContextAsync(string photoId, string userId, int numPrevious, int numNext, PhotoSearchExtras extras, Action<FlickrResult<FavoriteContext>> callback)
{
var parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.favorites.getContext");
parameters.Add("user_id", userId);
parameters.Add("photo_id", photoId);
parameters.Add("num_prev", Math.Max(1, numPrevious).ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
parameters.Add("num_next", Math.Max(1, numNext).ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
GetResponseAsync<FavoriteContext>(parameters, callback);
}
开发者ID:ericleigh007,项目名称:flickr-net,代码行数:22,代码来源:Flickr_FavoritesAsync.cs
示例7: InterestingnessGetListAsync
/// <summary>
/// Gets a list of photos from the most recent interstingness list.
/// </summary>
/// <param name="date">The date to return the interestingness photos for.</param>
/// <param name="extras">The extra parameters to return along with the search results.
/// See <see cref="PhotoSearchOptions"/> for more details.</param>
/// <param name="perPage">The number of results to return per page.</param>
/// <param name="page">The page of the results to return.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void InterestingnessGetListAsync(DateTime date, PhotoSearchExtras extras, int page, int perPage, Action<FlickrResult<PhotoCollection>> callback)
{
var parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.interestingness.getList");
if (date > DateTime.MinValue) parameters.Add("date", date.ToString("yyyy-MM-dd", System.Globalization.DateTimeFormatInfo.InvariantInfo));
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (extras != PhotoSearchExtras.None)
parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
GetResponseAsync<PhotoCollection>(parameters, callback);
}
开发者ID:ericleigh007,项目名称:flickr-net,代码行数:22,代码来源:Flickr_InterestingnessAsync.cs
示例8: InterestingnessGetList
/// <summary>
/// Gets a list of photos from the most recent interstingness list.
/// </summary>
/// <param name="date">The date to return the interestingness photos for.</param>
/// <param name="extras">The extra parameters to return along with the search results.
/// See <see cref="PhotoSearchOptions"/> for more details.</param>
/// <param name="perPage">The number of results to return per page.</param>
/// <param name="page">The page of the results to return.</param>
/// <returns></returns>
public PhotoCollection InterestingnessGetList(DateTime date, PhotoSearchExtras extras, int page, int perPage)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.interestingness.getList");
if (date > DateTime.MinValue) parameters.Add("date", date.ToString("yyyy-MM-dd", System.Globalization.DateTimeFormatInfo.InvariantInfo));
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (extras != PhotoSearchExtras.None)
parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
return GetResponseCache<PhotoCollection>(parameters);
}
开发者ID:h4ck3rm1k3,项目名称:FlickrNet,代码行数:22,代码来源:Flickr_Interestingness.cs
示例9: ExtrasToString
/// <summary>
/// Utility method to convert the <see cref="PhotoSearchExtras"/> enum to a string.
/// </summary>
/// <example>
/// <code>
/// PhotoSearchExtras extras = PhotoSearchExtras.DateTaken & PhotoSearchExtras.IconServer;
/// string val = Utils.ExtrasToString(extras);
/// Console.WriteLine(val);
/// </code>
/// outputs: "date_taken,icon_server";
/// </example>
/// <param name="extras"></param>
/// <returns></returns>
public static string ExtrasToString(PhotoSearchExtras extras)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
if( (extras & PhotoSearchExtras.DateTaken) == PhotoSearchExtras.DateTaken )
sb.Append("date_taken");
if( (extras & PhotoSearchExtras.DateUploaded) == PhotoSearchExtras.DateUploaded )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("date_upload");
}
if( (extras & PhotoSearchExtras.IconServer) == PhotoSearchExtras.IconServer )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("icon_server");
}
if( (extras & PhotoSearchExtras.License) == PhotoSearchExtras.License )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("license");
}
if( (extras & PhotoSearchExtras.OwnerName) == PhotoSearchExtras.OwnerName )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("owner_name");
}
if( (extras & PhotoSearchExtras.OriginalFormat) == PhotoSearchExtras.OriginalFormat )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("original_format");
}
if( (extras & PhotoSearchExtras.LastUpdated) == PhotoSearchExtras.LastUpdated )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("last_update");
}
if( (extras & PhotoSearchExtras.Tags) == PhotoSearchExtras.Tags )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("tags");
}
if( (extras & PhotoSearchExtras.Geo) == PhotoSearchExtras.Geo )
{
if( sb.Length>0 ) sb.Append(",");
sb.Append("geo");
}
return sb.ToString();
}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:64,代码来源:Utils.cs
示例10: PhotosGetRecentAsync
/// <summary>
/// Returns a list of the latest public photos uploaded to flickr.
/// </summary>
/// <param name="extras">A comma-delimited list of extra information to fetch for each returned record.</param>
/// <param name="page">The page of results to return. If this argument is omitted, it defaults to 1.</param>
/// <param name="perPage">Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void PhotosGetRecentAsync(int page, int perPage, PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.photos.getRecent");
parameters.Add("api_key", apiKey);
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
GetResponseAsync<PhotoCollection>(parameters, callback);
}
开发者ID:h4ck3rm1k3,项目名称:FlickrNet,代码行数:18,代码来源:Flickr_PhotosAsync.cs
示例11: PhotosGetNotInSetAsync
/// <summary>
/// Gets a list of a users photos which are not in a set.
/// </summary>
/// <param name="perPage">Number of photos per page.</param>
/// <param name="page">The page number to return.</param>
/// <param name="extras"><see cref="PhotoSearchExtras"/> enumeration.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void PhotosGetNotInSetAsync(int page, int perPage, PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback)
{
PartialSearchOptions options = new PartialSearchOptions();
options.PerPage = perPage;
options.Page = page;
options.Extras = extras;
PhotosGetNotInSetAsync(options, callback);
}
开发者ID:h4ck3rm1k3,项目名称:FlickrNet,代码行数:16,代码来源:Flickr_PhotosAsync.cs
示例12: PhotosGetContactsPublicPhotosAsync
/// <summary>
/// Gets the public photos for given users ID's contacts.
/// </summary>
/// <param name="userId">The user ID whose contacts you wish to get photos for.</param>
/// <param name="count">The number of photos to return. Defaults to 10, maximum is 50.</param>
/// <param name="justFriends">True to just return photos from friends and family (excluding regular contacts).</param>
/// <param name="singlePhoto">True to return just a single photo for each contact.</param>
/// <param name="includeSelf">True to include photos from the user ID specified as well.</param>
/// <param name="extras">A list of extra details to return for each photo.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void PhotosGetContactsPublicPhotosAsync(string userId, int count, bool justFriends, bool singlePhoto, bool includeSelf, PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.photos.getContactsPublicPhotos");
parameters.Add("api_key", apiKey);
parameters.Add("user_id", userId);
if (count > 0) parameters.Add("count", count.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (justFriends) parameters.Add("just_friends", "1");
if (singlePhoto) parameters.Add("single_photo", "1");
if (includeSelf) parameters.Add("include_self", "1");
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
GetResponseAsync<PhotoCollection>(parameters, callback);
}
开发者ID:h4ck3rm1k3,项目名称:FlickrNet,代码行数:24,代码来源:Flickr_PhotosAsync.cs
示例13: PhotosCommentsGetRecentForContacts
/// <summary>
/// Return the list of photos belonging to your contacts that have been commented on recently.
/// </summary>
/// <param name="dateLastComment">Limits the resultset to photos that have been commented on since this date. The default, and maximum, offset is (1) hour.</param>
/// <param name="extras"></param>
/// <param name="page">The page of results to return. If this argument is omitted, it defaults to 1.</param>
/// <param name="perPage">Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.</param>
/// <returns></returns>
public PhotoCollection PhotosCommentsGetRecentForContacts(DateTime dateLastComment, PhotoSearchExtras extras, int page, int perPage)
{
return PhotosCommentsGetRecentForContacts(dateLastComment, null, extras, page, perPage);
}
开发者ID:simm0n,项目名称:Synchronizr,代码行数:12,代码来源:Flickr_PhotosComments.cs
示例14: PhotosRecentlyUpdatedAsync
/// <summary>
/// Return a list of your photos that have been recently created or which have been recently modified.
/// Recently modified may mean that the photo's metadata (title, description, tags)
/// may have been changed or a comment has been added (or just modified somehow :-)
/// </summary>
/// <param name="minDate">The date from which modifications should be compared.</param>
/// <param name="extras">A list of extra information to fetch for each returned record.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void PhotosRecentlyUpdatedAsync(DateTime minDate, PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback)
{
PhotosRecentlyUpdatedAsync(minDate, extras, 0, 0, callback);
}
开发者ID:h4ck3rm1k3,项目名称:FlickrNet,代码行数:12,代码来源:Flickr_PhotosAsync.cs
示例15: ExtrasToString
/// <summary>
/// Utility method to convert the <see cref="PhotoSearchExtras"/> enum to a string.
/// </summary>
/// <example>
/// <code>
/// PhotoSearchExtras extras = PhotoSearchExtras.DateTaken & PhotoSearchExtras.IconServer;
/// string val = Utils.ExtrasToString(extras);
/// Console.WriteLine(val);
/// </code>
/// outputs: "date_taken,icon_server";
/// </example>
/// <param name="extras"></param>
/// <returns></returns>
public static string ExtrasToString(PhotoSearchExtras extras)
{
List<string> extraList = new List<string>();
if ((extras & PhotoSearchExtras.DateTaken) == PhotoSearchExtras.DateTaken) extraList.Add("date_taken");
if ((extras & PhotoSearchExtras.DateUploaded) == PhotoSearchExtras.DateUploaded) extraList.Add("date_upload");
if ((extras & PhotoSearchExtras.IconServer) == PhotoSearchExtras.IconServer) extraList.Add("icon_server");
if ((extras & PhotoSearchExtras.License) == PhotoSearchExtras.License) extraList.Add("license");
if ((extras & PhotoSearchExtras.OwnerName) == PhotoSearchExtras.OwnerName) extraList.Add("owner_name");
if ((extras & PhotoSearchExtras.OriginalFormat) == PhotoSearchExtras.OriginalFormat) extraList.Add("original_format");
if ((extras & PhotoSearchExtras.LastUpdated) == PhotoSearchExtras.LastUpdated) extraList.Add("last_update");
if ((extras & PhotoSearchExtras.Tags) == PhotoSearchExtras.Tags) extraList.Add("tags");
if ((extras & PhotoSearchExtras.Geo) == PhotoSearchExtras.Geo) extraList.Add("geo");
if ((extras & PhotoSearchExtras.MachineTags) == PhotoSearchExtras.MachineTags) extraList.Add("machine_tags");
if ((extras & PhotoSearchExtras.OriginalDimensions) == PhotoSearchExtras.OriginalDimensions) extraList.Add("o_dims");
if ((extras & PhotoSearchExtras.Views) == PhotoSearchExtras.Views) extraList.Add("views");
if ((extras & PhotoSearchExtras.Media) == PhotoSearchExtras.Media) extraList.Add("media");
if ((extras & PhotoSearchExtras.PathAlias) == PhotoSearchExtras.PathAlias) extraList.Add("path_alias");
if ((extras & PhotoSearchExtras.SquareUrl) == PhotoSearchExtras.SquareUrl) extraList.Add("url_sq");
if ((extras & PhotoSearchExtras.ThumbnailUrl) == PhotoSearchExtras.ThumbnailUrl) extraList.Add("url_t");
if ((extras & PhotoSearchExtras.SmallUrl) == PhotoSearchExtras.SmallUrl) extraList.Add("url_s");
if ((extras & PhotoSearchExtras.MediumUrl) == PhotoSearchExtras.MediumUrl) extraList.Add("url_m");
if ((extras & PhotoSearchExtras.Medium640Url) == PhotoSearchExtras.Medium640Url) extraList.Add("url_z");
if ((extras & PhotoSearchExtras.LargeSquareUrl) == PhotoSearchExtras.LargeSquareUrl) extraList.Add("url_q");
if ((extras & PhotoSearchExtras.Small320Url) == PhotoSearchExtras.Small320Url) extraList.Add("url_n");
if ((extras & PhotoSearchExtras.LargeUrl) == PhotoSearchExtras.LargeUrl) extraList.Add("url_l");
if ((extras & PhotoSearchExtras.OriginalUrl) == PhotoSearchExtras.OriginalUrl) extraList.Add("url_o");
if ((extras & PhotoSearchExtras.Description) == PhotoSearchExtras.Description) extraList.Add("description");
if ((extras & PhotoSearchExtras.Usage) == PhotoSearchExtras.Usage) extraList.Add("usage");
if ((extras & PhotoSearchExtras.Visibility) == PhotoSearchExtras.Visibility) extraList.Add("visibility");
if ((extras & PhotoSearchExtras.Rotation) == PhotoSearchExtras.Rotation) extraList.Add("rotation");
return String.Join(",", extraList.ToArray());
}
开发者ID:simm0n,项目名称:Synchronizr,代码行数:47,代码来源:UtilityMethods.cs
示例16: PhotosCommentsGetRecentForContactsAsync
/// <summary>
/// Return the list of photos belonging to your contacts that have been commented on recently.
/// </summary>
/// <param name="dateLastComment">Limits the resultset to photos that have been commented on since this date. The default, and maximum, offset is (1) hour.</param>
/// <param name="contactsFilter">A list of contact NSIDs to limit the scope of the query to.</param>
/// <param name="extras"></param>
/// <param name="page">The page of results to return. If this argument is omitted, it defaults to 1.</param>
/// <param name="perPage">Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void PhotosCommentsGetRecentForContactsAsync(DateTime dateLastComment, string[] contactsFilter, PhotoSearchExtras extras, int page, int perPage, Action<FlickrResult<PhotoCollection>> callback)
{
CheckRequiresAuthentication();
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.photos.comments.getRecentForContacts");
if (dateLastComment != DateTime.MinValue) parameters.Add("date_lastcomment", UtilityMethods.DateToUnixTimestamp(dateLastComment));
if (contactsFilter != null && contactsFilter.Length > 0) parameters.Add("contacts_filter", String.Join(",", contactsFilter));
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
GetResponseAsync<PhotoCollection>(parameters, callback);
}
开发者ID:simm0n,项目名称:Synchronizr,代码行数:23,代码来源:Flickr_PhotosCommentsAsync.cs
示例17: GroupsPoolsGetPhotosAsync
/// <summary>
/// Gets a list of photos for a given group.
/// </summary>
/// <param name="groupId">The group ID for the group.</param>
/// <param name="tags">Space seperated list of tags that photos returned must have.
/// Currently only supports 1 tag at a time.</param>
/// <param name="userId">The group member to return photos for.</param>
/// <param name="extras">The <see cref="PhotoSearchExtras"/> specifying which extras to return. All other overloads default to returning all extras.</param>
/// <param name="perPage">The number of photos per page.</param>
/// <param name="page">The page to return.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void GroupsPoolsGetPhotosAsync(string groupId, string tags, string userId, PhotoSearchExtras extras, int page, int perPage, Action<FlickrResult<PhotoCollection>> callback)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.groups.pools.getPhotos");
parameters.Add("group_id", groupId);
if (tags != null && tags.Length > 0) parameters.Add("tags", tags);
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (userId != null && userId.Length > 0) parameters.Add("user_id", userId);
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
GetResponseAsync<PhotoCollection>(parameters, callback);
}
开发者ID:dimspace,项目名称:crackhead,代码行数:24,代码来源:Flickr_GroupsAsync.cs
示例18: PhotosGetUntaggedAsync
/// <summary>
/// Returns a list of your photos with no tags.
/// </summary>
/// <param name="extras">A comma-delimited list of extra information to fetch for each returned record.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
public void PhotosGetUntaggedAsync(PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback)
{
PhotosGetUntaggedAsync(0, 0, extras, callback);
}
开发者ID:h4ck3rm1k3,项目名称:FlickrNet,代码行数:9,代码来源:Flickr_PhotosAsync.cs
示例19: PhotosetsGetPhotos
/// <summary>
/// Gets a collection of photos for a photoset.
/// </summary>
/// <param name="photosetId">The ID of the photoset to return photos for.</param>
/// <param name="extras">The extras to return for each photo.</param>
/// <param name="privacyFilter">The privacy filter to search on.</param>
/// <param name="page">The page to return, defaults to 1.</param>
/// <param name="perPage">The number of photos to return per page.</param>
/// <param name="media">Filter on the type of media.</param>
/// <returns>An array of <see cref="Photo"/> instances.</returns>
public PhotosetPhotoCollection PhotosetsGetPhotos(string photosetId, PhotoSearchExtras extras, PrivacyFilter privacyFilter, int page, int perPage, MediaType media)
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.photosets.getPhotos");
parameters.Add("photoset_id", photosetId);
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
if (privacyFilter != PrivacyFilter.None) parameters.Add("privacy_filter", privacyFilter.ToString("d"));
if (page > 0) parameters.Add("page", page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (perPage > 0) parameters.Add("per_page", perPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (media != MediaType.None) parameters.Add("media", (media == MediaType.All ? "all" : (media == MediaType.Photos ? "photos" : (media == MediaType.Videos ? "videos" : String.Empty))));
return GetResponseCache<PhotosetPhotoCollection>(parameters);
}
开发者ID:dimspace,项目名称:crackhead,代码行数:23,代码来源:Flickr_Photosets.cs
示例20: PhotosGetContactsPhotosAsync
/// <summary>
/// Gets your contacts most recent photos.
/// </summary>
/// <param name="count">The number of photos to return, from between 10 and 50.</param>
/// <param name="justFriends">If true only returns photos from contacts marked as
/// 'friends'.</param>
/// <param name="singlePhoto">If true only returns a single photo for each of your contacts.
/// Ignores the count if this is true.</param>
/// <param name="includeSelf">If true includes yourself in the group of people to
/// return photos for.</param>
/// <param name="extras">Optional extras that can be returned by this call.</param>
/// <param name="callback">Callback method to call upon return of the response from Flickr.</param>
/// <exception cref="ArgumentOutOfRangeException">
/// Throws a <see cref="ArgumentOutOfRangeException"/> exception if the cound
/// is not between 10 and 50, or 0.</exception>
public void PhotosGetContactsPhotosAsync(int count, bool justFriends, bool singlePhoto, bool includeSelf, PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback)
{
CheckRequiresAuthentication();
if (count != 0 && (count < 10 || count > 50) && !singlePhoto)
{
throw new ArgumentOutOfRangeException("count", String.Format(System.Globalization.CultureInfo.InvariantCulture, "Count must be between 10 and 50. ({0})", count));
}
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("method", "flickr.photos.getContactsPhotos");
if (count > 0 && !singlePhoto) parameters.Add("count", count.ToString(System.Globalization.NumberFormatInfo.InvariantInfo));
if (justFriends) parameters.Add("just_friends", "1");
if (singlePhoto) parameters.Add("single_photo", "1");
if (includeSelf) parameters.Add("include_self", "1");
if (extras != PhotoSearchExtras.None) parameters.Add("extras", UtilityMethods.ExtrasToString(extras));
GetResponseAsync<PhotoCollection>(parameters, callback);
}
开发者ID:h4ck3rm1k3,项目名称:FlickrNet,代码行数:33,代码来源:Flickr_PhotosAsync.cs
注:本文中的PhotoSearchExtras类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论