def slideshow_tag(tag): url = _ensure_api() if url: return flask.redirect(url) title = quorum.conf("TITLE", "Instashow") sub_title = quorum.conf("SUB_TITLE", "Instagram + steroids") image = quorum.conf("IMAGE", None) timeout = quorum.get_field("timeout", 10000, cast = int) title = quorum.get_field("title", title) sub_title = quorum.get_field("sub_title", sub_title) image = quorum.get_field("image", image) api = _get_api() media = api.media_tag(tag) return flask.render_template( "tags/slideshow.html.tpl", link = "tags", sub_link = "slideshow", tag = tag, media = media, title = title, sub_title = sub_title, image = image, timeout = timeout )
def unsubscribe(tag): base_url = quorum.conf("BASE_URL") callback_url = base_url + "/notify" api = _get_api() api.unsubscribe(object="tag", aspect="media", object_id=tag, callback_url=callback_url) return flask.redirect(flask.url_for("index"))
def unsubscribe(tag): base_url = quorum.conf("BASE_URL") callback_url = base_url + "/notify" api = _get_api() api.unsubscribe( object = "tag", aspect = "media", object_id = tag, callback_url = callback_url ) return flask.redirect( flask.url_for("index") )
def slideshow_tag(tag): url = _ensure_api() if url: return flask.redirect(url) title = quorum.conf("TITLE", "Instashow") sub_title = quorum.conf("SUB_TITLE", "Instagram + steroids") image = quorum.conf("IMAGE", None) timeout = quorum.get_field("timeout", 10000, cast=int) title = quorum.get_field("title", title) sub_title = quorum.get_field("sub_title", sub_title) image = quorum.get_field("image", image) api = _get_api() media = api.media_tag(tag) return flask.render_template("tags/slideshow.html.tpl", link="tags", sub_link="slideshow", tag=tag, media=media, title=title, sub_title=sub_title, image=image, timeout=timeout)