Ejemplo n.º 1
0
	def get(self):
		args = tag_name_parser.parse_args()
		print args, CLIENT_ID, CLIENT_SECRET
		instance = Instagram(CLIENT_ID, CLIENT_SECRET)
		data = instance.tag_names(args["tag"])
		data = [str(tag) for tag in data]
		return jsonify(data)
Ejemplo n.º 2
0
	def get(self):
		args = image_parser.parse_args()
		instance = Instagram(CLIENT_ID, CLIENT_SECRET)
		data = instance.images_by_tag(args["tag"], args["size"], args["count"])
		if data[0].get("image") is None:
			return json.dumps({
				"error": True,
				"messege": "You have not entered valid resolution size.\n Try entering.\n thumnail.\n standard_resolution.\n or low_resolution.\n" 
				})
		data = [str(tag) for tag in data]
		return json.dumps(data)
Ejemplo n.º 3
0
	def get(self):
		instance = Instagram(CLIENT_ID, CLIENT_SECRET)
		return json.dumps(instance.popular_images())