Skip to content

Commit

Permalink
Added support for venue claim endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
james-jory committed Jul 18, 2014
1 parent 2bb82b2 commit a0e5e90
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>fi.foyt</groupId>
<artifactId>foursquare-api</artifactId>
<packaging>jar</packaging>
<version>1.0.5-VinTank</version>
<version>1.0.6-VinTank</version>
<name>Foursquare API</name>
<licenses>
<license>
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/fi/foyt/foursquare/api/FoursquareApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,27 @@ public Result<VenuesSearchResult> venuesSearch(String ll, Double llAcc, Double a
}


/**
* Allows the authenticated user to claim a venue. This is a non-public API that requires permission from
* Foursquare for your application's client ID.
*
* @see <a href="https://developer.foursquare.com/docs/venues/claim" target="_blank">https://developer.foursquare.com/docs/venues/claim</a>.
*
* @param id the venue id for the venue being claimed
* @param visible whether authenticated user should be shown as a venue manager on the venue page
* @return Result object
* @throws FoursquareApiException when something unexpected happens
*/
public Result<Object> venueClaim(String id, boolean visible) throws FoursquareApiException {
try {
ApiRequestResponse response = doApiRequest(Method.POST, "venues/" + id + "/claim", true, "visible", visible);
return new Result<Object>(response.getMeta(), null);
} catch (JSONException e) {
throw new FoursquareApiException(e);
}
}


/**
* handle parsing a venue search result and parsing the data
* @param response
Expand Down

0 comments on commit a0e5e90

Please sign in to comment.