-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
45 lines (29 loc) · 944 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from flask import Flask
import wit_anime as wit
app = Flask(__name__)
@app.route("/search-anime/<string:name>", methods=["GET"])
def search_anime(name):
result = wit.search_anime(name)
return result
@app.route("/get-episodes/<string:s_id>", methods=["GET"])
def get_episodes(s_id):
result = wit.get_episodes(s_id)
return result
@app.route("/get-episode-dl/<string:s_id>", methods=["GET"])
def get_episode_dl(s_id):
result = wit.get_episode_dl(s_id)
return result
@app.route("/latest-episodes", methods=["GET"])
def latest_episodes():
result = wit.latest_episodes()
return result
@app.route("/fetch-seasonals", methods=["GET"])
def fetch_seasonals():
result = wit.fetch_seasonals()
return result
@app.route("/get-anime-info/<string:s_id>", methods=["GET"])
def get_anime_info(s_id):
result = wit.get_anime_info(s_id)
return result
if __name__ == "__main__":
app.run("0.0.0.0")