/// <summary> /// https://api.foursquare.com/v2/users/USER_ID/friends /// Returns an array of a user's friends. /// </summary> public async Task <List <User> > GetUserFriends(string userId, Dictionary <string, string> parameters) { FourSquareEntityItems <User> friends = (await GetSingle <FourSquareEntityItems <User> >("/users/" + userId + "/friends", parameters)).response["friends"]; return(friends.items); }
// TODO /* * public List<Badge> GetBadges(string userId) * { * return GetMultiple<Badge>("/users/" + userId + "/badges").response["badges"]; * } */ /// <summary> /// https://api.foursquare.com/v2/users/USER_ID/checkins /// Returns a history of checkins for the authenticated user. /// </summary> public async Task <List <Checkin> > GetUserCheckins(string userId, Dictionary <string, string> parameters = null) { FourSquareEntityItems <Checkin> checkins = (await GetSingle <FourSquareEntityItems <Checkin> >("/users/" + userId + "/checkins", parameters)).response["checkins"]; return(checkins.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/VENUE_ID/tips /// Returns tips for a venue. /// </summary> public async Task <List <Tip> > GetVenueTips(string venueId, Dictionary <string, string> parameters = null) { FourSquareEntityItems <Tip> tips = (await this.GetSingle <FourSquareEntityItems <Tip> >("/venues/" + venueId + "/tips", parameters, true)).response["tips"]; return(tips.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/VENUE_ID/photos /// Returns photos for a venue. /// </summary> public async Task <List <Photo> > GetVenuePhotos(string venueId, Dictionary <string, string> parameters) { FourSquareEntityItems <Photo> photos = (await this.GetSingle <FourSquareEntityItems <Photo> >("/venues/" + venueId + "/photos", parameters, true)).response["photos"]; return(photos.items); }
/*/// <summary> * /// https://api.foursquare.com/v2/users/USER_ID/todos * /// Returns todos from a user. * /// </summary> * public List<Todo> GetUserTodos(string userId) * { * return GetUserTodos(userId, null); * } * * public List<Todo> GetUserTodos(string userId, Dictionary<string, string> parameters) * { * FourSquareEntityItems<Todo> todos = GetSingle<FourSquareEntityItems<Todo>>("/users/" + userId + "/todos", parameters).response["todos"]; * * return todos.items; * }*/ /// <summary> /// https://api.foursquare.com/v2/users/USER_ID/venuehistory /// Returns a list of all venues visited by the specified user, along with how many visits and when they were last /// there. /// This is an experimental API. We're excited about the innovation we think it enables as a much more efficient /// version of fetching all of a user's checkins, but we're also still learning if this right approach. Please give it /// a shot and provide feedback on the mailing list. Note that although the venuehistory endpoint currently returns all /// of the user's data, we expect to return only the last 6 months, requiring callers to page backwards as needed. We /// may also remove the lastHereAt value. Additionally, for anomalous users, we'll cap out at 500 unique venues. /// </summary> public async Task <List <VenueHistory> > GetUserVenueHistory(Dictionary <string, string> parameters = null) { FourSquareEntityItems <VenueHistory> venues = (await this.GetSingle <FourSquareEntityItems <VenueHistory> >("/users/self/venuehistory")).response["venues"]; return(venues.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/VENUE_ID/herenow /// Provides a count of how many people are at a given venue, plus the first page of the users there, friends-first, /// and if the current user is authenticated. /// This is an experimental API. We're excited about the innovation we think it enables as a much more efficient /// version of fetching all data about a venue, but we're also still learning if this right approach. Please give it a /// shot and provide feedback on the mailing list. /// </summary> public async Task <List <Checkin> > GetVenueHereNow(string venueId, Dictionary <string, string> parameters = null) { FourSquareEntityItems <Checkin> checkins = (await this.GetSingle <FourSquareEntityItems <Checkin> >("/venues/" + venueId + "/herenow", parameters, true)).response["hereNow"]; return(checkins.items); }
public async Task <List <Special> > SearchSpecials(Dictionary <string, string> parameters) { var result = await GetSingle <FourSquareEntityItems <Special> >("/specials/search", parameters); FourSquareEntityItems <Special> specials = result.response["specials"]; return(specials.items); }
public async Task <List <Link> > GetVenueLinks(string venueId) { var result = await GetSingle <FourSquareEntityItems <Link> >("/venues/" + venueId + "/links", true); FourSquareEntityItems <Link> links = result.response["links"]; return(links.items); }
public async Task <List <VenueHistory> > GetUserVenueHistory(Dictionary <string, string> parameters) { var result = await GetSingle <FourSquareEntityItems <VenueHistory> >("/users/self/venuehistory"); FourSquareEntityItems <VenueHistory> venues = result.response["venues"]; return(venues.items); }
/// <summary> /// https://api.foursquare.com/v2/specials/search /// Returns a list of specials near the current location. /// This is an experimental API. We'd love your feedback as we solidify it over the next few weeks. /// </summary> public List <Special> SearchSpecials(Dictionary <string, string> parameters) { FourSquareEntityItems <Special> specials = GetSingle <FourSquareEntityItems <Special> >("/specials/search", parameters).response["specials"]; return(specials.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/VENUE_ID/links /// Returns URLs or identifiers from third parties that have been applied to this venue, such as how the New York Times refers to this venue and a URL for additional information from nytimes.com. This is part of the foursquare Venue Map. /// This is an experimental endpoint and very much subject to change. Please provide us feedback in the forum. /// </summary> public List <Link> GetVenueLinks(string venueId) { FourSquareEntityItems <Link> links = GetSingle <FourSquareEntityItems <Link> >("/venues/" + venueId + "/links", true).response["links"]; return(links.items); }
public List <Tip> GetVenueTips(string venueId, Dictionary <string, string> parameters) { FourSquareEntityItems <Tip> tips = GetSingle <FourSquareEntityItems <Tip> >("/venues/" + venueId + "/tips", parameters, true).response["tips"]; return(tips.items); }
public List <Checkin> GetVenueHereNow(string venueId, Dictionary <string, string> parameters) { FourSquareEntityItems <Checkin> checkins = GetSingle <FourSquareEntityItems <Checkin> >("/venues/" + venueId + "/herenow", parameters, true).response["hereNow"]; return(checkins.items); }
public List <VenueHistory> GetUserVenueHistory(Dictionary <string, string> parameters) { FourSquareEntityItems <VenueHistory> venues = GetSingle <FourSquareEntityItems <VenueHistory> >("/users/self/venuehistory").response["venues"]; return(venues.items); }
public List <Tip> GetUserTips(string userId, Dictionary <string, string> parameters) { FourSquareEntityItems <Tip> tips = GetSingle <FourSquareEntityItems <Tip> >("/users/" + userId + "/tips", parameters).response["tips"]; return(tips.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/search /// Returns a list of venues near the current location, optionally matching the search term. /// To ensure the best possible results, pay attention to the intent parameter below. And if you're looking for "top" venues or recommended venues, use the explore endpoint instead. /// If lat and long is provided, each venue includes a distance. If authenticated, the method will return venue metadata related to you and your friends. If you do not authenticate, you will not get this data. /// Note that most of the fields returned inside venue can be optional. The user may create a venue that has no address, city or state (the venue is created instead at the geolat/geolong specified). Your client should handle these conditions safely. /// You'll also notice a stats block that reveals some count data about the venue. herenow shows the number of people currently there (this value can be 0). /// This endpoint is part of the venues API (https://developer.foursquare.com/overview/venues.html). /// </summary> public List <Venue> SearchVenues(Dictionary <string, string> parameters) { FourSquareEntityItems <Venue> venues = GetSingle <FourSquareEntityItems <Venue> >("/venues/search", parameters, true).response["groups"]; return(venues.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/managed /// Get a list of venues the current user manages. /// </summary> public List <Venue> GetManagedVenues(Dictionary <string, string> parameters) { FourSquareEntityItems <Venue> venues = GetSingle <FourSquareEntityItems <Venue> >("/venues/managed", parameters, false).response["venues"]; return(venues.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/VENUE_ID/photos /// Returns photos for a venue. /// </summary> public List <Photo> GetVenuePhotos(string venueId, Dictionary <string, string> parameters) { FourSquareEntityItems <Photo> photos = GetSingle <FourSquareEntityItems <Photo> >("/venues/" + venueId + "/photos", parameters).response["photos"]; return(photos.items); }
/// <summary> /// https://api.foursquare.com/v2/venues/VENUE_ID/links /// Returns URLs or identifiers from third parties that have been applied to this venue, such as how the New York Times /// refers to this venue and a URL for additional information from nytimes.com. This is part of the foursquare Venue /// Map. /// This is an experimental endpoint and very much subject to change. Please provide us feedback in the forum. /// </summary> public async Task <List <Link> > GetVenueLinks(string venueId) { FourSquareEntityItems <Link> links = (await this.GetSingle <FourSquareEntityItems <Link> >("/venues/" + venueId + "/links", unauthenticated: true)).response["links"]; return(links.items); }
/// <summary> /// https://api.foursquare.com/v2/users/USER_ID/tips /// Returns tips from a user. /// </summary> public async Task <List <Tip> > GetUserTips(string userId, Dictionary <string, string> parameters = null) { FourSquareEntityItems <Tip> tips = (await GetSingle <FourSquareEntityItems <Tip> >("/users/" + userId + "/tips", parameters)).response["tips"]; return(tips.items); }