diff --git a/foursquare/__init__.py b/foursquare/__init__.py index 8d9b491..14a7d11 100644 --- a/foursquare/__init__.py +++ b/foursquare/__init__.py @@ -512,6 +512,10 @@ def flag(self, VENUE_ID, params): """https://developer.foursquare.com/docs/venues/flag""" return self.POST('{VENUE_ID}/flag'.format(VENUE_ID=VENUE_ID), params) + def claim(self, VENUE_ID, params): + """https://developer.foursquare.com/docs/api/venues/claim""" + return self.POST('{VENUE_ID}/claim'.format(VENUE_ID=VENUE_ID), params) + def proposeedit(self, VENUE_ID, params): """https://developer.foursquare.com/docs/venues/proposeedit""" return self.POST('{VENUE_ID}/proposeedit'.format(VENUE_ID=VENUE_ID), params) diff --git a/foursquare/tests/test_venues.py b/foursquare/tests/test_venues.py index 1ea876b..5278719 100644 --- a/foursquare/tests/test_venues.py +++ b/foursquare/tests/test_venues.py @@ -67,6 +67,9 @@ def test_search_browse(self): response = self.api.venues.search(params={'ll': self.default_geo, 'radius': self.default_geo_radius, 'intent': 'browse'}) assert 'venues' in response + def test_claim_venues(self): + response = self.api.venues.claim(self.default_venueid, params={"description": "Venue is Claimed"}) + assert 'venues' in response def test_suggestcompletion(self): response = self.api.venues.suggestcompletion(params={'ll': self.default_geo, 'query': 'cof'})