I successfully made a venue api call from one of the samples given at https://github.com/mLewisLogic/foursquare , however, I cannot make a call for the foursquare.Foursquare.client.venues.explore() method as it returns 'TypeError: explore() takes at least 2 arguments (1 given)' as demonstrated below.
What are the two arguments I need to enter, and how would someone go about finding this information in the documentation?
import foursquare
import json
#Construct the client object
client = foursquare.Foursquare(client_id='LTTRSNDNMBRS', client_secret='EEAUE')
#This gives me a response
test = client.venues('40a55d80f964a52020f31ee3')
print test
#This Gives me the error 'TypeError: explore() takes at least 2 arguments (1 given)'
result = client.venues.explore()
I know it's a bit too late and I guess you probably don't need the answer anymore, but maybe someone else is having the same problem, so I'll share what worked FOR ME. I think the problem with your code is that you don't provide any parameters when you call the api. it should be something like
params = {
'll': lt + ',' + ln,
'radius': radius
}
result = client.venues.explore(params)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.