/// <summary> /// Search for media in a given area. The default time span is set to 5 days. The time span must not /// exceed 7 days. Defaults time stamps cover the last 5 days. Can return mix of image and video types. /// </summary> /// <param name="options">The search options.</param> public string Search(InstagramLocationSearchOptions options) { // Declare the query string NameValueCollection qs = new NameValueCollection { {"access_token", Client.AccessToken}, {"lat", options.Latitude.ToString(CultureInfo.InvariantCulture)}, {"lng", options.Longitude.ToString(CultureInfo.InvariantCulture)} }; // Optinal options if (options.Distance > 0) qs.Add("distance", options.Distance + ""); if (options.MinTimestamp > 0) qs.Add("min_timestamp", options.MinTimestamp + ""); if (options.MaxTimestamp > 0) qs.Add("max_timestamp", options.MaxTimestamp + ""); // Perform the call to the API return SocialUtils.DoHttpGetRequestAndGetBodyAsString("https://api.instagram.com/v1/media/search", qs); }
/// <summary> /// Search for media in a given area. The default time span is set to 5 days. The time span must not /// exceed 7 days. Defaults time stamps cover the last 5 days. Can return mix of image and video types. /// </summary> /// <param name="options">The search options.</param> public InstagramRecentMediaResponse Search(InstagramLocationSearchOptions options) { return InstagramRecentMediaResponse.ParseJson(Raw.Search(options)); }