Skip to content

Commit

Permalink
Merge pull request #94 from milind-shakya-sp/master
Browse files Browse the repository at this point in the history
Add support for claiming venues
  • Loading branch information
mLewisLogic authored Jan 31, 2020
2 parents 65fcc18 + 1df9077 commit b1c881b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions foursquare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions foursquare/tests/test_venues.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down

0 comments on commit b1c881b

Please sign in to comment.