def authorize_posts_backup(export_type): posts_exporter_instance = post_exporter_factory(export_type) memc.set("posts_exporter_instance", posts_exporter_instance) authorize_url = posts_exporter_instance.get_authorize_url() if authorize_url is not None: return Response(json.dumps({"aurl": authorize_url}), status=200, mimetype="application/json") else: return Response(json.dumps({}), status=500, mimetype="application/json")
def authorize_posts_backup(export_type): posts_exporter_instance = post_exporter_factory(export_type) memc.set('posts_exporter_instance', posts_exporter_instance) authorize_url = posts_exporter_instance.get_authorize_url() if authorize_url is not None: return Response(json.dumps({"aurl": authorize_url}), status=200, mimetype='application/json') else: return Response(json.dumps({}), status=500, mimetype='application/json')
def export_archive(): posts_exporter_instance = post_exporter_factory('archive') memc.set('posts_exporter_instance', posts_exporter_instance) return posts_exporter_instance.get_response_with_available_files()
def export_archive(): posts_exporter_instance = post_exporter_factory("archive") memc.set("posts_exporter_instance", posts_exporter_instance) return posts_exporter_instance.get_response_with_available_files()