2014-05-18, 02:31
Does anyone have an idea how to get location specific concert data with the extendedinfo script?
If I use this command below I get data for across the United States.
RunScript(script.extendedinfo,info=NearEvents,tag=rock)
My question is how would I format the command link to get location specific data?
I know it is possible because if I edit the script on line 194 and manually enter lat. and lon. coordinates for say "Las Vegas" in between the quotes here on the top line...
I can get data for Las Vegas or for wherever I choose. I just can't figure out how to format the link to get it without editing the extendedinfo script.
I have tried these below and just about every other combination I could think of trying but to no avail, so I thought just maybe someone here would know. Thanks.
RunScript(script.extendedinfo,info=NearEvents,location=las vegas,tag=rock)
RunScript(script.extendedinfo,info=NearEvents,tag=rock,location=las vegas)
RunScript(script.extendedinfo,info=NearEvents,tag=rock,lat=36.255123,lon=-115.238349)
If I use this command below I get data for across the United States.
RunScript(script.extendedinfo,info=NearEvents,tag=rock)
My question is how would I format the command link to get location specific data?
I know it is possible because if I edit the script on line 194 and manually enter lat. and lon. coordinates for say "Las Vegas" in between the quotes here on the top line...
PHP Code:
def GetNearEvents(tag = False,festivalsonly = False, lat = "", lon = ""):
if festivalsonly:
festivalsonly = "1"
else:
festivalsonly = "0"
url = 'method=geo.getevents&festivalsonly=%s&limit=40' % (festivalsonly)
if tag:
url = url + '&tag=%s' % (urllib.quote_plus(tag))
if lat:
url = url + '&lat=%s&long=%s' % (lat,lon) # &distance=60
results = GetLastFMData(url)
if True:
return HandleLastFMEventResult(results)
else:
return []
I have tried these below and just about every other combination I could think of trying but to no avail, so I thought just maybe someone here would know. Thanks.
RunScript(script.extendedinfo,info=NearEvents,location=las vegas,tag=rock)
RunScript(script.extendedinfo,info=NearEvents,tag=rock,location=las vegas)
RunScript(script.extendedinfo,info=NearEvents,tag=rock,lat=36.255123,lon=-115.238349)