示例#1
0
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)
示例#2
0
def fetchSingleNode():
    geoDict = {}
    collName = '112621745415708'
    Q = '#chennai'
    #data = intercom.fetchFrequentNode()
    length = intercom.retrieveTweets(collName, Q, geoDict)
    #return json.dumps(data)
    return 'length'
示例#3
0
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)
示例#4
0
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)
示例#5
0
def retrieveTweets(collName, Q, geoDict):
    logger.info('retrieveTweets:%s,%s,%s', collName, Q, geoDict)
    return len(intercom.retrieveTweets(collName, Q, geoDict))
示例#6
0
def fetchSingleNode():
    geoDict = {}
    collName = '112621745415708'
    Q ='Chennai'
    length = intercom.retrieveTweets(collName,Q,geoDict)
    return 'length'
示例#7
0
def retrieveTweets(collName,Q,geoDict):
    logger.info('retrieveTweets:%s,%s,%s',collName,Q,geoDict)
    return intercom.retrieveTweets(collName,Q,geoDict)
示例#8
0
def fetchSingleNode():
    geoDict = {}
    collName = '112621745415708'
    Q ='chennai'
    length = intercom.retrieveTweets(collName,Q,geoDict)
    return 'length'