Skip to content

Commit

Permalink
refact(#2): make api call async
Browse files Browse the repository at this point in the history
  • Loading branch information
fedepacher committed Jun 11, 2023
1 parent 4db5198 commit 073705a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
app = FastAPI()

@app.get('/cantidad_filmaciones_mes/{month}')
def get_count_movies_month(month: str):
async def get_count_movies_month(month: str):
"""Get the amount of movies released in the requested month.
Args:
Expand All @@ -21,7 +21,7 @@ def get_count_movies_month(month: str):


@app.get('/cantidad_filmaciones_dia/{day}')
def get_count_movies_day(day: str):
async def get_count_movies_day(day: str):
"""Get the amount of movies released in the requested day.
Args:
Expand All @@ -34,7 +34,7 @@ def get_count_movies_day(day: str):


@app.get('/score_titulo/{title}')
def get_score_title(title: str):
async def get_score_title(title: str):
"""Get the released year and the score of the requested title.
Args:
Expand All @@ -47,7 +47,7 @@ def get_score_title(title: str):


@app.get('/votos_titulo/{title}')
def get_votes_title(title: str):
async def get_votes_title(title: str):
"""Get the released year, vote count and vote average of the requested title.
Args:
Expand All @@ -60,7 +60,7 @@ def get_votes_title(title: str):


@app.get('/get_actor/{actor}')
def get_actor(actor: str):
async def get_actor(actor: str):
"""Get the actor movies, themaximun return ans the average return.
Args:
Expand All @@ -73,7 +73,7 @@ def get_actor(actor: str):


@app.get('/get_director/{director}')
def get_director(director: str):
async def get_director(director: str):
"""Get all the movies, released year, return, revenue and budget of the requested director.
Args:
Expand All @@ -86,7 +86,7 @@ def get_director(director: str):


@app.get('/recomendacion/{title}')
def get_recomendation(title: str):
async def get_recomendation(title: str):
"""Get the recomendation accordint to requested title.
Args:
Expand Down

0 comments on commit 073705a

Please sign in to comment.