Ported from original Google Code project which is no longer being maintained.
Besides updating the driver with the latest Foursquare API changes, also added support for some merchant-related endpoints. See Summary of Changes below for details.
Most Foursquare API endpoints require an OAuth 2.0 access token while others support userless access. For details on how to obtain an OAuth 2.0 access token, see Foursquare API Connecting page.
try {
FoursquareApi client = new FoursquareApi(YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, null);
client.setoAuthToken(AN_ACCESS_TOKEN);
Result<CompleteVenue> result = client.venue(VENUE_ID);
CompleteVenue venue = resVenue.getResult();
// Do something with the venue
}
catch (FoursquareApiException e) {
// Deal with it.
}
The following changes were made to the original project before being added to this repository.
- Updated DEFAULT_VERSION to "20130424"
- Added support for POST /checkins/[CHECKIN_ID]/like
- Added support for POST /pageupdates/add
- Added support for POST /pageupdates/[UPDATE_ID]/delete
- Added support for GET /pageupdates/list
- Added support for POST /tips/[TIP_ID]/like
- Added support for POST /tips/[TIP_ID]/flag
- Added support for GET /venues/[VENUE_ID]/nextvenues
- Added support for GET /venues/[VENUE_ID]/likes
- Added support for GET /venues/[VENUE_ID]/stats
- Added support for GET /venues/managed
- Added support for GET /venues/timeseries
- Changed Badge.java to match API.
- Changed Category.java to match API (Icon & shortName)
- Changed Checkin.java (Likes)
- Changed CompactTip.java (canonicalUrl)
- Changed CompactUser.java (Photo)
- Changed CompactVenue.java (SpecialGroup, Menu, Rating, Price, canonicalUrl)
- Changed CompleteTip.java (Likes)
- Changed CompleteUser.java (Lists, Photos, referralId, checkInPings)
- Changed CompleteVenue.java (Lists, Likes, like, dislike)
- Changed Contact.java (formattedPhone)
- Changed HereNow.java (summary)
- Changed Location.java (cc, isFuzzed)
- Changed Photo.java (width, height, visibility, ...)
- Changed Stats.java (tipCount)
- Created MiniPhoto.java to support photo changes in API
- Created PushLike.java to support processing real-time venue like messages
- Added support for nested arrays in JSONFieldParser.java
- JSON field names with embedded "-" are mapped to Java property names using underscore ("_").
- Override ResultMeta.toString() to return descriptive string of error info.
- Fixed misc compiler warnings.