def retrieveTweets(collName, Q, geoDict): import intercom intercom = intercom.intercom() logger.info('retrieveTweets:%s,%s,%s', collName, Q, geoDict) #twits = #category = triggerCategory.delay() return intercom.retrieveTweets(collName, Q, geoDict)
def fetchSingleNode(): geoDict = {} collName = '112621745415708' Q = '#chennai' #data = intercom.fetchFrequentNode() length = intercom.retrieveTweets(collName, Q, geoDict) #return json.dumps(data) return 'length'
def displayFeeds(): feedList = intercom.retrieveTweets( "106377336067638", "MADURAI INDIA", {"lat": "12.9833", "distance": ".5", "lng": "77.5833"} ) # intercom.retrieveTwitterAccessTokens() # collId = request.args.get('collId') # count = request.args.get('count') # lastTimeStamp = request.args.get('lastTimeStamp') # if collId is None and count is None: # return 'collection id or count is missing',400 # elif lastTimeStamp is None: # #lastTimeStamp = time.time() - 24*60*60 #epoch time minus 1 day # lastTimeStamp = 1451606400 # logger.info('collId requested is:%s & lasttimeStamp:%s count is %s',collId,lastTimeStamp,count) # feedList = [] # feedList.extend(intercom.retrieveCollection(collId,lastTimeStamp,count)) return json.dumps(feedList)
def displayFeeds(): feedList = intercom.retrieveTweets('106377336067638', 'MADURAI INDIA', { 'lat': '12.9833', 'distance': '.5', 'lng': '77.5833' }) #intercom.retrieveTwitterAccessTokens() #collId = request.args.get('collId') #count = request.args.get('count') #lastTimeStamp = request.args.get('lastTimeStamp') #if collId is None and count is None: # return 'collection id or count is missing',400 #elif lastTimeStamp is None: # #lastTimeStamp = time.time() - 24*60*60 #epoch time minus 1 day # lastTimeStamp = 1451606400 #logger.info('collId requested is:%s & lasttimeStamp:%s count is %s',collId,lastTimeStamp,count) #feedList = [] #feedList.extend(intercom.retrieveCollection(collId,lastTimeStamp,count)) return json.dumps(feedList)
def retrieveTweets(collName, Q, geoDict): logger.info('retrieveTweets:%s,%s,%s', collName, Q, geoDict) return len(intercom.retrieveTweets(collName, Q, geoDict))
def fetchSingleNode(): geoDict = {} collName = '112621745415708' Q ='Chennai' length = intercom.retrieveTweets(collName,Q,geoDict) return 'length'
def retrieveTweets(collName,Q,geoDict): logger.info('retrieveTweets:%s,%s,%s',collName,Q,geoDict) return intercom.retrieveTweets(collName,Q,geoDict)
def fetchSingleNode(): geoDict = {} collName = '112621745415708' Q ='chennai' length = intercom.retrieveTweets(collName,Q,geoDict) return 'length'