Foursquare .NET Client that you will fall in love with ❤️ This library supports .NET Standard 2.0.
BonVoyage Foursquare .NET Client is available on NuGet and can be integrated into your project through the usual ways.
One of the great things about BonVoyage is its semantic API. Each resource you get a handle of (e.g. Category, Venue) will expose its aspects (e.g. Photos) and actions (e.g. Like, Dislike). You can have a glimpse of the API below.
The simple usage of the API for userless access:
var userlessSettings = new UserlessAccessSettings("CLIENT-ID", "CLIENT-SECRET");
using (var bonVoyageContext = new BonVoyageContext())
using (var foursquareContext = bonVoyageContext.CreateUserlessFoursquareContext(userlessSettings))
{
// Get and itirate over top level categories
var categories = await foursquareContext.Categories.Get();
foreach (var venueCategory in categories)
{
Console.WriteLine("{0}: {1}", venueCategory.Id, venueCategory.Name);
// Let's now get venues in San Fransisco for each category
var venues = await venueCategory.SearchVenues("San Fransisco, CA", 10);
foreach (var venue in venues)
{
Console.WriteLine("\t{0}: {1}", venue.Id, venue.Name);
// Finally, get the photos of each venue
var photos = await venue.GetPhotos();
foreach (var photo in photos)
{
Console.WriteLine("{0}: {1}", photo.GetUrl(), photo.Visibility);
}
}
}
}
You can see the Playground example for some more details on the usage.