/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <param name="options">The options to filter/sort the results by.</param> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public void PhotosGetWithGeoDataAsync(PartialSearchOptions options, Action <FlickrResult <PhotoCollection> > callback) { var parameters = new Dictionary <string, string>(); parameters.Add("method", "flickr.photos.getWithGeoData"); UtilityMethods.PartialOptionsIntoArray(options, parameters); GetResponseAsync <PhotoCollection>(parameters, callback); }
/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <param name="options">The options to filter/sort the results by.</param> /// <returns>A list of photos that contain Location information.</returns> public PhotoCollection PhotosGetWithGeoData(PartialSearchOptions options) { Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("method", "flickr.photos.getWithGeoData"); UtilityMethods.PartialOptionsIntoArray(options, parameters); return(GetResponseCache <PhotoCollection>(parameters)); }
/// <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="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>A <see cref="PhotoCollection"/> class containing the list of photos.</returns> public PhotoCollection PhotosGetUntagged(int page, int perPage, PhotoSearchExtras extras) { var o = new PartialSearchOptions(); o.Page = page; o.PerPage = perPage; o.Extras = extras; return(PhotosGetUntagged(o)); }
/// <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> /// <returns><see cref="PhotoCollection"/> instance containing list of photos.</returns> public PhotoCollection PhotosGetNotInSet(int page, int perPage, PhotoSearchExtras extras) { var options = new PartialSearchOptions(); options.PerPage = perPage; options.Page = page; options.Extras = extras; return(PhotosGetNotInSet(options)); }
/// <summary> /// Gets a list of the authenticated users photos which are not in a set. /// </summary> /// <param name="options">A selection of options to filter/sort by.</param> /// <returns>A collection of photos in the <see cref="PhotoCollection"/> class.</returns> public PhotoCollection PhotosGetNotInSet(PartialSearchOptions options) { CheckRequiresAuthentication(); var parameters = new Dictionary <string, string>(); parameters.Add("method", "flickr.photos.getNotInSet"); UtilityMethods.PartialOptionsIntoArray(options, parameters); return(GetResponseCache <PhotoCollection>(parameters)); }
/// <summary> /// Adds the partial options to the passed in <see cref="Hashtable"/>. /// </summary> /// <param name="options">The options to convert to an array.</param> /// <param name="parameters">The <see cref="Hashtable"/> to add the option key value pairs to.</param> public static void PartialOptionsIntoArray(PartialSearchOptions options, Dictionary <string, string> parameters) { if (options == null) { throw new ArgumentNullException("options"); } if (parameters == null) { throw new ArgumentNullException("parameters"); } if (options.MinUploadDate != DateTime.MinValue) { parameters.Add("min_uploaded_date", UtilityMethods.DateToUnixTimestamp(options.MinUploadDate).ToString()); } if (options.MaxUploadDate != DateTime.MinValue) { parameters.Add("max_uploaded_date", UtilityMethods.DateToUnixTimestamp(options.MaxUploadDate).ToString()); } if (options.MinTakenDate != DateTime.MinValue) { parameters.Add("min_taken_date", DateToMySql(options.MinTakenDate)); } if (options.MaxTakenDate != DateTime.MinValue) { parameters.Add("max_taken_date", DateToMySql(options.MaxTakenDate)); } if (options.Extras != PhotoSearchExtras.None) { parameters.Add("extras", options.ExtrasString); } if (options.SortOrder != PhotoSearchSortOrder.None) { parameters.Add("sort", options.SortOrderString); } if (options.PerPage > 0) { parameters.Add("per_page", options.PerPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); } if (options.Page > 0) { parameters.Add("page", options.Page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); } if (options.PrivacyFilter != PrivacyFilter.None) { parameters.Add("privacy_filter", options.PrivacyFilter.ToString("d")); } }
internal static void PartialOptionsIntoArray(PartialSearchOptions options, Hashtable parameters) { if (options.MinUploadDate != DateTime.MinValue) { parameters.Add("min_uploaded_date", Utils.DateToUnixTimestamp(options.MinUploadDate).ToString()); } if (options.MaxUploadDate != DateTime.MinValue) { parameters.Add("max_uploaded_date", Utils.DateToUnixTimestamp(options.MaxUploadDate).ToString()); } if (options.MinTakenDate != DateTime.MinValue) { parameters.Add("min_taken_date", options.MinTakenDate.ToString("yyyy-MM-dd HH:mm:ss")); } if (options.MaxTakenDate != DateTime.MinValue) { parameters.Add("max_taken_date", options.MaxTakenDate.ToString("yyyy-MM-dd HH:mm:ss")); } if (options.Extras != PhotoSearchExtras.None) { parameters.Add("extras", options.ExtrasString); } if (options.SortOrder != PhotoSearchSortOrder.None) { parameters.Add("sort", options.SortOrderString); } if (options.PerPage > 0) { parameters.Add("per_page", options.PerPage.ToString()); } if (options.Page > 0) { parameters.Add("page", options.Page.ToString()); } if (options.PrivacyFilter != PrivacyFilter.None) { parameters.Add("privacy_filter", options.PrivacyFilter.ToString("d")); } }
/// <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 async Task<FlickrResult<PhotoCollection>> PhotosGetNotInSetAsync(int page, int perPage, PhotoSearchExtras extras) { PartialSearchOptions options = new PartialSearchOptions(); options.PerPage = perPage; options.Page = page; options.Extras = extras; return await PhotosGetNotInSetAsync(options); }
internal static void PartialOptionsIntoArray(PartialSearchOptions options, Hashtable parameters) { if( options.MinUploadDate != DateTime.MinValue ) parameters.Add("min_uploaded_date", Utils.DateToUnixTimestamp(options.MinUploadDate).ToString()); if( options.MaxUploadDate != DateTime.MinValue ) parameters.Add("max_uploaded_date", Utils.DateToUnixTimestamp(options.MaxUploadDate).ToString()); if( options.MinTakenDate != DateTime.MinValue ) parameters.Add("min_taken_date", options.MinTakenDate.ToString("yyyy-MM-dd HH:mm:ss")); if( options.MaxTakenDate != DateTime.MinValue ) parameters.Add("max_taken_date", options.MaxTakenDate.ToString("yyyy-MM-dd HH:mm:ss")); if( options.Extras != PhotoSearchExtras.None ) parameters.Add("extras", options.ExtrasString); if( options.SortOrder != PhotoSearchSortOrder.None ) parameters.Add("sort", options.SortOrderString); if( options.PerPage > 0 ) parameters.Add("per_page", options.PerPage.ToString()); if( options.Page > 0 ) parameters.Add("page", options.Page.ToString()); if( options.PrivacyFilter != PrivacyFilter.None ) parameters.Add("privacy_filter", options.PrivacyFilter.ToString("d")); }
public PhotoCollection PhotosGetUntagged(PartialSearchOptions options);
public PhotoCollection PhotosGetWithGeoData(PhotoSearchOptions options) { PartialSearchOptions newOptions = new PartialSearchOptions(options); return(PhotosGetWithGeoData(newOptions)); }
public PhotoCollection PhotosGetNotInSet(PartialSearchOptions options);
/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public async Task<FlickrResult<PhotoCollection>> PhotosGetWithGeoDataAsync() { PartialSearchOptions options = new PartialSearchOptions(); return await PhotosGetWithGeoDataAsync(options); }
/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public async Task <FlickrResult <PhotoCollection> > PhotosGetWithGeoDataAsync() { PartialSearchOptions options = new PartialSearchOptions(); return(await PhotosGetWithGeoDataAsync(options)); }
public PhotoCollection PhotosGetWithoutGeoData(PhotoSearchOptions options) { var newOptions = new PartialSearchOptions(options); return PhotosGetWithoutGeoData(newOptions); }
public PhotoCollection PhotosGetWithoutGeoData(PartialSearchOptions options) { var dictionary = new Dictionary<string, string>(); dictionary.Add("method", "flickr.photos.getWithoutGeoData"); UtilityMethods.PartialOptionsIntoArray(options, dictionary); return GetResponse<PhotoCollection>(dictionary); }
/// <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> /// <returns><see cref="Photos"/> instance containing list of photos.</returns> public Photos PhotosGetNotInSet(int perPage, int page, PhotoSearchExtras extras) { PartialSearchOptions options = new PartialSearchOptions(); options.PerPage = perPage; options.Page = page; options.Extras = extras; return PhotosGetNotInSet(options); }
/// <summary> /// Returns a list of your photos with no tags. /// </summary> /// <param name="options">The <see cref="PartialSearchOptions"/> containing the list of options supported by this method.</param> /// <returns>A <see cref="PhotoCollection"/> class containing the list of photos.</returns> public PhotoCollection PhotosGetUntagged(PartialSearchOptions options) { CheckRequiresAuthentication(); Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("method", "flickr.photos.getUntagged"); UtilityMethods.PartialOptionsIntoArray(options, parameters); return GetResponseCache<PhotoCollection>(parameters); }
/// <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="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>A <see cref="PhotoCollection"/> class containing the list of photos.</returns> public PhotoCollection PhotosGetUntagged(int page, int perPage, PhotoSearchExtras extras) { PartialSearchOptions o = new PartialSearchOptions(); o.Page = page; o.PerPage = perPage; o.Extras = extras; return PhotosGetUntagged(o); }
/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <param name="options">The options to filter/sort the results by.</param> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public async Task<FlickrResult<PhotoCollection>> PhotosGetWithGeoDataAsync(PartialSearchOptions options) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("method", "flickr.photos.getWithGeoData"); UtilityMethods.PartialOptionsIntoArray(options, parameters); return await GetResponseAsync<PhotoCollection>(parameters); }
/// <summary> /// Gets a list of photos that do not contain geo location information. /// </summary> /// <returns>A list of photos that do not contain location information.</returns> public PhotoCollection PhotosGetWithoutGeoData() { var options = new PartialSearchOptions(); return PhotosGetWithoutGeoData(options); }
/// <summary> /// Gets a list of photos that do not contain geo location information. /// </summary> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public void PhotosGetWithoutGeoDataAsync(Action<FlickrResult<PhotoCollection>> callback) { PartialSearchOptions options = new PartialSearchOptions(); PhotosGetWithoutGeoDataAsync(options, callback); }
/// <summary> /// Gets a list of photos that do not contain geo location information. /// </summary> /// <param name="options">A limited set of options are supported.</param> /// <returns>A list of photos that do not contain location information.</returns> public PhotoCollection PhotosGetWithoutGeoData(PartialSearchOptions options) { var parameters = new Dictionary<string, string>(); parameters.Add("method", "flickr.photos.getWithoutGeoData"); UtilityMethods.PartialOptionsIntoArray(options, parameters); return GetResponseCache<PhotoCollection>(parameters); }
/// <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="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 PhotosGetUntaggedAsync(int page, int perPage, PhotoSearchExtras extras, Action<FlickrResult<PhotoCollection>> callback) { PartialSearchOptions o = new PartialSearchOptions(); o.Page = page; o.PerPage = perPage; o.Extras = extras; PhotosGetUntaggedAsync(o, callback); }
/// <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="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 async Task<FlickrResult<PhotoCollection>> PhotosGetUntaggedAsync(int page, int perPage, PhotoSearchExtras extras) { PartialSearchOptions o = new PartialSearchOptions(); o.Page = page; o.PerPage = perPage; o.Extras = extras; return await PhotosGetUntaggedAsync(o); }
/// <summary> /// Adds the partial options to the passed in <see cref="Hashtable"/>. /// </summary> /// <param name="options">The options to convert to an array.</param> /// <param name="parameters">The <see cref="Hashtable"/> to add the option key value pairs to.</param> public static void PartialOptionsIntoArray(PartialSearchOptions options, Dictionary<string, string> parameters) { if (options.MinUploadDate != DateTime.MinValue) parameters.Add("min_uploaded_date", UtilityMethods.DateToUnixTimestamp(options.MinUploadDate).ToString()); if (options.MaxUploadDate != DateTime.MinValue) parameters.Add("max_uploaded_date", UtilityMethods.DateToUnixTimestamp(options.MaxUploadDate).ToString()); if (options.MinTakenDate != DateTime.MinValue) parameters.Add("min_taken_date", DateToMySql(options.MinTakenDate)); if (options.MaxTakenDate != DateTime.MinValue) parameters.Add("max_taken_date", DateToMySql(options.MaxTakenDate)); if (options.Extras != PhotoSearchExtras.None) parameters.Add("extras", options.ExtrasString); if (options.SortOrder != PhotoSearchSortOrder.None) parameters.Add("sort", options.SortOrderString); if (options.PerPage > 0) parameters.Add("per_page", options.PerPage.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); if (options.Page > 0) parameters.Add("page", options.Page.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)); if (options.PrivacyFilter != PrivacyFilter.None) parameters.Add("privacy_filter", options.PrivacyFilter.ToString("d")); }
/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <returns>A list of photos that contain Location information.</returns> public Photos PhotosGetWithGeoData() { PartialSearchOptions options = new PartialSearchOptions(); return PhotosGetWithGeoData(options); }
/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <param name="options">The options to filter/sort the results by.</param> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public async Task <FlickrResult <PhotoCollection> > PhotosGetWithGeoDataAsync(PartialSearchOptions options) { Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("method", "flickr.photos.getWithGeoData"); UtilityMethods.PartialOptionsIntoArray(options, parameters); return(await GetResponseAsync <PhotoCollection>(parameters)); }
/// <summary> /// Gets a list of photos that contain geo location information. /// </summary> /// <remarks> /// Note, this method doesn't actually return the location information with the photos, /// unless you specify the <see cref="PhotoSearchExtras.Geo"/> option in the <c>extras</c> parameter. /// </remarks> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public void PhotosGetWithGeoDataAsync(Action <FlickrResult <PhotoCollection> > callback) { var options = new PartialSearchOptions(); PhotosGetWithGeoDataAsync(options, callback); }
/// <summary> /// Gets a list of photos that do not contain geo location information. /// </summary> /// <param name="options">A limited set of options are supported.</param> /// <returns>A list of photos that do not contain location information.</returns> public Photos PhotosGetWithoutGeoData(PartialSearchOptions options) { Hashtable parameters = new Hashtable(); parameters.Add("method", "flickr.photos.getWithoutGeoData"); Utils.PartialOptionsIntoArray(options, parameters); FlickrNet.Response response = GetResponseCache(parameters); if( response.Status == ResponseStatus.OK ) { return response.Photos; } else { throw new FlickrException(response.Error); } }
/// <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); }
public Photos PhotosGetWithoutGeoData(PhotoSearchOptions options) { PartialSearchOptions newOptions = new PartialSearchOptions(options); return PhotosGetWithoutGeoData(newOptions); }
/// <summary> /// Returns a list of your photos with no tags. /// </summary> /// <param name="options">The <see cref="PartialSearchOptions"/> containing the list of options supported by this method.</param> /// <param name="callback">Callback method to call upon return of the response from Flickr.</param> public void PhotosGetUntaggedAsync(PartialSearchOptions options, Action<FlickrResult<PhotoCollection>> callback) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("method", "flickr.photos.getUntagged"); UtilityMethods.PartialOptionsIntoArray(options, parameters); GetResponseAsync<PhotoCollection>(parameters, callback); }
public static void PartialOptionsIntoArray(PartialSearchOptions options, Dictionary<string, string> parameters) { if (options == null) throw new ArgumentNullException("options"); if (parameters == null) throw new ArgumentNullException("parameters"); if (options.MinUploadDate != DateTime.MinValue) parameters.Add("min_uploaded_date", ((object) UtilityMethods.DateToUnixTimestamp(options.MinUploadDate)).ToString()); if (options.MaxUploadDate != DateTime.MinValue) parameters.Add("max_uploaded_date", ((object) UtilityMethods.DateToUnixTimestamp(options.MaxUploadDate)).ToString()); if (options.MinTakenDate != DateTime.MinValue) parameters.Add("min_taken_date", UtilityMethods.DateToMySql(options.MinTakenDate)); if (options.MaxTakenDate != DateTime.MinValue) parameters.Add("max_taken_date", UtilityMethods.DateToMySql(options.MaxTakenDate)); if (options.Extras != PhotoSearchExtras.None) parameters.Add("extras", options.ExtrasString); if (options.SortOrder != PhotoSearchSortOrder.None) parameters.Add("sort", options.SortOrderString); if (options.PerPage > 0) parameters.Add("per_page", options.PerPage.ToString((IFormatProvider) NumberFormatInfo.InvariantInfo)); if (options.Page > 0) parameters.Add("page", options.Page.ToString((IFormatProvider) NumberFormatInfo.InvariantInfo)); if (options.PrivacyFilter == PrivacyFilter.None) return; parameters.Add("privacy_filter", options.PrivacyFilter.ToString("d")); }
/// <summary> /// Gets a list of photos that do not contain geo location information. /// </summary> /// <returns>A list of photos that do not contain location information.</returns> public PhotoCollection PhotosGetWithoutGeoData() { PartialSearchOptions options = new PartialSearchOptions(); return(PhotosGetWithoutGeoData(options)); }
public PhotoCollection PhotosGetWithGeoData(PartialSearchOptions options);