def topics_river(): topic = request.args.get('topic', '') during = request.args.get('pointInterval', 60 * 60) # 默认查询时间粒度为3600秒 during = int(during) end_ts = request.args.get('end_ts', '') end_ts = long(end_ts) start_ts = request.args.get('start_ts', '') start_ts = long(start_ts) #weibo_count = all_weibo_count(topic,start_ts,end_ts) topic_count = get_topics_river(topic, start_ts, end_ts, during) return json.dumps(topic_count)
def topics_river(): topic = request.args.get('topic','') during = request.args.get('pointInterval',60*60) # 默认查询时间粒度为3600秒 during = int(during) end_ts = request.args.get('end_ts', '') end_ts = long(end_ts) start_ts = request.args.get('start_ts', '') start_ts = long(start_ts) #weibo_count = all_weibo_count(topic,start_ts,end_ts) topic_count = get_topics_river(topic,start_ts,end_ts,during) return json.dumps(topic_count)
def topics_river(): task_source = request.args.get('task_source', '') # weibo,facebook,twitter task_id = request.args.get('task_id', '') during = request.args.get('pointInterval', 60 * 60) # 默认查询时间粒度为3600秒 during = int(during) end_ts = request.args.get('end_ts', '') # create_time end_ts = long(end_ts) start_ts = request.args.get('start_ts', '') # create_time - 5*36*2400 (因为搜的5天的流数据) start_ts = long(start_ts) #weibo_count = all_weibo_count(topic,start_ts,end_ts) topic_count = get_topics_river(task_source, task_id, start_ts, end_ts, during) return json.dumps(topic_count)