39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
|
from responder import Response
|
||
|
|
||
|
from app_instance import api
|
||
|
|
||
|
response_count_max = 10
|
||
|
|
||
|
|
||
|
@api.route("/api/search/{keyword}")
|
||
|
def search_keyword(req, resp, keyword: str):
|
||
|
resp.media = {'keyword': keyword, 'hits': "movie_dicts", 'truncated_results': "limited"}
|
||
|
|
||
|
|
||
|
@api.route("/api/director/{director_name}")
|
||
|
def search_director(_, resp, director_name: str):
|
||
|
resp.media = {'keyword': director_name, 'hits': "movies_dicts", 'truncated_results': "limited"}
|
||
|
|
||
|
|
||
|
@api.route("/api/movie/genre/{genre}")
|
||
|
def movies_by_genre(_, resp: Response, genre: str):
|
||
|
resp.media = {'genre': genre, 'hits': "hits_dicts", 'truncated_results': "limited"}
|
||
|
|
||
|
|
||
|
@api.route("/api/movie/{imdb_number}")
|
||
|
def search_imdb(_, resp, imdb_number: str):
|
||
|
resp.media = {'foo': "bar"}
|
||
|
|
||
|
|
||
|
@api.route("/api/movie/top")
|
||
|
def top_movies(_, resp: Response):
|
||
|
resp.media = {'keyword': "keyword", 'hits': "hits_dicts", 'truncated_results': "limited"}
|
||
|
|
||
|
|
||
|
@api.route("/api/movie/genre/all")
|
||
|
def all_genres(_, resp: Response):
|
||
|
resp.media = {"all": "stuff"}
|
||
|
|
||
|
@api.route("/api/shuffle")
|
||
|
def cards_shuffle(_, resp: Response):
|
||
|
resp.media = {"shuffled": "done"}
|