Example #1
0
 def handle(self, location='', count=10):
     objs = ig_query.get_objs_by_location(
         location,
         count=count)
     img_urls = []
     for res in objs[location].get('data',[]):
         img_urls.append(
             res['images']['standard_resolution']['url'])
     img_html = str("".join(
         ["<img src='%s'/><br/>"%i for i in img_urls]))
     return "<html><head></head><body>"+img_html+"</body></html>"
Example #2
0
 def handle(self, location='', count=10):
     objs = ig_query.get_objs_by_location(
         location,
         count=count)
     return json.dumps({'data':objs[location].get('data',[])})