feat: 🎉 Rating Orama!

This commit is contained in:
2023-04-09 06:45:27 +02:00
commit b2f4b573f3
61 changed files with 8130 additions and 0 deletions
View File
+8
View File
@@ -0,0 +1,8 @@
from flask import jsonify, Blueprint
ping = Blueprint('ping', __name__)
@ping.route('/ping', methods=['GET'])
def ping_pong():
return jsonify('pong!')
+14
View File
@@ -0,0 +1,14 @@
from flask import Blueprint, jsonify
from logic.utils import get_tv_show_episodes
tv_show_bp = Blueprint('tv_show_bp', __name__)
@tv_show_bp.route('/tv-show/<tt_id>', methods=['GET'])
def get_tv_show(tt_id):
try:
tv_show = get_tv_show_episodes(tt_id)
return jsonify(tv_show.__dict__)
except Exception as e:
return jsonify({'error': str(e)}), 500