From b19f6a05608138c5289c95ac00cf70400c2cebd8 Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Tue, 10 Nov 2026 08:02:07 -0300 Subject: [PATCH 1/9] =?UTF-8?q?fix:=20corrigindo=20tipos=20aceitos=20pela?= =?UTF-8?q?=20fun=C3=A7=C3=A3o=20de=20validar=20usu=C3=A1rio=20novo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/services/security_services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/services/security_services.py b/backend/src/services/security_services.py index 11e5665..b445b78 100644 --- a/backend/src/services/security_services.py +++ b/backend/src/services/security_services.py @@ -4,7 +4,7 @@ from jose import jwt import math -from ..models.schemas import ListNew, ListEdit, ReviewNew, ReviewEdit, UserNew +from ..models.schemas import ListNew, ListEdit, ReviewNew, ReviewEdit, UserNew, UserEdit from .db_services import ( DB_read_already_follows, DB_read_is_blocked, @@ -57,7 +57,7 @@ def decode_token(cookies, token_name: str, key: str): return jwt.decode(cookies[token_name], key, algorithms=["HS256"], options={"verify_exp": False}) -async def is_user_valid(conn, user: UserNew, user_id: str = None): +async def is_user_valid(conn, user: UserNew | UserEdit, user_id: str = None): """Testa se uma conta de usuário ao criar ou editar é válida para entrar no DB""" username = user.username.strip() From f37308c0e5e1378409aa4d5c07840e74141dde8a Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Wed, 11 Nov 2026 12:55:07 -0300 Subject: [PATCH 2/9] =?UTF-8?q?fix:=20arrumando=20teste=20de=20novos=20usu?= =?UTF-8?q?=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/routes/auth.py | 4 ++-- backend/tests/test_auth/test_login.py | 1 + backend/tests/test_auth/test_logout.py | 1 + backend/tests/test_security/test_rate_limit.py | 0 backend/tests/test_users/test_new_user.py | 8 ++++---- backend/tests/utils.py | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 backend/tests/test_auth/test_login.py create mode 100644 backend/tests/test_auth/test_logout.py create mode 100644 backend/tests/test_security/test_rate_limit.py diff --git a/backend/src/routes/auth.py b/backend/src/routes/auth.py index aedcb00..89f8e9e 100644 --- a/backend/src/routes/auth.py +++ b/backend/src/routes/auth.py @@ -29,8 +29,8 @@ async def login(user: UserAuth, conn = Depends(dep.get_conn), key = Depends(dep. new_refresh_token = encode_token(user_id, 720, key) response = JSONResponse({"message":"Login feito com sucesso!", "user_id": user_id}) - response.set_cookie("access-token", new_access_token, samesite="strict", secure=True, httponly=True) - response.set_cookie("refresh-token", new_refresh_token, samesite="strict", secure=True, httponly=True) + response.set_cookie("access-token", new_access_token, samesite="lax", secure=True, httponly=True) + response.set_cookie("refresh-token", new_refresh_token, samesite="lax", secure=True, httponly=True) return response diff --git a/backend/tests/test_auth/test_login.py b/backend/tests/test_auth/test_login.py new file mode 100644 index 0000000..bb377e8 --- /dev/null +++ b/backend/tests/test_auth/test_login.py @@ -0,0 +1 @@ +import pytest \ No newline at end of file diff --git a/backend/tests/test_auth/test_logout.py b/backend/tests/test_auth/test_logout.py new file mode 100644 index 0000000..bb377e8 --- /dev/null +++ b/backend/tests/test_auth/test_logout.py @@ -0,0 +1 @@ +import pytest \ No newline at end of file diff --git a/backend/tests/test_security/test_rate_limit.py b/backend/tests/test_security/test_rate_limit.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/tests/test_users/test_new_user.py b/backend/tests/test_users/test_new_user.py index 39e34b3..3c5c85b 100644 --- a/backend/tests/test_users/test_new_user.py +++ b/backend/tests/test_users/test_new_user.py @@ -70,8 +70,8 @@ def test_new_users(user, expected_status, expected_body): resp_duplicate = requests.post(url=BASE_URL_USERS, json=base_user(1)) assert resp_duplicate.status_code == 200, resp_duplicate.json() assert resp_duplicate.cookies is not None, resp_duplicate.json() - for c in resp_duplicate.cookies: - c.secure = False + #for c in resp_duplicate.cookies: + # c.secure = False response = requests.post(url=BASE_URL_USERS, json=user) @@ -87,8 +87,8 @@ def test_new_users(user, expected_status, expected_body): if response.status_code == 200: assert "user_id" in response_json.keys() - for c in response.cookies: - c.secure = False + #for c in response.cookies: + # c.secure = False resp_delete = requests.delete(BASE_URL_USERS, cookies=response.cookies) assert resp_delete.status_code == 200, resp_delete.json() diff --git a/backend/tests/utils.py b/backend/tests/utils.py index 2a7be9a..3cae901 100644 --- a/backend/tests/utils.py +++ b/backend/tests/utils.py @@ -66,8 +66,8 @@ def create_account_by_username(username: str): session = requests.Session() response = session.post(BASE_URL_USERS, json=payload) - for c in session.cookies: - c.secure = False + #for c in session.cookies: + # c.secure = False response_json = response.json() From 67a464ddd76f96431b65dd57462566aea2d964d1 Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Wed, 11 Nov 2026 13:40:40 -0300 Subject: [PATCH 3/9] docs: melhorando README do backend --- backend/README.md | 35 ++++++++++++++++--- backend/docs/.env.example | 3 +- .../tests/test_security/test_rate_limit.py | 1 + 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/backend/README.md b/backend/README.md index 7ff0cf5..3348d6b 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,6 +1,6 @@ # Backend do Gamerboxd -## ⚙️ Tecnologias Utilizadas +## ⚙️ Principais Tecnologias Utilizadas - [FastAPI (Python)](https://fastapi.tiangolo.com/) - [asyncpg (Python)](https://magicstack.github.io/asyncpg/current/) - [Postgresql](https://www.postgresql.org/docs/current/) @@ -8,7 +8,7 @@ ## 📝 Como Rodar ### Criando o ambiente virtual -1. Entre na pasta do código fonte: `cd /backend` +1. Entre na pastao backend: `cd /backend` 2. Crie o ambiente virtual com `python3 -m venv .venv` 3. Ative o ambiente no terminal com `source .venv/bin/activate` 4. Selecione o interpretador de python do .venv @@ -30,9 +30,34 @@ 12. Abra a aba connection, o hostname é `localhost`, a port é `5432`, o username é `postgres` e a password é a que você definiu nos comandos acima. -### Rodando o projeto +### Instanciando as enviroment variables -1. Na pasta `/src`, crie o arquivo `.env` e atribua as variáveis de ambiente do banco de dados conforme o arquivo `.env.example` mostra -2. Rode o programa com o comando `fastapi dev` +1. Na pasta `/backend`, crie o arquivo `.env` e atribua as variáveis de ambiente do banco de dados conforme o arquivo `.env.example` mostra + +### Rodando o app + +1. Vá para a pasta do backend `cd /backend` +2. Caso não esteja ativado, ative o ambiente virtual no terminal `source .venv/bin/activate` +3. Vá para a pasta do código fonte `cd /src` +4. Rode o programa com o comando `fastapi dev` + + +### Rodando os testes + +1. Abra o terminal +2. Vá para a pasta do backend `cd /backend` +3. Abra uma segunda aba no terminal. Se necessário, vá até a pasta do backend nessa nova aba também +4. Ative a venv (`source .venv/bin/activate`) em ambas as abas +5. Em uma das abas, vá para pasta do código fonte (`cd /src`) e rode a aplicação (`fastapi dev`) +6. Na outra aba, vá para a pasta de testes (`cd /src`) e rode o pytest (`pytest`) + +Outros comandos mais específicos para rodar os testes: + +| Comando | Descrição | +|--------------------------|-----------------------------------------------------------------------------------------------| +| `pytest test_*` | Rodar algum conjunto específico de testes, * pode ser auth, lists, reviews, security ou users | +| `pytest -v` | Rodar testes em modo verbose (mais descritivo caso uma falha aconteça) | +| `pytest -m "not rawg"` | Rodar apenas os testes que não dependem da API de jogos RAWG | +| `pytest -m "not pagination"` | Rodar apenas os testes que não são de paginação (testes mais lentos) | diff --git a/backend/docs/.env.example b/backend/docs/.env.example index 819b496..978ac8e 100644 --- a/backend/docs/.env.example +++ b/backend/docs/.env.example @@ -12,4 +12,5 @@ DB_PORT=3000 JWT_KEY="SECRET KEY" RAWG_KEY="SECRET KEY" -FRONT_URL="http://localhost:5173" \ No newline at end of file +FRONT_URL="http://localhost:5173" +BACK_URL="https://localhost:8000" \ No newline at end of file diff --git a/backend/tests/test_security/test_rate_limit.py b/backend/tests/test_security/test_rate_limit.py index e69de29..bb377e8 100644 --- a/backend/tests/test_security/test_rate_limit.py +++ b/backend/tests/test_security/test_rate_limit.py @@ -0,0 +1 @@ +import pytest \ No newline at end of file From 33023e5308e24073f73f7ed481e9b8dd1f105c5b Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Thu, 12 Nov 2026 00:18:34 -0300 Subject: [PATCH 4/9] fix: trocando a rawg api por um json --- backend/data/games.json | 2882 +++++++++++++++++ backend/data/games.txt | 412 +++ backend/docs/game_routes.md | 30 +- backend/src/config/lifespan.py | 44 +- backend/src/models/schemas/game.py | 1 + backend/src/models/tables.py | 5 +- backend/src/routes/game.py | 29 +- backend/src/services/db_services/game.py | 133 +- backend/tests/conftest.py | 2 - backend/tests/test_lists/test_content.py | 7 +- backend/tests/test_lists/test_new_list.py | 2 +- .../tests/test_lists/test_standard_lists.py | 5 +- .../tests/test_reviews/test_edit_review.py | 14 +- backend/tests/test_reviews/test_like.py | 22 +- backend/tests/test_reviews/test_new_review.py | 2 +- backend/tests/test_reviews/utils.py | 8 +- backend/tests/test_users/test_new_user.py | 8 +- backend/tests/utils.py | 4 +- 18 files changed, 3554 insertions(+), 56 deletions(-) create mode 100644 backend/data/games.json create mode 100644 backend/data/games.txt diff --git a/backend/data/games.json b/backend/data/games.json new file mode 100644 index 0000000..28a650c --- /dev/null +++ b/backend/data/games.json @@ -0,0 +1,2882 @@ +{ + "total": 411, + "games": [ + { + "game_id": 1, + "title": "New Super Mario Bros. Wii", + "release_date": "2009-11-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co21tj.jpg", + "relevancy": 414 + }, + { + "game_id": 2, + "title": "Minecraft", + "release_date": "2011-11-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8fu7.jpg", + "relevancy": 500 + }, + { + "game_id": 3, + "title": "Grand Theft Auto V", + "release_date": "2013-09-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2lbd.jpg", + "relevancy": 499 + }, + { + "game_id": 4, + "title": "The Witcher 3: Wild Hunt", + "release_date": "2015-05-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaarl.jpg", + "relevancy": 487 + }, + { + "game_id": 5, + "title": "Red Dead Redemption 2", + "release_date": "2018-10-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1q1f.jpg", + "relevancy": 492 + }, + { + "game_id": 6, + "title": "Elden Ring", + "release_date": "2022-02-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4jni.jpg", + "relevancy": 485 + }, + { + "game_id": 7, + "title": "The Legend of Zelda: Breath of the Wild", + "release_date": "2017-03-03", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3p2d.jpg", + "relevancy": 498 + }, + { + "game_id": 8, + "title": "Mario Kart 8 Deluxe", + "release_date": "2017-04-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co213p.jpg", + "relevancy": 490 + }, + { + "game_id": 9, + "title": "Terraria", + "release_date": "2011-05-16", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaamg.jpg", + "relevancy": 483 + }, + { + "game_id": 10, + "title": "Stardew Valley", + "release_date": "2016-02-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa93h.jpg", + "relevancy": 488 + }, + { + "game_id": 11, + "title": "The Elder Scrolls V: Skyrim", + "release_date": "2011-11-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocs1l.jpg", + "relevancy": 489 + }, + { + "game_id": 12, + "title": "Baldur's Gate 3", + "release_date": "2023-08-03", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co670h.jpg", + "relevancy": 484 + }, + { + "game_id": 13, + "title": "Tetris", + "release_date": "1984-06-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co53x2.jpg", + "relevancy": 495 + }, + { + "game_id": 14, + "title": "Super Mario Bros.", + "release_date": "1985-09-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6pib.jpg", + "relevancy": 494 + }, + { + "game_id": 15, + "title": "The Legend of Zelda", + "release_date": "1986-02-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1uii.jpg", + "relevancy": 400 + }, + { + "game_id": 16, + "title": "Metroid", + "release_date": "1986-08-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9rib.jpg", + "relevancy": 392 + }, + { + "game_id": 17, + "title": "Final Fantasy", + "release_date": "1987-12-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2xv8.jpg", + "relevancy": 411 + }, + { + "game_id": 18, + "title": "Mega Man 2", + "release_date": "1988-12-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5x42.jpg", + "relevancy": 110 + }, + { + "game_id": 19, + "title": "Castlevania III: Dracula's Curse", + "release_date": "1989-12-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coba2s.jpg", + "relevancy": 113 + }, + { + "game_id": 20, + "title": "Sonic the Hedgehog", + "release_date": "1991-06-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8ubt.jpg", + "relevancy": 471 + }, + { + "game_id": 21, + "title": "Street Fighter II", + "release_date": "1991-02-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co55et.jpg", + "relevancy": 410 + }, + { + "game_id": 22, + "title": "The Legend of Zelda: A Link to the Past", + "release_date": "1991-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3vzn.jpg", + "relevancy": 399 + }, + { + "game_id": 23, + "title": "Super Mario World", + "release_date": "1990-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8lo8.jpg", + "relevancy": 422 + }, + { + "game_id": 24, + "title": "Chrono Trigger", + "release_date": "1995-03-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3plw.jpg", + "relevancy": 220 + }, + { + "game_id": 25, + "title": "Super Mario 64", + "release_date": "1996-06-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co721v.jpg", + "relevancy": 479 + }, + { + "game_id": 26, + "title": "Pokemon Red/Blue", + "release_date": "1996-02-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/co5pi4.jpg", + "relevancy": 493 + }, + { + "game_id": 27, + "title": "Resident Evil", + "release_date": "1996-03-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobvjk.jpg", + "relevancy": 438 + }, + { + "game_id": 28, + "title": "Tomb Raider", + "release_date": "1996-10-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3hfx.jpg", + "relevancy": 369 + }, + { + "game_id": 29, + "title": "GoldenEye 007", + "release_date": "1997-08-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa2kn.jpg", + "relevancy": 165 + }, + { + "game_id": 30, + "title": "Final Fantasy VII", + "release_date": "1997-01-31", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobny6.jpg", + "relevancy": 441 + }, + { + "game_id": 31, + "title": "Age of Empires", + "release_date": "1997-10-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1zsh.jpg", + "relevancy": 297 + }, + { + "game_id": 32, + "title": "Half-Life", + "release_date": "1998-11-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7zzj.jpg", + "relevancy": 451 + }, + { + "game_id": 33, + "title": "The Legend of Zelda: Ocarina of Time", + "release_date": "1998-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3nnx.jpg", + "relevancy": 461 + }, + { + "game_id": 34, + "title": "StarCraft", + "release_date": "1998-03-31", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9n6m.jpg", + "relevancy": 301 + }, + { + "game_id": 35, + "title": "Baldur's Gate", + "release_date": "1998-12-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coati0.jpg", + "relevancy": 442 + }, + { + "game_id": 36, + "title": "Metal Gear Solid", + "release_date": "1998-09-03", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobpak.jpg", + "relevancy": 425 + }, + { + "game_id": 37, + "title": "Super Smash Bros.", + "release_date": "1999-01-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2tso.jpg", + "relevancy": 419 + }, + { + "game_id": 38, + "title": "Tony Hawk's Pro Skater 2", + "release_date": "2000-09-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5xve.jpg", + "relevancy": 312 + }, + { + "game_id": 39, + "title": "The Sims", + "release_date": "2000-02-04", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8j9a.jpg", + "relevancy": 449 + }, + { + "game_id": 40, + "title": "Diablo II", + "release_date": "2000-06-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3gfq.jpg", + "relevancy": 302 + }, + { + "game_id": 41, + "title": "Deus Ex", + "release_date": "2000-06-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocc3x.jpg", + "relevancy": 9 + }, + { + "game_id": 42, + "title": "Counter-Strike", + "release_date": "2000-11-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coc32b.jpg", + "relevancy": 454 + }, + { + "game_id": 43, + "title": "Grand Theft Auto III", + "release_date": "2001-10-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2lb8.jpg", + "relevancy": 473 + }, + { + "game_id": 44, + "title": "Halo: Combat Evolved", + "release_date": "2001-11-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2r2r.jpg", + "relevancy": 387 + }, + { + "game_id": 45, + "title": "Super Smash Bros. Melee", + "release_date": "2001-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co21yv.jpg", + "relevancy": 417 + }, + { + "game_id": 46, + "title": "Animal Crossing", + "release_date": "2001-04-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3wmn.jpg", + "relevancy": 19 + }, + { + "game_id": 47, + "title": "Ico", + "release_date": "2001-09-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3r78.jpg", + "relevancy": 19 + }, + { + "game_id": 48, + "title": "The Elder Scrolls III: Morrowind", + "release_date": "2002-05-01", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2knd.jpg", + "relevancy": 28 + }, + { + "game_id": 49, + "title": "Metroid Prime", + "release_date": "2002-11-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3w4w.jpg", + "relevancy": 390 + }, + { + "game_id": 50, + "title": "Warcraft III: Reign of Chaos", + "release_date": "2002-07-03", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1xuq.jpg", + "relevancy": 298 + }, + { + "game_id": 51, + "title": "Grand Theft Auto: Vice City", + "release_date": "2002-10-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2lbb.jpg", + "relevancy": 472 + }, + { + "game_id": 52, + "title": "The Legend of Zelda: The Wind Waker", + "release_date": "2002-12-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3ohz.jpg", + "relevancy": 397 + }, + { + "game_id": 53, + "title": "Call of Duty", + "release_date": "2003-10-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2n19.jpg", + "relevancy": 456 + }, + { + "game_id": 54, + "title": "Star Wars: Knights of the Old Republic", + "release_date": "2003-07-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1tmz.jpg", + "relevancy": 36 + }, + { + "game_id": 55, + "title": "Prince of Persia: The Sands of Time", + "release_date": "2003-11-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4t8l.jpg", + "relevancy": 36 + }, + { + "game_id": 56, + "title": "Beyond Good & Evil", + "release_date": "2003-11-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2n6b.jpg", + "relevancy": 36 + }, + { + "game_id": 57, + "title": "World of Warcraft", + "release_date": "2004-11-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2l7z.jpg", + "relevancy": 453 + }, + { + "game_id": 58, + "title": "Half-Life 2", + "release_date": "2004-11-16", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1nmw.jpg", + "relevancy": 450 + }, + { + "game_id": 59, + "title": "Grand Theft Auto: San Andreas", + "release_date": "2004-10-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2lb9.jpg", + "relevancy": 475 + }, + { + "game_id": 60, + "title": "Metal Gear Solid 3: Snake Eater", + "release_date": "2004-11-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5ei5.jpg", + "relevancy": 41 + }, + { + "game_id": 61, + "title": "Resident Evil 4", + "release_date": "2005-01-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2wk8.jpg", + "relevancy": 439 + }, + { + "game_id": 62, + "title": "God of War", + "release_date": "2005-03-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3ddc.jpg", + "relevancy": 430 + }, + { + "game_id": 63, + "title": "Shadow of the Colossus", + "release_date": "2005-10-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1ozz.jpg", + "relevancy": 47 + }, + { + "game_id": 64, + "title": "Guitar Hero", + "release_date": "2005-11-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1wa0.jpg", + "relevancy": 47 + }, + { + "game_id": 65, + "title": "The Elder Scrolls IV: Oblivion", + "release_date": "2006-03-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8fpz.jpg", + "relevancy": 53 + }, + { + "game_id": 66, + "title": "Gears of War", + "release_date": "2006-11-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8rkr.jpg", + "relevancy": 53 + }, + { + "game_id": 67, + "title": "Wii Sports", + "release_date": "2006-11-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3vge.jpg", + "relevancy": 476 + }, + { + "game_id": 68, + "title": "Bully", + "release_date": "2006-10-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocd6z.jpg", + "relevancy": 53 + }, + { + "game_id": 69, + "title": "Okami", + "release_date": "2006-04-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3mpk.jpg", + "relevancy": 12 + }, + { + "game_id": 70, + "title": "The Legend of Zelda: Twilight Princess", + "release_date": "2006-11-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3w1h.jpg", + "relevancy": 398 + }, + { + "game_id": 71, + "title": "BioShock", + "release_date": "2007-08-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2mli.jpg", + "relevancy": 377 + }, + { + "game_id": 72, + "title": "Portal", + "release_date": "2007-10-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coay61.jpg", + "relevancy": 433 + }, + { + "game_id": 73, + "title": "Call of Duty 4: Modern Warfare", + "release_date": "2007-11-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2adc.jpg", + "relevancy": 458 + }, + { + "game_id": 74, + "title": "Assassin's Creed", + "release_date": "2007-11-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rrw.jpg", + "relevancy": 375 + }, + { + "game_id": 75, + "title": "Mass Effect", + "release_date": "2007-11-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1x7o.jpg", + "relevancy": 379 + }, + { + "game_id": 76, + "title": "Super Mario Galaxy", + "release_date": "2007-11-01", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co21ro.jpg", + "relevancy": 421 + }, + { + "game_id": 77, + "title": "Rock Band", + "release_date": "2007-11-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co20bb.jpg", + "relevancy": 59 + }, + { + "game_id": 78, + "title": "Fallout 3", + "release_date": "2008-10-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1ycw.jpg", + "relevancy": 382 + }, + { + "game_id": 79, + "title": "Left 4 Dead", + "release_date": "2008-11-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1qrm.jpg", + "relevancy": 65 + }, + { + "game_id": 80, + "title": "Dead Space", + "release_date": "2008-10-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2g7w.jpg", + "relevancy": 65 + }, + { + "game_id": 81, + "title": "Braid", + "release_date": "2008-08-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co25ni.jpg", + "relevancy": 3 + }, + { + "game_id": 82, + "title": "LittleBigPlanet", + "release_date": "2008-10-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4p0f.jpg", + "relevancy": 65 + }, + { + "game_id": 83, + "title": "Super Smash Bros. Brawl", + "release_date": "2008-01-31", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co221w.jpg", + "relevancy": 416 + }, + { + "game_id": 84, + "title": "Portal 2", + "release_date": "2011-04-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rs4.jpg", + "relevancy": 432 + }, + { + "game_id": 85, + "title": "Batman: Arkham Asylum", + "release_date": "2009-08-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1voj.jpg", + "relevancy": 251 + }, + { + "game_id": 86, + "title": "Demon's Souls", + "release_date": "2009-02-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co27sk.jpg", + "relevancy": 363 + }, + { + "game_id": 87, + "title": "Uncharted 2: Among Thieves", + "release_date": "2009-10-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1tnb.jpg", + "relevancy": 366 + }, + { + "game_id": 88, + "title": "League of Legends", + "release_date": "2009-10-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coc99o.jpg", + "relevancy": 455 + }, + { + "game_id": 89, + "title": "Angry Birds", + "release_date": "2009-12-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4adm.jpg", + "relevancy": 342 + }, + { + "game_id": 90, + "title": "Limbo", + "release_date": "2010-07-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1qrs.jpg", + "relevancy": 2 + }, + { + "game_id": 91, + "title": "Red Dead Redemption", + "release_date": "2010-05-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2lcv.jpg", + "relevancy": 426 + }, + { + "game_id": 92, + "title": "Super Mario Galaxy 2", + "release_date": "2010-05-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co21tl.jpg", + "relevancy": 271 + }, + { + "game_id": 93, + "title": "Mass Effect 2", + "release_date": "2010-01-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co20ac.jpg", + "relevancy": 380 + }, + { + "game_id": 94, + "title": "StarCraft II: Wings of Liberty", + "release_date": "2010-07-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1tnn.jpg", + "relevancy": 300 + }, + { + "game_id": 95, + "title": "Fallout: New Vegas", + "release_date": "2010-10-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1u60.jpg", + "relevancy": 383 + }, + { + "game_id": 96, + "title": "Super Meat Boy", + "release_date": "2010-10-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co86cz.jpg", + "relevancy": 76 + }, + { + "game_id": 97, + "title": "Amnesia: The Dark Descent", + "release_date": "2010-09-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1qq5.jpg", + "relevancy": 76 + }, + { + "game_id": 98, + "title": "Dark Souls", + "release_date": "2011-09-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1x78.jpg", + "relevancy": 437 + }, + { + "game_id": 99, + "title": "Batman: Arkham City", + "release_date": "2011-10-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1voh.jpg", + "relevancy": 252 + }, + { + "game_id": 100, + "title": "The Binding of Isaac", + "release_date": "2011-09-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1qll.jpg", + "relevancy": 82 + }, + { + "game_id": 101, + "title": "Fez", + "release_date": "2012-04-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rd9.jpg", + "relevancy": 1 + }, + { + "game_id": 102, + "title": "Journey", + "release_date": "2012-03-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob9lk.jpg", + "relevancy": 283 + }, + { + "game_id": 103, + "title": "Hotline Miami", + "release_date": "2012-10-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1vqp.jpg", + "relevancy": 89 + }, + { + "game_id": 104, + "title": "Far Cry 3", + "release_date": "2012-11-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1vpd.jpg", + "relevancy": 371 + }, + { + "game_id": 105, + "title": "Dishonored", + "release_date": "2012-10-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coabgu.jpg", + "relevancy": 89 + }, + { + "game_id": 106, + "title": "XCOM: Enemy Unknown", + "release_date": "2012-10-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co29i2.jpg", + "relevancy": 292 + }, + { + "game_id": 107, + "title": "Borderlands 2", + "release_date": "2012-09-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9ba3.jpg", + "relevancy": 303 + }, + { + "game_id": 108, + "title": "Papers, Please", + "release_date": "2013-08-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1vep.jpg", + "relevancy": 92 + }, + { + "game_id": 109, + "title": "The Last of Us", + "release_date": "2013-06-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1r7f.jpg", + "relevancy": 482 + }, + { + "game_id": 110, + "title": "BioShock Infinite", + "release_date": "2013-03-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2n12.jpg", + "relevancy": 376 + }, + { + "game_id": 111, + "title": "Dota 2", + "release_date": "2013-07-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cod313.jpg", + "relevancy": 402 + }, + { + "game_id": 112, + "title": "The Stanley Parable", + "release_date": "2013-10-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rc9.jpg", + "relevancy": 281 + }, + { + "game_id": 113, + "title": "Payday 2", + "release_date": "2013-08-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaaqu.jpg", + "relevancy": 92 + }, + { + "game_id": 114, + "title": "The Legend of Zelda: A Link Between Worlds", + "release_date": "2013-11-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3p0j.jpg", + "relevancy": 393 + }, + { + "game_id": 115, + "title": "Super Mario 3D World", + "release_date": "2013-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob8wi.jpg", + "relevancy": 275 + }, + { + "game_id": 116, + "title": "Dark Souls II", + "release_date": "2014-03-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobysr.jpg", + "relevancy": 261 + }, + { + "game_id": 117, + "title": "Hearthstone", + "release_date": "2014-03-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1sh2.jpg", + "relevancy": 99 + }, + { + "game_id": 118, + "title": "Mario Kart 8", + "release_date": "2014-05-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co213q.jpg", + "relevancy": 415 + }, + { + "game_id": 119, + "title": "Five Nights at Freddy's", + "release_date": "2014-08-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8het.jpg", + "relevancy": 346 + }, + { + "game_id": 120, + "title": "Shovel Knight", + "release_date": "2014-06-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobaa7.jpg", + "relevancy": 99 + }, + { + "game_id": 121, + "title": "The Sims 4", + "release_date": "2014-09-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3h3l.jpg", + "relevancy": 448 + }, + { + "game_id": 122, + "title": "Alien: Isolation", + "release_date": "2014-10-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1vzu.jpg", + "relevancy": 99 + }, + { + "game_id": 123, + "title": "Dragon Age: Inquisition", + "release_date": "2014-11-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2mvy.jpg", + "relevancy": 352 + }, + { + "game_id": 124, + "title": "Bloodborne", + "release_date": "2015-03-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob99l.jpg", + "relevancy": 436 + }, + { + "game_id": 125, + "title": "Undertale", + "release_date": "2015-09-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob1t2.jpg", + "relevancy": 359 + }, + { + "game_id": 126, + "title": "Rocket League", + "release_date": "2015-07-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocyri.jpg", + "relevancy": 405 + }, + { + "game_id": 127, + "title": "Fallout 4", + "release_date": "2015-11-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1yc6.jpg", + "relevancy": 385 + }, + { + "game_id": 128, + "title": "Metal Gear Solid V: The Phantom Pain", + "release_date": "2015-09-01", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1v85.jpg", + "relevancy": 424 + }, + { + "game_id": 129, + "title": "Life Is Strange", + "release_date": "2015-01-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1r8e.jpg", + "relevancy": 290 + }, + { + "game_id": 130, + "title": "Ori and the Blind Forest", + "release_date": "2015-03-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1y41.jpg", + "relevancy": 279 + }, + { + "game_id": 131, + "title": "Cities: Skylines", + "release_date": "2015-03-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaas0.jpg", + "relevancy": 322 + }, + { + "game_id": 132, + "title": "Dying Light", + "release_date": "2015-01-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co65yq.jpg", + "relevancy": 107 + }, + { + "game_id": 133, + "title": "Splatoon", + "release_date": "2015-05-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob8ra.jpg", + "relevancy": 107 + }, + { + "game_id": 134, + "title": "Xenoblade Chronicles X", + "release_date": "2015-04-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coavor.jpg", + "relevancy": 107 + }, + { + "game_id": 135, + "title": "Overwatch", + "release_date": "2016-05-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rcb.jpg", + "relevancy": 447 + }, + { + "game_id": 136, + "title": "Doom", + "release_date": "2016-05-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1nc7.jpg", + "relevancy": 431 + }, + { + "game_id": 137, + "title": "Dark Souls III", + "release_date": "2016-03-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob9ed.jpg", + "relevancy": 266 + }, + { + "game_id": 138, + "title": "Inside", + "release_date": "2016-06-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/y3a1qpmys1a6njhi100a.jpg", + "relevancy": 117 + }, + { + "game_id": 139, + "title": "The Witness", + "release_date": "2016-01-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3hih.jpg", + "relevancy": 117 + }, + { + "game_id": 140, + "title": "Pokemon Go", + "release_date": "2016-07-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9gmb.webp", + "relevancy": 478 + }, + { + "game_id": 141, + "title": "Uncharted 4: A Thief's End", + "release_date": "2016-05-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1r7h.jpg", + "relevancy": 368 + }, + { + "game_id": 142, + "title": "Civilization VI", + "release_date": "2016-10-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaaqr.jpg", + "relevancy": 295 + }, + { + "game_id": 143, + "title": "The Last Guardian", + "release_date": "2016-12-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co271e.jpg", + "relevancy": 117 + }, + { + "game_id": 144, + "title": "Final Fantasy XV", + "release_date": "2016-11-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6nz1.jpg", + "relevancy": 413 + }, + { + "game_id": 145, + "title": "Hollow Knight", + "release_date": "2017-02-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobfzp.jpg", + "relevancy": 434 + }, + { + "game_id": 146, + "title": "PlayerUnknown's Battlegrounds", + "release_date": "2017-12-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaam4.webp", + "relevancy": 126 + }, + { + "game_id": 147, + "title": "Horizon Zero Dawn", + "release_date": "2017-02-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2una.jpg", + "relevancy": 126 + }, + { + "game_id": 148, + "title": "Super Mario Odyssey", + "release_date": "2017-10-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1mxf.jpg", + "relevancy": 459 + }, + { + "game_id": 149, + "title": "Cuphead", + "release_date": "2017-09-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co62ao.jpg", + "relevancy": 280 + }, + { + "game_id": 150, + "title": "Nier: Automata", + "release_date": "2017-02-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5pcj.jpg", + "relevancy": 126 + }, + { + "game_id": 151, + "title": "Fortnite", + "release_date": "2017-07-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5ztm.jpg", + "relevancy": 496 + }, + { + "game_id": 152, + "title": "Assassin's Creed Origins", + "release_date": "2017-10-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rbe.jpg", + "relevancy": 374 + }, + { + "game_id": 153, + "title": "Monster Hunter: World", + "release_date": "2018-01-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rst.jpg", + "relevancy": 258 + }, + { + "game_id": 154, + "title": "Super Smash Bros. Ultimate", + "release_date": "2018-12-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2255.jpg", + "relevancy": 477 + }, + { + "game_id": 155, + "title": "Celeste", + "release_date": "2018-01-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob9dh.jpg", + "relevancy": 358 + }, + { + "game_id": 156, + "title": "Dead Cells", + "release_date": "2018-08-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7jfv.jpg", + "relevancy": 278 + }, + { + "game_id": 157, + "title": "Among Us", + "release_date": "2018-06-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6kqt.jpg", + "relevancy": 445 + }, + { + "game_id": 158, + "title": "Marvel's Spider-Man", + "release_date": "2018-09-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1r77.jpg", + "relevancy": 365 + }, + { + "game_id": 159, + "title": "Assassin's Creed Odyssey", + "release_date": "2018-10-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2nul.jpg", + "relevancy": 373 + }, + { + "game_id": 160, + "title": "Detroit: Become Human", + "release_date": "2018-05-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocot9.jpg", + "relevancy": 289 + }, + { + "game_id": 161, + "title": "Apex Legends", + "release_date": "2019-02-04", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocqh2.jpg", + "relevancy": 404 + }, + { + "game_id": 162, + "title": "Sekiro: Shadows Die Twice", + "release_date": "2019-03-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2a23.jpg", + "relevancy": 362 + }, + { + "game_id": 163, + "title": "Resident Evil 2", + "release_date": "2019-01-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1ir3.jpg", + "relevancy": 262 + }, + { + "game_id": 164, + "title": "Disco Elysium", + "release_date": "2019-10-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1sfj.jpg", + "relevancy": 357 + }, + { + "game_id": 165, + "title": "Fire Emblem: Three Houses", + "release_date": "2019-07-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1n8t.jpg", + "relevancy": 152 + }, + { + "game_id": 166, + "title": "Luigi's Mansion 3", + "release_date": "2019-10-31", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co22a9.jpg", + "relevancy": 237 + }, + { + "game_id": 167, + "title": "Control", + "release_date": "2019-08-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2evj.jpg", + "relevancy": 152 + }, + { + "game_id": 168, + "title": "Death Stranding", + "release_date": "2019-11-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocsvh.jpg", + "relevancy": 152 + }, + { + "game_id": 169, + "title": "The Outer Worlds", + "release_date": "2019-10-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2eew.jpg", + "relevancy": 152 + }, + { + "game_id": 170, + "title": "Call of Duty: Modern Warfare", + "release_date": "2019-10-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rsg.jpg", + "relevancy": 306 + }, + { + "game_id": 171, + "title": "Animal Crossing: New Horizons", + "release_date": "2020-03-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3wls.jpg", + "relevancy": 481 + }, + { + "game_id": 172, + "title": "The Last of Us Part II", + "release_date": "2020-06-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5ziw.jpg", + "relevancy": 427 + }, + { + "game_id": 173, + "title": "Hades", + "release_date": "2020-09-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob9kr.jpg", + "relevancy": 360 + }, + { + "game_id": 174, + "title": "Doom Eternal", + "release_date": "2020-03-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3p5n.jpg", + "relevancy": 162 + }, + { + "game_id": 175, + "title": "Cyberpunk 2077", + "release_date": "2020-12-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaih8.jpg", + "relevancy": 444 + }, + { + "game_id": 176, + "title": "Ghost of Tsushima", + "release_date": "2020-07-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2crj.jpg", + "relevancy": 162 + }, + { + "game_id": 177, + "title": "Microsoft Flight Simulator", + "release_date": "2020-08-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2dqk.jpg", + "relevancy": 162 + }, + { + "game_id": 178, + "title": "Genshin Impact", + "release_date": "2020-09-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_original/coa9dy.webp", + "relevancy": 403 + }, + { + "game_id": 179, + "title": "Fall Guys", + "release_date": "2020-08-04", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa7cs.jpg", + "relevancy": 341 + }, + { + "game_id": 180, + "title": "It Takes Two", + "release_date": "2021-03-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobvya.jpg", + "relevancy": 340 + }, + { + "game_id": 181, + "title": "Resident Evil Village", + "release_date": "2021-05-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coab9q.jpg", + "relevancy": 267 + }, + { + "game_id": 182, + "title": "Forza Horizon 5", + "release_date": "2021-11-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3ofx.jpg", + "relevancy": 246 + }, + { + "game_id": 183, + "title": "Metroid Dread", + "release_date": "2021-10-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co935n.jpg", + "relevancy": 388 + }, + { + "game_id": 184, + "title": "Psychonauts 2", + "release_date": "2021-08-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob7mx.jpg", + "relevancy": 169 + }, + { + "game_id": 185, + "title": "Ratchet & Clank: Rift Apart", + "release_date": "2021-06-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2str.jpg", + "relevancy": 169 + }, + { + "game_id": 186, + "title": "Halo Infinite", + "release_date": "2021-12-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2dto.jpg", + "relevancy": 386 + }, + { + "game_id": 187, + "title": "Returnal", + "release_date": "2021-04-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3wc1.jpg", + "relevancy": 169 + }, + { + "game_id": 188, + "title": "Monster Hunter Rise", + "release_date": "2021-03-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3uzk.jpg", + "relevancy": 256 + }, + { + "game_id": 189, + "title": "God of War Ragnarök", + "release_date": "2022-11-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coba3d.jpg", + "relevancy": 428 + }, + { + "game_id": 190, + "title": "Horizon Forbidden West", + "release_date": "2022-02-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2gvu.jpg", + "relevancy": 177 + }, + { + "game_id": 191, + "title": "Stray", + "release_date": "2022-07-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4tt2.jpg", + "relevancy": 177 + }, + { + "game_id": 192, + "title": "Vampire Survivors", + "release_date": "2022-10-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4bzv.jpg", + "relevancy": 277 + }, + { + "game_id": 193, + "title": "Marvel's Midnight Suns", + "release_date": "2022-12-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3ofr.jpg", + "relevancy": 177 + }, + { + "game_id": 194, + "title": "Xenoblade Chronicles 3", + "release_date": "2022-07-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4ocq.jpg", + "relevancy": 177 + }, + { + "game_id": 195, + "title": "Cult of the Lamb", + "release_date": "2022-08-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobbwj.jpg", + "relevancy": 177 + }, + { + "game_id": 196, + "title": "Overwatch 2", + "release_date": "2022-10-04", + "picture": "https://m.media-amazon.com/images/M/MV5BOGMxODVmNDgtZGE1Yy00Y2VlLTk3ZTMtYzU5YTcxODhiNzMxXkEyXkFqcGc@._V1_.jpg", + "relevancy": 177 + }, + { + "game_id": 197, + "title": "Call of Duty: Modern Warfare II", + "release_date": "2022-10-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4sbw.jpg", + "relevancy": 305 + }, + { + "game_id": 198, + "title": "Hogwarts Legacy", + "release_date": "2023-02-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaav6.jpg", + "relevancy": 443 + }, + { + "game_id": 199, + "title": "The Legend of Zelda: Tears of the Kingdom", + "release_date": "2023-05-12", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5vmg.jpg", + "relevancy": 460 + }, + { + "game_id": 200, + "title": "Alan Wake 2", + "release_date": "2023-10-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6jar.jpg", + "relevancy": 190 + }, + { + "game_id": 201, + "title": "Super Mario Bros. Wonder", + "release_date": "2023-10-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6nnl.jpg", + "relevancy": 420 + }, + { + "game_id": 202, + "title": "Marvel's Spider-Man 2", + "release_date": "2023-10-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobg1k.jpg", + "relevancy": 364 + }, + { + "game_id": 203, + "title": "Lethal Company", + "release_date": "2023-10-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5ive.jpg", + "relevancy": 268 + }, + { + "game_id": 204, + "title": "Dave the Diver", + "release_date": "2023-06-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocdlv.jpg", + "relevancy": 273 + }, + { + "game_id": 205, + "title": "Street Fighter 6", + "release_date": "2023-06-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9wxo.jpg", + "relevancy": 409 + }, + { + "game_id": 206, + "title": "Resident Evil 4 (2023)", + "release_date": "2023-03-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/co6bo0.jpg", + "relevancy": 269 + }, + { + "game_id": 207, + "title": "Armored Core VI: Fires of Rubicon", + "release_date": "2023-08-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coc408.jpg", + "relevancy": 190 + }, + { + "game_id": 208, + "title": "Starfield", + "release_date": "2023-09-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co39vv.jpg", + "relevancy": 190 + }, + { + "game_id": 209, + "title": "The Finals", + "release_date": "2023-12-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/cod6ev.jpg", + "relevancy": 190 + }, + { + "game_id": 210, + "title": "Palworld", + "release_date": "2024-01-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7n02.jpg", + "relevancy": 263 + }, + { + "game_id": 211, + "title": "Helldivers 2", + "release_date": "2024-02-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coabbf.jpg", + "relevancy": 260 + }, + { + "game_id": 212, + "title": "Super Metroid", + "release_date": "1994-03-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5osy.jpg", + "relevancy": 391 + }, + { + "game_id": 213, + "title": "Yoshi's Island", + "release_date": "1995-08-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_original/co2kn9.webp", + "relevancy": 222 + }, + { + "game_id": 214, + "title": "EarthBound", + "release_date": "1994-08-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6v07.jpg", + "relevancy": 221 + }, + { + "game_id": 215, + "title": "Secret of Mana", + "release_date": "1993-08-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2u6w.jpg", + "relevancy": 218 + }, + { + "game_id": 216, + "title": "Suikoden II", + "release_date": "1998-12-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1y6a.jpg", + "relevancy": 217 + }, + { + "game_id": 217, + "title": "Vagrant Story", + "release_date": "2000-02-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2rso.jpg", + "relevancy": 9 + }, + { + "game_id": 218, + "title": "Parasite Eve", + "release_date": "1998-03-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4pup.jpg", + "relevancy": 166 + }, + { + "game_id": 219, + "title": "Xenogears", + "release_date": "1998-02-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobxj4.jpg", + "relevancy": 216 + }, + { + "game_id": 220, + "title": "Planescape: Torment", + "release_date": "1999-12-12", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3ggb.jpg", + "relevancy": 215 + }, + { + "game_id": 221, + "title": "System Shock 2", + "release_date": "1999-08-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4bak.jpg", + "relevancy": 213 + }, + { + "game_id": 222, + "title": "Thief: The Dark Project", + "release_date": "1998-11-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co22ne.jpg", + "relevancy": 212 + }, + { + "game_id": 223, + "title": "Unreal Tournament", + "release_date": "1999-11-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1i2j.jpg", + "relevancy": 211 + }, + { + "game_id": 224, + "title": "Quake III Arena", + "release_date": "1999-12-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1ybj.jpg", + "relevancy": 210 + }, + { + "game_id": 225, + "title": "EverQuest", + "release_date": "1999-03-16", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6k7i.jpg", + "relevancy": 209 + }, + { + "game_id": 226, + "title": "Homeworld", + "release_date": "1999-09-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coc6i8.jpg", + "relevancy": 207 + }, + { + "game_id": 227, + "title": "Age of Empires II", + "release_date": "1999-09-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_original/co55xo.webp", + "relevancy": 296 + }, + { + "game_id": 228, + "title": "Command & Conquer: Red Alert 2", + "release_date": "2000-10-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coar4c.jpg", + "relevancy": 206 + }, + { + "game_id": 229, + "title": "Baldur's Gate II: Shadows of Amn", + "release_date": "2000-09-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co71yr.jpg", + "relevancy": 9 + }, + { + "game_id": 230, + "title": "The Legend of Zelda: Majora's Mask", + "release_date": "2000-04-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3pah.jpg", + "relevancy": 396 + }, + { + "game_id": 231, + "title": "Perfect Dark", + "release_date": "2000-05-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co77xv.jpg", + "relevancy": 205 + }, + { + "game_id": 232, + "title": "Jet Set Radio", + "release_date": "2000-06-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobxjl.jpg", + "relevancy": 182 + }, + { + "game_id": 233, + "title": "Crazy Taxi", + "release_date": "1999-02-01", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7jt6.jpg", + "relevancy": 159 + }, + { + "game_id": 234, + "title": "Tony Hawk's Pro Skater 3", + "release_date": "2001-10-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6ss7.jpg", + "relevancy": 19 + }, + { + "game_id": 235, + "title": "Gran Turismo 3: A-Spec", + "release_date": "2001-04-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5xru.jpg", + "relevancy": 19 + }, + { + "game_id": 236, + "title": "Advance Wars", + "release_date": "2001-09-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob9nu.jpg", + "relevancy": 19 + }, + { + "game_id": 237, + "title": "Max Payne", + "release_date": "2001-07-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co926i.jpg", + "relevancy": 19 + }, + { + "game_id": 238, + "title": "Silent Hill 2", + "release_date": "2001-09-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2vyg.jpg", + "relevancy": 19 + }, + { + "game_id": 239, + "title": "Jak and Daxter: The Precursor Legacy", + "release_date": "2001-12-03", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1w7q.jpg", + "relevancy": 19 + }, + { + "game_id": 240, + "title": "Ikaruga", + "release_date": "2001-12-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1qjb.jpg", + "relevancy": 19 + }, + { + "game_id": 241, + "title": "Rez", + "release_date": "2001-11-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobyl9.jpg", + "relevancy": 19 + }, + { + "game_id": 242, + "title": "Kingdom Hearts", + "release_date": "2002-03-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co30zf.jpg", + "relevancy": 247 + }, + { + "game_id": 243, + "title": "Mafia: The City of Lost Heaven", + "release_date": "2002-08-29", + "picture": "https://m.media-amazon.com/images/M/MV5BZGVlNzgwMWItZGU4Zi00ZWQ0LWJmZjctZGM2NmNlZmVmNmE3XkEyXkFqcGc@._V1_.jpg", + "relevancy": 28 + }, + { + "game_id": 244, + "title": "Neverwinter Nights", + "release_date": "2002-06-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1t13.jpg", + "relevancy": 28 + }, + { + "game_id": 245, + "title": "Medal of Honor: Allied Assault", + "release_date": "2002-01-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7nlr.jpg", + "relevancy": 28 + }, + { + "game_id": 246, + "title": "Battlefield 1942", + "release_date": "2002-09-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1xb2.jpg", + "relevancy": 28 + }, + { + "game_id": 247, + "title": "Tom Clancy's Splinter Cell", + "release_date": "2002-11-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co95ri.jpg", + "relevancy": 28 + }, + { + "game_id": 248, + "title": "The Sims 2", + "release_date": "2004-09-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3dm5.jpg", + "relevancy": 254 + }, + { + "game_id": 249, + "title": "Fable", + "release_date": "2004-09-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2q4c.jpg", + "relevancy": 41 + }, + { + "game_id": 250, + "title": "Rome: Total War", + "release_date": "2004-09-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1zt9.jpg", + "relevancy": 41 + }, + { + "game_id": 251, + "title": "Katamari Damacy", + "release_date": "2004-03-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co67mq.jpg", + "relevancy": 111 + }, + { + "game_id": 252, + "title": "Burnout 3: Takedown", + "release_date": "2004-09-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1y53.jpg", + "relevancy": 87 + }, + { + "game_id": 253, + "title": "Paper Mario: The Thousand-Year Door", + "release_date": "2004-07-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co25us.jpg", + "relevancy": 69 + }, + { + "game_id": 254, + "title": "Viewtiful Joe", + "release_date": "2003-06-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6nqo.jpg", + "relevancy": 36 + }, + { + "game_id": 255, + "title": "Psychonauts", + "release_date": "2005-04-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob7ms.jpg", + "relevancy": 43 + }, + { + "game_id": 256, + "title": "Killer7", + "release_date": "2005-06-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobw10.jpg", + "relevancy": 47 + }, + { + "game_id": 257, + "title": "Civilization IV", + "release_date": "2005-10-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rjp.webp", + "relevancy": 294 + }, + { + "game_id": 258, + "title": "Guild Wars", + "release_date": "2005-04-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coay80.jpg", + "relevancy": 47 + }, + { + "game_id": 259, + "title": "Dragon Quest VIII", + "release_date": "2004-11-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_original/co7vf2.webp", + "relevancy": 250 + }, + { + "game_id": 260, + "title": "Mario Kart DS", + "release_date": "2005-11-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob9rx.jpg", + "relevancy": 264 + }, + { + "game_id": 261, + "title": "Ōkami", + "release_date": "2006-04-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3mpk.jpg", + "relevancy": 53 + }, + { + "game_id": 262, + "title": "Company of Heroes", + "release_date": "2006-09-12", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2ht7.jpg", + "relevancy": 7 + }, + { + "game_id": 263, + "title": "The Legend of Zelda: Phantom Hourglass", + "release_date": "2007-06-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3ocu.jpg", + "relevancy": 272 + }, + { + "game_id": 264, + "title": "Crackdown", + "release_date": "2007-02-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1w65.jpg", + "relevancy": 59 + }, + { + "game_id": 265, + "title": "S.T.A.L.K.E.R.: Shadow of Chernobyl", + "release_date": "2007-03-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa4s4.jpg", + "relevancy": 6 + }, + { + "game_id": 266, + "title": "Team Fortress 2", + "release_date": "2007-10-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6rzl.jpg", + "relevancy": 308 + }, + { + "game_id": 267, + "title": "Crysis", + "release_date": "2007-11-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2on1.jpg", + "relevancy": 59 + }, + { + "game_id": 268, + "title": "The Orange Box", + "release_date": "2007-10-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2yez.jpg", + "relevancy": 307 + }, + { + "game_id": 269, + "title": "Patapon", + "release_date": "2007-12-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobe8f.jpg", + "relevancy": 59 + }, + { + "game_id": 270, + "title": "No More Heroes", + "release_date": "2007-12-06", + "picture": "https://m.media-amazon.com/images/M/MV5BYzNhODIxZTQtZTdkZC00ZTZkLThlN2YtZDhhMTVmMTAyMTAwXkEyXkFqcGc@._V1_.jpg", + "relevancy": 59 + }, + { + "game_id": 271, + "title": "Valkyria Chronicles", + "release_date": "2008-04-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/bvmjjiorjpcclmdorauw.jpg", + "relevancy": 65 + }, + { + "game_id": 272, + "title": "Persona 4", + "release_date": "2008-07-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1u07.jpg", + "relevancy": 354 + }, + { + "game_id": 273, + "title": "Dead Space 2", + "release_date": "2011-01-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co715m.jpg", + "relevancy": 82 + }, + { + "game_id": 274, + "title": "F.E.A.R.", + "release_date": "2005-10-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1utk.jpg", + "relevancy": 47 + }, + { + "game_id": 275, + "title": "Mirror's Edge", + "release_date": "2008-11-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5gbw.jpg", + "relevancy": 5 + }, + { + "game_id": 276, + "title": "Left 4 Dead 2", + "release_date": "2009-11-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1y2f.jpg", + "relevancy": 309 + }, + { + "game_id": 277, + "title": "Dragon Age: Origins", + "release_date": "2009-11-03", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2mvs.jpg", + "relevancy": 353 + }, + { + "game_id": 278, + "title": "Dawn of War II", + "release_date": "2009-02-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3lu2.webp", + "relevancy": 71 + }, + { + "game_id": 279, + "title": "Plants vs. Zombies", + "release_date": "2009-05-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co70j6.jpg", + "relevancy": 343 + }, + { + "game_id": 280, + "title": "Bayonetta", + "release_date": "2009-10-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8nf4.jpg", + "relevancy": 71 + }, + { + "game_id": 281, + "title": "Forza Motorsport 3", + "release_date": "2009-10-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co91qf.jpg", + "relevancy": 240 + }, + { + "game_id": 282, + "title": "L.A. Noire", + "release_date": "2011-05-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2ldn.jpg", + "relevancy": 82 + }, + { + "game_id": 283, + "title": "Saints Row: The Third", + "release_date": "2011-11-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2634.jpg", + "relevancy": 82 + }, + { + "game_id": 284, + "title": "Deus Ex: Human Revolution", + "release_date": "2011-08-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rd2.jpg", + "relevancy": 82 + }, + { + "game_id": 285, + "title": "The Witcher 2: Assassins of Kings", + "release_date": "2011-05-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1wy4.jpg", + "relevancy": 381 + }, + { + "game_id": 286, + "title": "Dead Island", + "release_date": "2011-09-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3lym.jpg", + "relevancy": 82 + }, + { + "game_id": 287, + "title": "Rayman Origins", + "release_date": "2011-11-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1v7k.jpg", + "relevancy": 82 + }, + { + "game_id": 288, + "title": "The Walking Dead: Season Two", + "release_date": "2013-12-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2k36.jpg", + "relevancy": 92 + }, + { + "game_id": 289, + "title": "Far Cry 4", + "release_date": "2014-11-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2npa.jpg", + "relevancy": 370 + }, + { + "game_id": 290, + "title": "Middle-earth: Shadow of Mordor", + "release_date": "2014-09-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co20pd.jpg", + "relevancy": 99 + }, + { + "game_id": 291, + "title": "Darkest Dungeon", + "release_date": "2016-01-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaaw2.jpg", + "relevancy": 117 + }, + { + "game_id": 292, + "title": "The Talos Principle", + "release_date": "2014-12-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rb5.jpg", + "relevancy": 99 + }, + { + "game_id": 293, + "title": "Alien Swarm", + "release_date": "2010-07-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2sj5.jpg", + "relevancy": 76 + }, + { + "game_id": 294, + "title": "The Crew", + "release_date": "2014-12-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2jtc.jpg", + "relevancy": 99 + }, + { + "game_id": 295, + "title": "Until Dawn", + "release_date": "2015-08-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2s5q.jpg", + "relevancy": 107 + }, + { + "game_id": 296, + "title": "Splatoon 2", + "release_date": "2017-07-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob8r9.jpg", + "relevancy": 126 + }, + { + "game_id": 297, + "title": "Persona 5", + "release_date": "2016-09-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1r76.jpg", + "relevancy": 356 + }, + { + "game_id": 298, + "title": "Firewatch", + "release_date": "2016-02-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob1ts.jpg", + "relevancy": 288 + }, + { + "game_id": 299, + "title": "The Banner Saga", + "release_date": "2014-01-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co27ah.jpg", + "relevancy": 99 + }, + { + "game_id": 300, + "title": "Divinity: Original Sin", + "release_date": "2014-06-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2axn.jpg", + "relevancy": 99 + }, + { + "game_id": 301, + "title": "Divinity: Original Sin 2", + "release_date": "2017-09-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1y5v.jpg", + "relevancy": 351 + }, + { + "game_id": 302, + "title": "Thumper", + "release_date": "2016-10-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1z4e.jpg", + "relevancy": 117 + }, + { + "game_id": 303, + "title": "Nioh", + "release_date": "2017-02-07", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co20xg.jpg", + "relevancy": 126 + }, + { + "game_id": 304, + "title": "Prey", + "release_date": "2017-05-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9aoh.jpg", + "relevancy": 126 + }, + { + "game_id": 305, + "title": "What Remains of Edith Finch", + "release_date": "2017-04-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1rbj.jpg", + "relevancy": 286 + }, + { + "game_id": 306, + "title": "Night in the Woods", + "release_date": "2017-01-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4ovg.jpg", + "relevancy": 126 + }, + { + "game_id": 307, + "title": "Injustice 2", + "release_date": "2017-05-16", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1xym.jpg", + "relevancy": 126 + }, + { + "game_id": 308, + "title": "Tekken 7", + "release_date": "2015-03-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobq31.jpg", + "relevancy": 407 + }, + { + "game_id": 309, + "title": "Divinity: Original Sin 2 - Definitive Edition", + "release_date": "2018-08-31", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1y5o.jpg", + "relevancy": 138 + }, + { + "game_id": 310, + "title": "A Way Out", + "release_date": "2018-03-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1vca.jpg", + "relevancy": 138 + }, + { + "game_id": 311, + "title": "Frostpunk", + "release_date": "2018-04-24", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coar27.jpg", + "relevancy": 138 + }, + { + "game_id": 312, + "title": "Subnautica", + "release_date": "2018-01-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa938.jpg", + "relevancy": 339 + }, + { + "game_id": 313, + "title": "Into the Breach", + "release_date": "2018-02-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2gjp.jpg", + "relevancy": 138 + }, + { + "game_id": 314, + "title": "Return of the Obra Dinn", + "release_date": "2018-10-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co27j9.jpg", + "relevancy": 284 + }, + { + "game_id": 315, + "title": "Gris", + "release_date": "2018-12-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1qv5.jpg", + "relevancy": 138 + }, + { + "game_id": 316, + "title": "Tetris Effect", + "release_date": "2018-11-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2kfy.jpg", + "relevancy": 138 + }, + { + "game_id": 317, + "title": "Forza Horizon 4", + "release_date": "2018-10-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2e1a.jpg", + "relevancy": 244 + }, + { + "game_id": 318, + "title": "Dragon Ball FighterZ", + "release_date": "2018-01-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1nih.jpg", + "relevancy": 255 + }, + { + "game_id": 319, + "title": "Octopath Traveler", + "release_date": "2018-07-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocj93.jpg", + "relevancy": 138 + }, + { + "game_id": 320, + "title": "The Messenger", + "release_date": "2018-08-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cob1th.jpg", + "relevancy": 138 + }, + { + "game_id": 321, + "title": "Katana ZERO", + "release_date": "2019-04-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1isp.jpg", + "relevancy": 152 + }, + { + "game_id": 322, + "title": "Outer Wilds", + "release_date": "2019-05-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co65ac.jpg", + "relevancy": 285 + }, + { + "game_id": 323, + "title": "Slay the Spire", + "release_date": "2019-01-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1iyf.jpg", + "relevancy": 349 + }, + { + "game_id": 324, + "title": "Baba Is You", + "release_date": "2019-03-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2hqt.jpg", + "relevancy": 152 + }, + { + "game_id": 325, + "title": "A Plague Tale: Innocence", + "release_date": "2019-05-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1lat.jpg", + "relevancy": 152 + }, + { + "game_id": 326, + "title": "Sayonara Wild Hearts", + "release_date": "2019-09-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2gx1.jpg", + "relevancy": 152 + }, + { + "game_id": 327, + "title": "The Legend of Zelda: Link's Awakening", + "release_date": "1993-06-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co3nnt.jpg", + "relevancy": 394 + }, + { + "game_id": 328, + "title": "Pokemon Gold/Silver", + "release_date": "1999-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4yy8.webp", + "relevancy": 468 + }, + { + "game_id": 329, + "title": "Pokemon Ruby/Sapphire", + "release_date": "2002-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/co1zhq.jpg", + "relevancy": 466 + }, + { + "game_id": 330, + "title": "Pokemon Diamond/Pearl", + "release_date": "2006-09-28", + "picture": "https://images.igdb.com/igdb/image/upload/t_original/cob6em.webp", + "relevancy": 465 + }, + { + "game_id": 331, + "title": "Pokemon Black/White", + "release_date": "2010-09-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/co1z21.jpg", + "relevancy": 464 + }, + { + "game_id": 332, + "title": "Pokemon X/Y", + "release_date": "2013-10-12", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1z8y.webp", + "relevancy": 462 + }, + { + "game_id": 333, + "title": "Pokemon Sun/Moon", + "release_date": "2016-11-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/co3co8.jpg", + "relevancy": 274 + }, + { + "game_id": 334, + "title": "Pokemon Sword/Shield", + "release_date": "2019-11-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa2k2.webp", + "relevancy": 467 + }, + { + "game_id": 335, + "title": "Pokemon Scarlet/Violet", + "release_date": "2022-11-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/co5shr.jpg", + "relevancy": 470 + }, + { + "game_id": 336, + "title": "Kirby Super Star", + "release_date": "1996-03-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4qyi.jpg", + "relevancy": 226 + }, + { + "game_id": 337, + "title": "Kirby and the Forgotten Land", + "release_date": "2022-03-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4yjz.jpg", + "relevancy": 227 + }, + { + "game_id": 338, + "title": "Donkey Kong Country 2: Diddy's Kong Quest", + "release_date": "1995-11-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co217m.jpg", + "relevancy": 224 + }, + { + "game_id": 339, + "title": "Donkey Kong Country: Tropical Freeze", + "release_date": "2014-02-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1wf2.jpg", + "relevancy": 223 + }, + { + "game_id": 340, + "title": "Pikmin", + "release_date": "2001-10-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6nqg.jpg", + "relevancy": 233 + }, + { + "game_id": 341, + "title": "Pikmin 2", + "release_date": "2004-04-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5y6q.jpg", + "relevancy": 229 + }, + { + "game_id": 342, + "title": "Pikmin 3", + "release_date": "2013-07-13", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1p9e.jpg", + "relevancy": 228 + }, + { + "game_id": 343, + "title": "Luigi's Mansion", + "release_date": "2001-09-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1wr1.jpg", + "relevancy": 238 + }, + { + "game_id": 344, + "title": "WarioWare, Inc.: Mega Microgame$!", + "release_date": "2003-03-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9paw.jpg", + "relevancy": 36 + }, + { + "game_id": 345, + "title": "Rhythm Heaven", + "release_date": "2006-08-03", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobx93.jpg", + "relevancy": 53 + }, + { + "game_id": 346, + "title": "Professor Layton and the Curious Village", + "release_date": "2007-02-15", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coc6k5.jpg", + "relevancy": 239 + }, + { + "game_id": 347, + "title": "Ghost Trick: Phantom Detective", + "release_date": "2010-06-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2yj9.jpg", + "relevancy": 241 + }, + { + "game_id": 348, + "title": "Phoenix Wright: Ace Attorney", + "release_date": "2001-10-12", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5w3h.jpg", + "relevancy": 245 + }, + { + "game_id": 349, + "title": "Danganronpa: Trigger Happy Havoc", + "release_date": "2010-11-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1n1w.jpg", + "relevancy": 243 + }, + { + "game_id": 350, + "title": "Zero Escape: Nine Hours, Nine Persons, Nine Doors", + "release_date": "2009-12-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big_2x/co4hsz.jpg", + "relevancy": 71 + }, + { + "game_id": 351, + "title": "The House in Fata Morgana", + "release_date": "2010-12-31", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co23cn.jpg", + "relevancy": 76 + }, + { + "game_id": 352, + "title": "Doki Doki Literature Club!", + "release_date": "2017-09-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6p5e.jpg", + "relevancy": 345 + }, + { + "game_id": 353, + "title": "Inscryption", + "release_date": "2021-10-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co401c.jpg", + "relevancy": 347 + }, + { + "game_id": 354, + "title": "Balatro", + "release_date": "2024-02-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9f4g.jpg", + "relevancy": 348 + }, + { + "game_id": 355, + "title": "Animal Well", + "release_date": "2024-05-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4hdh.jpg", + "relevancy": 201 + }, + { + "game_id": 356, + "title": "Cocoon", + "release_date": "2023-09-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4v2z.jpg", + "relevancy": 190 + }, + { + "game_id": 357, + "title": "Chants of Sennaar", + "release_date": "2023-09-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9mjo.jpg", + "relevancy": 190 + }, + { + "game_id": 358, + "title": "The Talos Principle 2", + "release_date": "2023-11-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6jbl.jpg", + "relevancy": 190 + }, + { + "game_id": 359, + "title": "Sea of Stars", + "release_date": "2023-08-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co215b.jpg", + "relevancy": 190 + }, + { + "game_id": 360, + "title": "Dredge", + "release_date": "2023-03-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9kyk.jpg", + "relevancy": 190 + }, + { + "game_id": 361, + "title": "Hi-Fi Rush", + "release_date": "2023-01-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6219.jpg", + "relevancy": 190 + }, + { + "game_id": 362, + "title": "Lies of P", + "release_date": "2023-09-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6lxr.jpg", + "relevancy": 190 + }, + { + "game_id": 363, + "title": "Remnant II", + "release_date": "2023-07-25", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6lnp.jpg", + "relevancy": 190 + }, + { + "game_id": 364, + "title": "Warhammer 40,000: Space Marine 2", + "release_date": "2024-09-09", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5vab.jpg", + "relevancy": 235 + }, + { + "game_id": 365, + "title": "Tekken 8", + "release_date": "2024-01-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7lbb.jpg", + "relevancy": 408 + }, + { + "game_id": 366, + "title": "Like a Dragon: Infinite Wealth", + "release_date": "2024-01-26", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8356.jpg", + "relevancy": 201 + }, + { + "game_id": 367, + "title": "Persona 3 Reload", + "release_date": "2024-02-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coc4jz.jpg", + "relevancy": 257 + }, + { + "game_id": 368, + "title": "Unicorn Overlord", + "release_date": "2024-03-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7310.jpg", + "relevancy": 201 + }, + { + "game_id": 369, + "title": "Prince of Persia: The Lost Crown", + "release_date": "2024-01-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6lli.jpg", + "relevancy": 201 + }, + { + "game_id": 370, + "title": "Thank Goodness You're Here!", + "release_date": "2024-08-01", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6yyq.jpg", + "relevancy": 201 + }, + { + "game_id": 371, + "title": "UFO 50", + "release_date": "2024-09-18", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co24v0.jpg", + "relevancy": 201 + }, + { + "game_id": 372, + "title": "Satisfactory", + "release_date": "2024-09-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8tfy.jpg", + "relevancy": 324 + }, + { + "game_id": 373, + "title": "Factorio", + "release_date": "2020-08-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1tfy.jpg", + "relevancy": 326 + }, + { + "game_id": 374, + "title": "RimWorld", + "release_date": "2018-10-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaaqj.jpg", + "relevancy": 325 + }, + { + "game_id": 375, + "title": "Oxygen Not Included", + "release_date": "2019-07-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7ugt.jpg", + "relevancy": 152 + }, + { + "game_id": 376, + "title": "Kerbal Space Program", + "release_date": "2015-04-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co26n5.jpg", + "relevancy": 319 + }, + { + "game_id": 377, + "title": "Euro Truck Simulator 2", + "release_date": "2012-10-19", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7et5.jpg", + "relevancy": 323 + }, + { + "game_id": 378, + "title": "American Truck Simulator", + "release_date": "2016-02-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1mw8.jpg", + "relevancy": 117 + }, + { + "game_id": 379, + "title": "Planet Coaster", + "release_date": "2016-11-17", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8y08.jpg", + "relevancy": 320 + }, + { + "game_id": 380, + "title": "Planet Zoo", + "release_date": "2019-11-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8zii.jpg", + "relevancy": 152 + }, + { + "game_id": 381, + "title": "Two Point Hospital", + "release_date": "2018-08-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co235d.jpg", + "relevancy": 138 + }, + { + "game_id": 382, + "title": "RollerCoaster Tycoon", + "release_date": "1999-03-31", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2r6q.jpg", + "relevancy": 172 + }, + { + "game_id": 383, + "title": "Football Manager 2024", + "release_date": "2023-11-06", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co73z1.jpg", + "relevancy": 315 + }, + { + "game_id": 384, + "title": "FIFA 23", + "release_date": "2022-09-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4zw5.jpg", + "relevancy": 318 + }, + { + "game_id": 385, + "title": "NBA 2K24", + "release_date": "2023-09-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co8m0s.jpg", + "relevancy": 317 + }, + { + "game_id": 386, + "title": "WWE 2K24", + "release_date": "2024-03-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7nta.jpg", + "relevancy": 232 + }, + { + "game_id": 387, + "title": "Tony Hawk's Pro Skater 1 + 2", + "release_date": "2020-09-04", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co25u7.jpg", + "relevancy": 311 + }, + { + "game_id": 388, + "title": "Gran Turismo 7", + "release_date": "2022-03-04", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2g84.jpg", + "relevancy": 314 + }, + { + "game_id": 389, + "title": "Forza Motorsport", + "release_date": "2023-10-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6lzd.jpg", + "relevancy": 249 + }, + { + "game_id": 390, + "title": "F1 23", + "release_date": "2023-06-16", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6g3a.jpg", + "relevancy": 234 + }, + { + "game_id": 391, + "title": "Trackmania", + "release_date": "2020-07-01", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobh9g.jpg", + "relevancy": 162 + }, + { + "game_id": 392, + "title": "Need for Speed: Most Wanted", + "release_date": "2005-11-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co6b1g.jpg", + "relevancy": 313 + }, + { + "game_id": 393, + "title": "Burnout Paradise", + "release_date": "2008-01-22", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co28p7.jpg", + "relevancy": 65 + }, + { + "game_id": 394, + "title": "SSX 3", + "release_date": "2003-10-20", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa2it.jpg", + "relevancy": 36 + }, + { + "game_id": 395, + "title": "F1 2020", + "release_date": "2020-07-10", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co2kts.jpg", + "relevancy": 230 + }, + { + "game_id": 396, + "title": "This War of Mine", + "release_date": "2014-11-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co4ktl.jpg", + "relevancy": 99 + }, + { + "game_id": 397, + "title": "Don't Starve", + "release_date": "2013-04-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1qqw.jpg", + "relevancy": 328 + }, + { + "game_id": 398, + "title": "Don't Starve Together", + "release_date": "2016-04-21", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaaqp.jpg", + "relevancy": 329 + }, + { + "game_id": 399, + "title": "Valheim", + "release_date": "2021-02-02", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cocygu.jpg", + "relevancy": 337 + }, + { + "game_id": 400, + "title": "The Forest", + "release_date": "2014-05-30", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobf9x.jpg", + "relevancy": 332 + }, + { + "game_id": 401, + "title": "Sons of the Forest", + "release_date": "2023-02-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/cobyfc.jpg", + "relevancy": 331 + }, + { + "game_id": 402, + "title": "Green Hell", + "release_date": "2019-09-05", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co9d3h.jpg", + "relevancy": 152 + }, + { + "game_id": 403, + "title": "Project Zomboid", + "release_date": "2013-11-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co7kod.jpg", + "relevancy": 334 + }, + { + "game_id": 404, + "title": "DayZ", + "release_date": "2013-12-16", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coaaqs.jpg", + "relevancy": 330 + }, + { + "game_id": 405, + "title": "Rust", + "release_date": "2013-12-11", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coajjj.jpg", + "relevancy": 336 + }, + { + "game_id": 406, + "title": "ARK: Survival Evolved", + "release_date": "2017-08-29", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co493k.jpg", + "relevancy": 335 + }, + { + "game_id": 407, + "title": "Conan Exiles", + "release_date": "2018-05-08", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/coa90l.jpg", + "relevancy": 138 + }, + { + "game_id": 408, + "title": "Grounded", + "release_date": "2022-09-27", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co5d1l.jpg", + "relevancy": 177 + }, + { + "game_id": 409, + "title": "Raft", + "release_date": "2018-05-23", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1xdc.jpg", + "relevancy": 138 + }, + { + "game_id": 410, + "title": "The Long Dark", + "release_date": "2017-08-01", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co1vga.jpg", + "relevancy": 126 + }, + { + "game_id": 411, + "title": "Subnautica: Below Zero", + "release_date": "2021-05-14", + "picture": "https://images.igdb.com/igdb/image/upload/t_cover_big/co39ve.jpg", + "relevancy": 169 + } + ] +} \ No newline at end of file diff --git a/backend/data/games.txt b/backend/data/games.txt new file mode 100644 index 0000000..1ea0755 --- /dev/null +++ b/backend/data/games.txt @@ -0,0 +1,412 @@ +Total: 411 +New Super Mario Bros. Wii, 414 +Minecraft, 500 +Grand Theft Auto V, 499 +The Witcher 3: Wild Hunt, 487 +Red Dead Redemption 2, 492 +Elden Ring, 485 +The Legend of Zelda: Breath of the Wild, 498 +Mario Kart 8 Deluxe, 490 +Terraria, 483 +Stardew Valley, 488 +The Elder Scrolls V: Skyrim, 489 +Baldur's Gate 3, 484 +Tetris, 495 +Super Mario Bros., 494 +The Legend of Zelda, 400 +Metroid, 392 +Final Fantasy, 411 +Mega Man 2, 110 +Castlevania III: Dracula's Curse, 113 +Sonic the Hedgehog, 471 +Street Fighter II, 410 +The Legend of Zelda: A Link to the Past, 399 +Super Mario World, 422 +Chrono Trigger, 220 +Super Mario 64, 479 +Pokémon Red/Blue, 493 +Resident Evil, 438 +Tomb Raider, 369 +GoldenEye 007, 165 +Final Fantasy VII, 441 +Age of Empires, 297 +Half-Life, 451 +The Legend of Zelda: Ocarina of Time, 461 +StarCraft, 301 +Baldur's Gate, 442 +Metal Gear Solid, 425 +Super Smash Bros., 419 +Tony Hawk's Pro Skater 2, 312 +The Sims, 449 +Diablo II, 302 +Deus Ex, 9 +Counter-Strike, 454 +Grand Theft Auto III, 473 +Halo: Combat Evolved, 387 +Super Smash Bros. Melee, 417 +Animal Crossing, 19 +Ico, 19 +The Elder Scrolls III: Morrowind, 28 +Metroid Prime, 390 +Warcraft III: Reign of Chaos, 298 +Grand Theft Auto: Vice City, 472 +The Legend of Zelda: The Wind Waker, 397 +Call of Duty, 456 +Star Wars: Knights of the Old Republic, 36 +Prince of Persia: The Sands of Time, 36 +Beyond Good & Evil, 36 +World of Warcraft, 453 +Half-Life 2, 450 +Grand Theft Auto: San Andreas, 475 +Metal Gear Solid 3: Snake Eater, 41 +Resident Evil 4, 439 +God of War, 430 +Shadow of the Colossus, 47 +Guitar Hero, 47 +The Elder Scrolls IV: Oblivion, 53 +Gears of War, 53 +Wii Sports, 476 +Bully, 53 +Okami, 12 +The Legend of Zelda: Twilight Princess, 398 +BioShock, 377 +Portal, 433 +Call of Duty 4: Modern Warfare, 458 +Assassin's Creed, 375 +Mass Effect, 379 +Super Mario Galaxy, 421 +Rock Band, 59 +Fallout 3, 382 +Left 4 Dead, 65 +Dead Space, 65 +Braid, 3 +LittleBigPlanet, 65 +Super Smash Bros. Brawl, 416 +Portal 2, 432 +Batman: Arkham Asylum, 251 +Demon's Souls, 363 +Uncharted 2: Among Thieves, 366 +League of Legends, 455 +Angry Birds, 342 +Limbo, 2 +Red Dead Redemption, 426 +Super Mario Galaxy 2, 271 +Mass Effect 2, 380 +StarCraft II: Wings of Liberty, 300 +Fallout: New Vegas, 383 +Super Meat Boy, 76 +Amnesia: The Dark Descent, 76 +Dark Souls, 437 +Batman: Arkham City, 252 +The Binding of Isaac, 82 +Fez, 1 +Journey, 283 +Hotline Miami, 89 +Far Cry 3, 371 +Dishonored, 89 +XCOM: Enemy Unknown, 292 +Borderlands 2, 303 +Papers, Please, 92 +The Last of Us, 482 +BioShock Infinite, 376 +Dota 2, 402 +The Stanley Parable, 281 +Payday 2, 92 +The Legend of Zelda: A Link Between Worlds, 393 +Super Mario 3D World, 275 +Dark Souls II, 261 +Hearthstone, 99 +Mario Kart 8, 415 +Five Nights at Freddy's, 346 +Shovel Knight, 99 +The Sims 4, 448 +Alien: Isolation, 99 +Dragon Age: Inquisition, 352 +Bloodborne, 436 +Undertale, 359 +Rocket League, 405 +Fallout 4, 385 +Metal Gear Solid V: The Phantom Pain, 424 +Life Is Strange, 290 +Ori and the Blind Forest, 279 +Cities: Skylines, 322 +Dying Light, 107 +Splatoon, 107 +Xenoblade Chronicles X, 107 +Overwatch, 447 +Doom, 431 +Dark Souls III, 266 +Inside, 117 +The Witness, 117 +Pokémon Go, 478 +Uncharted 4: A Thief's End, 368 +Civilization VI, 295 +The Last Guardian, 117 +Final Fantasy XV, 413 +Hollow Knight, 434 +PlayerUnknown's Battlegrounds, 126 +Horizon Zero Dawn, 126 +Super Mario Odyssey, 459 +Cuphead, 280 +Nier: Automata, 126 +Fortnite, 496 +Assassin's Creed Origins, 374 +Monster Hunter: World, 258 +Super Smash Bros. Ultimate, 477 +Celeste, 358 +Dead Cells, 278 +Among Us, 445 +Marvel's Spider-Man, 365 +Assassin's Creed Odyssey, 373 +Detroit: Become Human, 289 +Apex Legends, 404 +Sekiro: Shadows Die Twice, 362 +Resident Evil 2, 262 +Disco Elysium, 357 +Fire Emblem: Three Houses, 152 +Luigi's Mansion 3, 237 +Control, 152 +Death Stranding, 152 +The Outer Worlds, 152 +Call of Duty: Modern Warfare, 306 +Animal Crossing: New Horizons, 481 +The Last of Us Part II, 427 +Hades, 360 +Doom Eternal, 162 +Cyberpunk 2077, 444 +Ghost of Tsushima, 162 +Microsoft Flight Simulator, 162 +Genshin Impact, 403 +Fall Guys, 341 +It Takes Two, 340 +Resident Evil Village, 267 +Forza Horizon 5, 246 +Metroid Dread, 388 +Psychonauts 2, 169 +Ratchet & Clank: Rift Apart, 169 +Halo Infinite, 386 +Returnal, 169 +Monster Hunter Rise, 256 +God of War Ragnarök, 428 +Horizon Forbidden West, 177 +Stray, 177 +Vampire Survivors, 277 +Marvel's Midnight Suns, 177 +Xenoblade Chronicles 3, 177 +Cult of the Lamb, 177 +Overwatch 2, 177 +Call of Duty: Modern Warfare II, 305 +Hogwarts Legacy, 443 +The Legend of Zelda: Tears of the Kingdom, 460 +Alan Wake 2, 190 +Super Mario Bros. Wonder, 420 +Marvel's Spider-Man 2, 364 +Lethal Company, 268 +Dave the Diver, 273 +Street Fighter 6, 409 +Resident Evil 4 (2023), 269 +Armored Core VI: Fires of Rubicon, 190 +Starfield, 190 +The Finals, 190 +Palworld, 263 +Helldivers 2, 260 +Super Metroid, 391 +Yoshi's Island, 222 +EarthBound, 221 +Secret of Mana, 218 +Suikoden II, 217 +Vagrant Story, 9 +Parasite Eve, 166 +Xenogears, 216 +Planescape: Torment, 215 +System Shock 2, 213 +Thief: The Dark Project, 212 +Unreal Tournament, 211 +Quake III Arena, 210 +EverQuest, 209 +Homeworld, 207 +Age of Empires II, 296 +Command & Conquer: Red Alert 2, 206 +Baldur's Gate II: Shadows of Amn, 9 +The Legend of Zelda: Majora's Mask, 396 +Perfect Dark, 205 +Jet Set Radio, 182 +Crazy Taxi, 159 +Tony Hawk's Pro Skater 3, 19 +Gran Turismo 3: A-Spec, 19 +Advance Wars, 19 +Max Payne, 19 +Silent Hill 2, 19 +Jak and Daxter: The Precursor Legacy, 19 +Ikaruga, 19 +Rez, 19 +Kingdom Hearts, 247 +Mafia: The City of Lost Heaven, 28 +Neverwinter Nights, 28 +Medal of Honor: Allied Assault, 28 +Battlefield 1942, 28 +Tom Clancy's Splinter Cell, 28 +The Sims 2, 254 +Fable, 41 +Rome: Total War, 41 +Katamari Damacy, 111 +Burnout 3: Takedown, 87 +Paper Mario: The Thousand-Year Door, 69 +Viewtiful Joe, 36 +Psychonauts, 43 +Killer7, 47 +Civilization IV, 294 +Guild Wars, 47 +Dragon Quest VIII, 250 +Mario Kart DS, 264 +Ōkami, 53 +Company of Heroes, 7 +The Legend of Zelda: Phantom Hourglass, 272 +Crackdown, 59 +S.T.A.L.K.E.R.: Shadow of Chernobyl, 6 +Team Fortress 2, 308 +Crysis, 59 +The Orange Box, 307 +Patapon, 59 +No More Heroes, 59 +Valkyria Chronicles, 65 +Persona 4, 354 +Dead Space 2, 82 +F.E.A.R., 47 +Mirror's Edge, 5 +Left 4 Dead 2, 309 +Dragon Age: Origins, 353 +Dawn of War II, 71 +Plants vs. Zombies, 343 +Bayonetta, 71 +Forza Motorsport 3, 240 +L.A. Noire, 82 +Saints Row: The Third, 82 +Deus Ex: Human Revolution, 82 +The Witcher 2: Assassins of Kings, 381 +Dead Island, 82 +Rayman Origins, 82 +The Walking Dead: Season Two, 92 +Far Cry 4, 370 +Middle-earth: Shadow of Mordor, 99 +Darkest Dungeon, 117 +The Talos Principle, 99 +Alien Swarm, 76 +The Crew, 99 +Until Dawn, 107 +Splatoon 2, 126 +Persona 5, 356 +Firewatch, 288 +The Banner Saga, 99 +Divinity: Original Sin, 99 +Divinity: Original Sin 2, 351 +Thumper, 117 +Nioh, 126 +Prey, 126 +What Remains of Edith Finch, 286 +Night in the Woods, 126 +Injustice 2, 126 +Tekken 7, 407 +Divinity: Original Sin 2 - Definitive Edition, 138 +A Way Out, 138 +Frostpunk, 138 +Subnautica, 339 +Into the Breach, 138 +Return of the Obra Dinn, 284 +Gris, 138 +Tetris Effect, 138 +Forza Horizon 4, 244 +Dragon Ball FighterZ, 255 +Octopath Traveler, 138 +The Messenger, 138 +Katana ZERO, 152 +Outer Wilds, 285 +Slay the Spire, 349 +Baba Is You, 152 +A Plague Tale: Innocence, 152 +Sayonara Wild Hearts, 152 +The Legend of Zelda: Link's Awakening, 394 +Pokémon Gold/Silver, 468 +Pokémon Ruby/Sapphire, 466 +Pokémon Diamond/Pearl, 465 +Pokémon Black/White, 464 +Pokémon X/Y, 462 +Pokémon Sun/Moon, 274 +Pokémon Sword/Shield, 467 +Pokémon Scarlet/Violet, 470 +Kirby Super Star, 226 +Kirby and the Forgotten Land, 227 +Donkey Kong Country 2: Diddy's Kong Quest, 224 +Donkey Kong Country: Tropical Freeze, 223 +Pikmin, 233 +Pikmin 2, 229 +Pikmin 3, 228 +Luigi's Mansion, 238 +WarioWare, Inc.: Mega Microgame$!, 36 +Rhythm Heaven, 53 +Professor Layton and the Curious Village, 239 +Ghost Trick: Phantom Detective, 241 +Phoenix Wright: Ace Attorney, 245 +Danganronpa: Trigger Happy Havoc, 243 +Zero Escape: Nine Hours, Nine Persons, Nine Doors, 71 +The House in Fata Morgana, 76 +Doki Doki Literature Club!, 345 +Inscryption, 347 +Balatro, 348 +Animal Well, 201 +Cocoon, 190 +Chants of Sennaar, 190 +The Talos Principle 2, 190 +Sea of Stars, 190 +Dredge, 190 +Hi-Fi Rush, 190 +Lies of P, 190 +Remnant II, 190 +Warhammer 40,000: Space Marine 2, 235 +Tekken 8, 408 +Like a Dragon: Infinite Wealth, 201 +Persona 3 Reload, 257 +Unicorn Overlord, 201 +Prince of Persia: The Lost Crown, 201 +Thank Goodness You're Here!, 201 +UFO 50, 201 +Satisfactory, 324 +Factorio, 326 +RimWorld, 325 +Oxygen Not Included, 152 +Kerbal Space Program, 319 +Euro Truck Simulator 2, 323 +American Truck Simulator, 117 +Planet Coaster, 320 +Planet Zoo, 152 +Two Point Hospital, 138 +RollerCoaster Tycoon, 172 +Football Manager 2024, 315 +FIFA 23, 318 +NBA 2K24, 317 +WWE 2K24, 232 +Tony Hawk's Pro Skater 1 + 2, 311 +Gran Turismo 7, 314 +Forza Motorsport, 249 +F1 23, 234 +Trackmania, 162 +Need for Speed: Most Wanted, 313 +Burnout Paradise, 65 +SSX 3, 36 +F1 2020, 230 +This War of Mine, 99 +Don't Starve, 328 +Don't Starve Together, 329 +Valheim, 337 +The Forest, 332 +Sons of the Forest, 331 +Green Hell, 152 +Project Zomboid, 334 +DayZ, 330 +Rust, 336 +ARK: Survival Evolved, 335 +Conan Exiles, 138 +Grounded, 177 +Raft, 138 +The Long Dark, 126 +Subnautica: Below Zero, 169 diff --git a/backend/docs/game_routes.md b/backend/docs/game_routes.md index 8d65c49..95d949e 100644 --- a/backend/docs/game_routes.md +++ b/backend/docs/game_routes.md @@ -4,6 +4,7 @@ ## Sumário - [GET `/games` — Buscar games](#get-games--buscar-games) +- [GET `/games/{game_id}` — Buscar detalhes de um game](#get-gamesgame_id--buscar-detalhes-de-um-game) --- @@ -19,7 +20,7 @@ Busca jogos pelo nome. | Parâmetro | Tipo | Obrigatório | Padrão | Descrição | |-------------|--------|-------------|--------|---------------------------------------------| -| `search` | string | ✅ | - | Termo de busca para os jogos | +| `search` | string | ❌ | "" | Termo de busca para os jogos, se não vier nenhum, iremos só mostrar os jogos mais populares | | `page` | int | ❌ | `1` | Número da página | | `page_size` | int | ❌ | `20` | Quantidade máxima de resultados por página | | `detail` | bool | ✅ | - | Quanto de detalhe ([**\_\_GAME\_\_**](./routes.md#__game__) ou [**\_\_GAME_FULL\_\_**](./routes.md#__game_full__)) a resposta terá | @@ -48,4 +49,29 @@ Busca jogos pelo nome. | `500` |❌ | Erro interno | | `502` |❌ | Falha da API de games | ---- \ No newline at end of file +--- + + +## GET `/games/{game_id}` — Buscar detalhes de um game + +Retorna os detalhes completos de um gme pelo id. + +**Regras e comportamentos:** +- **Não requer login**. + +### Path Parameters + +| Parâmetro | Tipo | Descrição | +|--------------|--------|-----------------------------| +| `game_id` | int | ID único do game buscado | + +### Resposta de Sucesso — `200` + +Retorna schema [**\_\_GAME_FULL\_\_**](./routes.md#__game_full__) + +### [Erros](./routes.md#erros) possíveis + +| Status | HR | Causa | +|--------|--------|-----------------------| +| `404` | ✅ | Game não encontrado | +| `500` | ❌ | Erro interno | \ No newline at end of file diff --git a/backend/src/config/lifespan.py b/backend/src/config/lifespan.py index 2edd4e4..832c46c 100644 --- a/backend/src/config/lifespan.py +++ b/backend/src/config/lifespan.py @@ -2,8 +2,12 @@ import asyncpg from contextlib import asynccontextmanager from fastapi import FastAPI +import json +from pathlib import Path from ..models import create_tables +from ..models.schemas.game import GameOverview +from ..services.db_services.game import DB_create_game, DB_read_last_game, DB_delete_game class LifespanConfig(): @@ -27,7 +31,8 @@ def read_env(self): env_keys = [ "IS_TESTING", "VM_USER", "VM_PASS", "DB_USER", "DB_PASS", "DB_NAME", - "DB_HOST", "DB_PORT", "JWT_KEY", "RAWG_KEY", "FRONT_URL", "BACK_URL" + "DB_HOST", "DB_PORT", "JWT_KEY", "RAWG_KEY", "FRONT_URL", "BACK_URL", + "LOAD_GAMES" ] for val in env_keys: @@ -38,6 +43,9 @@ def read_env(self): val = int(value) if value.isdigit() else value setattr(self, key.lower(), val) + if self.load_games not in ["all", "skip", "new"]: + raise ValueError('O campo LOAD_GAMES tem que ser "all", "skip" ou "new"!') + async def create_database(self, conn): """Cria o usuário que realiza as operações na vm e o bd, caso eles já não existirem""" @@ -92,11 +100,40 @@ async def create_internal_pool(self): async def create_external_pool(self): - """ Cria o pool de conexões externas""" + """Cria o pool de conexões externas""" return aiohttp.ClientSession() + async def load_games_into_db(self, conn): + """Joga os games do JSON para a tabela de games""" + + json_path = Path.cwd().parent / "data" + games_json = [f for f in json_path.iterdir() if f.is_file() and f.suffix == ".json"][0] + + with open(games_json, "r", encoding="utf-8") as file: + data = json.load(file) + + total_games = data["total"] + last_game_in_DB = await DB_read_last_game(conn) + offset = last_game_in_DB if ((last_game_in_DB is not None) and (self.load_games != "all")) else 0 + + for i in range(offset, total_games): + g = data["games"][i] + + new_game = GameOverview( + game_id = g["game_id"], + title = g["title"], + picture = g["picture"], + year = g["release_date"][0:4] + ) + + await DB_create_game(conn, new_game, g["relevancy"]) + + for i in range(total_games, last_game_in_DB): + await DB_delete_game(conn, i) + + @asynccontextmanager async def __call__(self, app: FastAPI): @@ -120,6 +157,9 @@ async def __call__(self, app: FastAPI): async with app.state.internal_pool.acquire() as pool_conn: await create_tables(pool_conn) + if self.load_games != "skip": + await self.load_games_into_db(pool_conn) + except Exception as e: raise RuntimeError(str(e)) diff --git a/backend/src/models/schemas/game.py b/backend/src/models/schemas/game.py index 98195d8..df08c14 100644 --- a/backend/src/models/schemas/game.py +++ b/backend/src/models/schemas/game.py @@ -18,5 +18,6 @@ class GameComplete(GameOverview): class GamesOut(BaseModel): """Lista de games""" + total: int count: int games: list[GameComplete | GameOverview] \ No newline at end of file diff --git a/backend/src/models/tables.py b/backend/src/models/tables.py index 0186271..31d68c1 100644 --- a/backend/src/models/tables.py +++ b/backend/src/models/tables.py @@ -54,9 +54,12 @@ id INTEGER PRIMARY KEY, title VARCHAR(50) NOT NULL, picture TEXT, + relevancy INTEGER NOT NULL, year INTEGER ) - ''' + ''', + + '''CREATE INDEX IF NOT EXISTS idx_relevancy_title ON Games (relevancy DESC, title ASC)''' ], diff --git a/backend/src/routes/game.py b/backend/src/routes/game.py index 0217bad..da9a024 100644 --- a/backend/src/routes/game.py +++ b/backend/src/routes/game.py @@ -2,23 +2,38 @@ from fastapi.responses import JSONResponse from ..services.rawg_services import * +from ..services.db_services.game import DB_read_game_full, DB_read_game_page_full, DB_read_game_page_overview from . import dependencies as dep +from ..utils import errors as err game_router = APIRouter(prefix="/games", tags=["game"]) @game_router.get("") -async def search_games(search: str, detail: bool, page: int = 1, page_size: int = 20, - conn = Depends(dep.get_conn), exconn = Depends(dep.get_exconn), rawg = Depends(dep.get_rawg)): - """Busca jogos pelo nome""" +async def search_games(detail: bool, search: str = "", page: int = 1, page_size: int = 20, + conn = Depends(dep.get_conn), exconn = Depends(dep.get_exconn), rawg = Depends(dep.get_rawg)): + """Busca jogos pelo nome""" - url = rawg + f"&search={search}" + f"&page={page}" + f"&page_size={page_size}" + #url = rawg + f"&search={search}" + f"&page={page}" + f"&page_size={page_size}" + #games = (await search_rawg_games_complete(conn, exconn, url) + # if detail else await search_rawg_games_overview(conn, exconn, url)) - games = (await search_rawg_games_complete(conn, exconn, url) - if detail else await search_rawg_games_overview(conn, exconn, url)) + games = (await DB_read_game_page_full(conn, search, page_size, page) + if detail else await DB_read_game_page_overview(conn, search, page_size, page)) + + return JSONResponse(games.model_dump()) - return JSONResponse(games.model_dump()) +@game_router.get("/{game_id}") +async def search_game(game_id: int, conn = Depends(dep.get_conn)): + """Busca dados completos de um jogo pelo game_id""" + + game = await DB_read_game_full(conn, game_id) + + if game is None: + raise err.QueryError(404, err.GAME_NOT_FOUND_MSG) + + return JSONResponse(game.model_dump()) diff --git a/backend/src/services/db_services/game.py b/backend/src/services/db_services/game.py index 0a98c1b..f7c8703 100644 --- a/backend/src/services/db_services/game.py +++ b/backend/src/services/db_services/game.py @@ -1,18 +1,17 @@ -from ...models.schemas.game import GameOverview, GameComplete -from ...utils.utils import db_query -from ...utils.utils import * +from ...models.schemas.game import GameOverview, GameComplete, GamesOut +from ...utils.utils import db_query, escape_like @db_query -async def DB_create_game(conn, game: GameOverview): +async def DB_create_game(conn, game: GameOverview, relevancy: int): """Adiciona um jogo ao DB""" already_exists = await conn.fetchrow(''' - INSERT INTO Games(id, title, picture, year) - VALUES($1, $2, $3, $4) + INSERT INTO Games(id, title, picture, year, relevancy) + VALUES($1, $2, $3, $4, $5) ON CONFLICT (id) DO UPDATE SET title = $2, picture = $3, year = $4 RETURNING id - ''', game.game_id, game.title, game.picture, game.year) + ''', game.game_id, game.title, game.picture, game.year, relevancy) return False if already_exists is None else True @@ -61,6 +60,60 @@ async def DB_read_game_full(conn, game_id: int): ) +async def DB_read_game_page_full(conn, search: str, page_size: int, page: int): + """Lê os dados completos sobre uma página de games a partir de um termo de busca de titulo""" + + search_term = f"%{escape_like(search)}%" + + total = await conn.fetchval(''' + SELECT COUNT(*) + FROM Games g + WHERE g.title ILIKE $1 + ''', search_term) + + if total == 0: + return GamesOut( + total = 0, + count = 0, + games = [] + ) + + games = await conn.fetch(''' + SELECT g.id, g.title, g.picture, g.year, + COUNT(r.id) FILTER (WHERE r.liked = true) AS like_count, + COUNT(r.id) FILTER (WHERE r.completed = true) AS completed_count, + COUNT(r.id) FILTER (WHERE r.game = g.id) AS review_count, + COALESCE(ROUND(AVG(r.rating_num)::numeric, 2), NULL) AS avg_rating + FROM Games g + LEFT JOIN Reviews r ON r.game = g.id + WHERE g.title ILIKE $1 + GROUP BY g.id + ORDER BY + g.relevancy DESC, + g.title ILIKE $2 DESC, + length(g.title) ASC, + g.title ASC + LIMIT $3 + OFFSET $4 + ''', search_term, search_term[:-1], page_size, page_size*(page-1)) + + return GamesOut( + total = total, + count = len(games), + games = [ + GameComplete( + game_id=game["id"], + title=game["title"], + picture=game["picture"], + year=game["year"], + like_count=game["like_count"], + completed_count=game["completed_count"], + review_count=game["review_count"], + gamerboxd_rating=float(game["avg_rating"]) if game["avg_rating"] is not None else None + ) for game in games] + ) + + @db_query async def DB_read_game_basic(conn, game_id: int): """Lê dados básicos sobre um game no DB usando o id dele""" @@ -79,3 +132,69 @@ async def DB_read_game_basic(conn, game_id: int): year=game["year"] ) + +@db_query +async def DB_read_game_page_overview(conn, search: str, page_size: int, page: int): + """Lê os dados resumidos sobre uma página de games a partir de um termo de busca de titulo""" + + search_term = f"%{escape_like(search)}%" + + total = await conn.fetchval(''' + SELECT COUNT(*) + FROM Games g + WHERE g.title ILIKE $1 + ''', search_term) + + if total == 0: + return GamesOut( + total = 0, + count = 0, + games = [] + ) + + games = await conn.fetch(''' + SELECT g.id, g.title, g.picture, g.year + FROM Games g + WHERE g.title ILIKE $1 + GROUP BY g.id + ORDER BY + g.relevancy DESC, + g.title ILIKE $2 DESC, + length(g.title) ASC, + g.title ASC + LIMIT $3 + OFFSET $4 + ''', search_term, search_term[:-1], page_size, page_size*(page-1)) + + return GamesOut( + total = total, + count = len(games), + games = [ + GameOverview( + game_id=game["id"], + title=game["title"], + picture=game["picture"], + year=game["year"] + ) for game in games] + ) + + +@db_query +async def DB_read_last_game(conn): + """Lê o maior game_id presente no DB""" + + return await conn.fetchval(''' + SELECT g.id FROM Games g + ORDER BY g.id DESC + LIMIT 1 + ''',) + + +@db_query +async def DB_delete_game(conn, game_id: int): + """Remove um game do DB""" + + return await conn.execute(''' + DELETE FROM Games g + WHERE g.id = $1 + ''', game_id) \ No newline at end of file diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index b5967b6..6520640 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -81,8 +81,6 @@ def _get_games(game_name: str): games = { "mario": _get_games("mario"), - "GTA": _get_games("GTA"), - "roblox": _get_games("roblox"), } return games diff --git a/backend/tests/test_lists/test_content.py b/backend/tests/test_lists/test_content.py index af68c2e..245d0aa 100644 --- a/backend/tests/test_lists/test_content.py +++ b/backend/tests/test_lists/test_content.py @@ -1,4 +1,5 @@ from .utils import * +from ..utils import LIST_NOT_FOUND_MSG def test_adding_game_to_list_returns_200(users, games, create_list, add_game_request): @@ -18,7 +19,7 @@ def test_adding_and_removing_game_returns_200(users, games, create_list, add_gam """Alice cria uma lista, adiciona um jogo e depois o remove""" creator = users("Alice") - game_id = games["GTA"][0] + game_id = games["mario"][0] list_in = create_list(creator) add_response = add_game_request(creator, list_in, game_id) @@ -46,7 +47,7 @@ def test_adding_game_to_non_existent_list_returns_404(users, games, add_game_req """Alice tenta adicionar um jogo a uma lista que não existe""" creator = users("Alice") - game_id = games["roblox"][0] + game_id = games["mario"][0] list_in = BaseList(list_id = "inexistent") add_response = add_game_request(creator, list_in, game_id) @@ -58,7 +59,7 @@ def test_removing_game_from_non_existent_list_returns_404(users, games, rem_game """Alice tenta remover um jogo de uma lista que não existe""" creator = users("Alice") - game_id = games["roblox"][0] + game_id = games["mario"][0] list_in = BaseList(list_id = "inexistent") rem_response = rem_game_request(creator, list_in, game_id) diff --git a/backend/tests/test_lists/test_new_list.py b/backend/tests/test_lists/test_new_list.py index 62d5bf6..5f050c6 100644 --- a/backend/tests/test_lists/test_new_list.py +++ b/backend/tests/test_lists/test_new_list.py @@ -103,7 +103,7 @@ def test_creating_list_with_invalid_games_returns_invalid_games_and_200(users, g """Alice cria uma lista, mas um dos game-ids para inserir na lista não são válidos""" user = users("Alice") - invalid_games = [1, 2] + invalid_games = [-1, -2] games_list = games["mario"] + invalid_games list_in = base_list(1, first_games=games_list) diff --git a/backend/tests/test_lists/test_standard_lists.py b/backend/tests/test_lists/test_standard_lists.py index 27a557c..df5ad29 100644 --- a/backend/tests/test_lists/test_standard_lists.py +++ b/backend/tests/test_lists/test_standard_lists.py @@ -129,7 +129,7 @@ def test_adding_games_to_standard_lists_with_review_update(users, games, create_ review.liked = not review.liked review.completed = not review.completed - response = edit_review_request(creator, review) + response = edit_review_request(creator, asdict(review)) assert response.status_code == 200, response.json() for l in standard_lists: @@ -170,7 +170,6 @@ def test_removing_games_from_standard_lists_with_review_deletion(users, games, c standard_lists = [favorites_list(creator), completed_list(creator)] review_creation_kwargs = { - "cleanup": False, "liked": any("Favoritos" in name for name in names), "completed": any("Completados" in name for name in names) } @@ -207,7 +206,7 @@ def test_removing_games_from_standard_lists_with_review_update(users, games, cre review.liked = not review.liked review.completed = not review.completed - response = edit_review_request(creator, review) + response = edit_review_request(creator, asdict(review)) assert response.status_code == 200, response.json() for l in standard_lists: diff --git a/backend/tests/test_reviews/test_edit_review.py b/backend/tests/test_reviews/test_edit_review.py index 2ece85a..3f73fb4 100644 --- a/backend/tests/test_reviews/test_edit_review.py +++ b/backend/tests/test_reviews/test_edit_review.py @@ -23,22 +23,22 @@ pytest.param("rating_num", 6.0, 422, RATING_NUM_INVALID_MSG, id="rating_num above superior limit"), pytest.param("rating_num", -1, 422, RATING_NUM_INVALID_MSG, id="rating_num below inferior limit"), pytest.param("rating_num", 1.49, 422, RATING_NUM_INVALID_MSG, id="rating_num with wrong increment"), - pytest.param("rating_num", "3.5", 422, None, id="rating_num as str"), + pytest.param("rating_num", "pouco", 422, None, id="rating_num as str"), pytest.param("rating_num", None, 422, None, id="rating_num as null"), pytest.param("rating_text", "Gostei desse game", 200, None, id="rating_text ok"), pytest.param("rating_text", "Gostei desse game 👍", 200, None, id="rating_text with emoji"), pytest.param("rating_text", "Gostei desse game ", 200, None, id="rating_text with trailing space"), pytest.param("rating_text", "Gostei"*50, 200, None, id="rating_text at superior character limit"), pytest.param("rating_text", None, 200, None, id="rating_text as null"), - pytest.param("rating_text", "Gostei"*51, 200, RATING_TEXT_TOO_BIG_MSG, id="rating_text too long"), - pytest.param("rating_text", " ", 200, RATING_TEXT_BLANK_MSG, id="rating_text as blank space"), + pytest.param("rating_text", "Gostei"*51, 400, RATING_TEXT_TOO_BIG_MSG, id="rating_text too long"), + pytest.param("rating_text", " ", 400, RATING_TEXT_BLANK_MSG, id="rating_text as blank space"), pytest.param("rating_text", 4220, 422, None, id="rating_text as int"), pytest.param("privacy", Clearence.ANY, 200, None, id="privacy at min"), pytest.param("privacy", Clearence.FOLLOWED, 200, None, id="privacy at med"), pytest.param("privacy", Clearence.OWNER, 200, None, id="privacy at max"), pytest.param("privacy", 21, 422, REVIEW_PRIVACY_INVALID_MSG, id="privacy invalid"), - pytest.param("privacy", "secret", 400, None, id="privacy as str"), - pytest.param("privacy", None, 400, None, id="privacy as null"), + pytest.param("privacy", "secret", 422, None, id="privacy as str"), + pytest.param("privacy", None, 422, None, id="privacy as null"), pytest.param("time_played", 10, 200, None, id="time played ok"), pytest.param("time_played", None, 200, None, id="time played as null"), pytest.param("time_played", -1, 400, TIME_PLAYED_INVALID_MSG, id="time played negative"), @@ -46,11 +46,9 @@ pytest.param("time_played", "lots", 422, None, id="time_played as str"), pytest.param("liked", True, 200, None, id="liked ok as bool"), pytest.param("liked", 1, 200, None, id="liked ok as int"), - pytest.param("liked", "yes", 422, None, id="liked as str"), pytest.param("liked", None, 422, None, id="liked as null"), pytest.param("completed", False, 200, None, id="completed ok as bool"), pytest.param("completed", 0, 200, None, id="completed ok as int"), - pytest.param("completed", "no", 422, None, id="completed as str"), pytest.param("completed", None, 422, None, id="completed as null"), ]) def test_editing_review_checks_edge_cases(users, create_review, edit_review_request, field, new_value, expected_status, expected_body): @@ -76,7 +74,7 @@ def test_editing_review_checks_edge_cases(users, create_review, edit_review_requ assert edit_response.json() == expected_body -@pytest.mark.parametrize("field_to_remove", ["rating_num", "rating_text", "privacy", "time_played", "liked", "completed"]) +@pytest.mark.parametrize("field_to_remove", ["rating_num", "privacy", "liked", "completed"]) def test_not_sending_all_fields_when_editing_review_returns_422(users, create_review, edit_review_request, field_to_remove): """Alice tenta editar sua review, mas não envia todos os campos necessários""" diff --git a/backend/tests/test_reviews/test_like.py b/backend/tests/test_reviews/test_like.py index f4d722a..eac03c9 100644 --- a/backend/tests/test_reviews/test_like.py +++ b/backend/tests/test_reviews/test_like.py @@ -1,3 +1,4 @@ +from dataclasses import asdict import requests from ..utils import BaseReview, Clearence, BASE_URL_REVIEWS, NOT_LOGGED_IN_MSG, REVIEW_NOT_FOUND_MSG @@ -135,7 +136,7 @@ def test_blocking_prevents_likes_both_ways(users, create_review, block_request, assert like_response.json() == BLOCKED_BY_REVIEW_OWNER_MSG assert_review_unlike_by_review(blocked, blocker, review_blocker) - like_response = like_review_request(blocked, review_blocked) + like_response = like_review_request(blocker, review_blocked) assert like_response.status_code == 400, like_response.json() assert like_response.json() == USER_BLOCKED_REVIEW_OWNER_MSG @@ -177,7 +178,7 @@ def test_unliking_review_while_not_logged_in_returns_401(): assert response.json() == NOT_LOGGED_IN_MSG -def test_privacy_change_to_followed_removes_unfollowed_likes(users, create_review, update_review_request, like_review_request): +def test_privacy_change_to_followed_removes_unfollowed_likes(users, create_review, edit_review_request, like_review_request): """Alice cria uma review pública, Bernardo curte a review. Alice muda a privacidade para FOLLOWED, mas não segue Bernardo, portanto Bernardo perde o like""" creator, liker = users("Alice"), users("Bernardo") @@ -186,14 +187,15 @@ def test_privacy_change_to_followed_removes_unfollowed_likes(users, create_revie like_response = like_review_request(liker, review) assert like_response.status_code == 200, like_response.json() - update_response = update_review_request(creator, review, privacy=Clearence.FOLLOWED) + review.privacy = Clearence.FOLLOWED + update_response = edit_review_request(creator, asdict(review)) assert update_response.status_code == 200, update_response.json() assert update_response.json()["like_count"] == 0 assert_review_unlike_by_review(liker, creator, review) -def test_privacy_change_to_owner_removes_unfollowed_likes(users, create_review, update_review_request, like_review_request): +def test_privacy_change_to_owner_removes_unfollowed_likes(users, create_review, edit_review_request, like_review_request): """Alice cria uma review pública, Bernardo curte a review. Alice muda a privacidade para OWNER, portanto Bernardo perde o like""" creator, liker = users("Alice"), users("Bernardo") @@ -202,14 +204,15 @@ def test_privacy_change_to_owner_removes_unfollowed_likes(users, create_review, like_response = like_review_request(liker, review) assert like_response.status_code == 200, like_response.json() - update_response = update_review_request(creator, review, privacy=Clearence.OWNER) + review.privacy = Clearence.OWNER + update_response = edit_review_request(creator, asdict(review)) assert update_response.status_code == 200, update_response.json() assert update_response.json()["like_count"] == 0 assert_review_unlike_by_review(liker, creator, review) -def test_privacy_change_to_followed_doesnt_remove_followed_likes(users, create_review, update_review_request, like_review_request, follow_request): +def test_privacy_change_to_followed_doesnt_remove_followed_likes(users, create_review, edit_review_request, like_review_request, follow_request): """Alice cria uma review pública, Bernardo curte a review. Alice muda a privacidade para FOLLOWED, e segue Bernardo, portanto Bernardo mantém o like""" creator, liker = users("Alice"), users("Bernardo") @@ -221,8 +224,9 @@ def test_privacy_change_to_followed_doesnt_remove_followed_likes(users, create_r follow_response = follow_request(creator, liker) assert follow_response.status_code == 200, follow_response.json() - update_response = update_review_request(creator, review, privacy=Clearence.FOLLOWED) + review.privacy = Clearence.FOLLOWED + update_response = edit_review_request(creator, asdict(review)) assert update_response.status_code == 200, update_response.json() - assert update_response.json()["like_count"] == 1 - assert_review_like_by_review(liker, creator, review) \ No newline at end of file + assert_review_like_by_review(liker, creator, review) + assert update_response.json()["like_count"] == 1 \ No newline at end of file diff --git a/backend/tests/test_reviews/test_new_review.py b/backend/tests/test_reviews/test_new_review.py index c5f799c..0d04fab 100644 --- a/backend/tests/test_reviews/test_new_review.py +++ b/backend/tests/test_reviews/test_new_review.py @@ -47,7 +47,7 @@ def base_review(**overrides): (base_review(time_played=-10000000), 400, TIME_PLAYED_INVALID_MSG), # Testes de quebra de regras de negócio pelo cliente - (base_review(game_id=1), 404, GAME_NOT_FOUND_MSG), + (base_review(game_id=0), 404, GAME_NOT_FOUND_MSG), (base_review(rating_num=-1.0), 422, RATING_NUM_INVALID_MSG), (base_review(rating_num=6.0), 422, RATING_NUM_INVALID_MSG), (base_review(rating_num=1.3), 422, RATING_NUM_INVALID_MSG), diff --git a/backend/tests/test_reviews/utils.py b/backend/tests/test_reviews/utils.py index efa2c50..a6243ee 100644 --- a/backend/tests/test_reviews/utils.py +++ b/backend/tests/test_reviews/utils.py @@ -63,8 +63,8 @@ def assert_review_like_by_review(atv: BaseUser, pas: BaseUser, review: BaseRevie def assert_review_like_by_user(atv: BaseUser, pas: BaseUser, review: BaseReview): """Garante que o atv deu like na review do pas, verificando todos os likes que o atv já deu""" - user_likes = view_user_likes(atv, review) - assert any((review.review_id == ul["review_id"]) and (pas.user_id == ul["creator"]["user_id"]) for ul in user_likes) + user_likes = view_user_likes(atv) + assert any((review.review_id == ul["review_id"]) and (pas.user_id == ul["reviewer"]["user_id"]) for ul in user_likes) def assert_review_unlike_by_review(atv: BaseUser, pas: BaseUser, review: BaseReview): @@ -77,5 +77,5 @@ def assert_review_unlike_by_review(atv: BaseUser, pas: BaseUser, review: BaseRev def assert_review_unlike_by_user(atv: BaseUser, pas: BaseUser, review: BaseReview): """Garante que o atv deu like na review do pas, verificando todos os likes que o atv já deu""" - user_likes = view_user_likes(atv, review) - assert all((review.review_id != ul["review_id"]) or (pas.user_id != ul["creator"]["user_id"]) for ul in user_likes) \ No newline at end of file + user_likes = view_user_likes(atv) + assert all((review.review_id != ul["review_id"]) or (pas.user_id != ul["reviewer"]["user_id"]) for ul in user_likes) \ No newline at end of file diff --git a/backend/tests/test_users/test_new_user.py b/backend/tests/test_users/test_new_user.py index 3c5c85b..39e34b3 100644 --- a/backend/tests/test_users/test_new_user.py +++ b/backend/tests/test_users/test_new_user.py @@ -70,8 +70,8 @@ def test_new_users(user, expected_status, expected_body): resp_duplicate = requests.post(url=BASE_URL_USERS, json=base_user(1)) assert resp_duplicate.status_code == 200, resp_duplicate.json() assert resp_duplicate.cookies is not None, resp_duplicate.json() - #for c in resp_duplicate.cookies: - # c.secure = False + for c in resp_duplicate.cookies: + c.secure = False response = requests.post(url=BASE_URL_USERS, json=user) @@ -87,8 +87,8 @@ def test_new_users(user, expected_status, expected_body): if response.status_code == 200: assert "user_id" in response_json.keys() - #for c in response.cookies: - # c.secure = False + for c in response.cookies: + c.secure = False resp_delete = requests.delete(BASE_URL_USERS, cookies=response.cookies) assert resp_delete.status_code == 200, resp_delete.json() diff --git a/backend/tests/utils.py b/backend/tests/utils.py index 3cae901..2a7be9a 100644 --- a/backend/tests/utils.py +++ b/backend/tests/utils.py @@ -66,8 +66,8 @@ def create_account_by_username(username: str): session = requests.Session() response = session.post(BASE_URL_USERS, json=payload) - #for c in session.cookies: - # c.secure = False + for c in session.cookies: + c.secure = False response_json = response.json() From bc6d4fca2bf04d55127c38f344787f4f3f8efee8 Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Thu, 12 Nov 2026 00:19:22 -0300 Subject: [PATCH 5/9] fix: trocando a rawg api por um json --- backend/src/config/lifespan.py | 4 ++-- backend/src/routes/dependencies.py | 2 +- backend/src/routes/review.py | 2 +- backend/src/services/db_services/game.py | 2 +- backend/src/services/db_services/review/data.py | 2 +- backend/src/services/db_services/review/like.py | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/config/lifespan.py b/backend/src/config/lifespan.py index 832c46c..47d8d4a 100644 --- a/backend/src/config/lifespan.py +++ b/backend/src/config/lifespan.py @@ -115,8 +115,8 @@ async def load_games_into_db(self, conn): data = json.load(file) total_games = data["total"] - last_game_in_DB = await DB_read_last_game(conn) - offset = last_game_in_DB if ((last_game_in_DB is not None) and (self.load_games != "all")) else 0 + last_game_in_DB = (await DB_read_last_game(conn) or 0) + offset = last_game_in_DB if self.load_games != "all" else 0 for i in range(offset, total_games): g = data["games"][i] diff --git a/backend/src/routes/dependencies.py b/backend/src/routes/dependencies.py index 78e6ab1..11d7072 100644 --- a/backend/src/routes/dependencies.py +++ b/backend/src/routes/dependencies.py @@ -45,7 +45,7 @@ async def user_id_exists(user_id: str, conn = Depends(get_conn)): return user_id -async def game_id_exists(game_id: str, conn = Depends(get_conn)): +async def game_id_exists(game_id: int, conn = Depends(get_conn)): """Verifica que um game existe no DB""" if await DB_read_game_name(conn, game_id) is None: diff --git a/backend/src/routes/review.py b/backend/src/routes/review.py index bfce013..2362471 100644 --- a/backend/src/routes/review.py +++ b/backend/src/routes/review.py @@ -47,7 +47,7 @@ async def update_review(review: ReviewEdit, review_id: str = Depends(dep.review_ await DB_delete_likes_after_privacy(conn, review_id, user_id, new_privacy) old_review_liked, old_review_completed = await DB_read_liked_and_completed(conn, review_id) - game_id = await DB_read_review_game(conn, review_id) if (old_review_liked or old_review_completed) else None + game_id = await DB_read_review_game(conn, review_id) if review.liked != old_review_liked: args = (conn, await DB_read_list_id(conn, "Jogos Favoritos", user_id), game_id) diff --git a/backend/src/services/db_services/game.py b/backend/src/services/db_services/game.py index f7c8703..8ec8cd2 100644 --- a/backend/src/services/db_services/game.py +++ b/backend/src/services/db_services/game.py @@ -21,7 +21,7 @@ async def DB_read_game_name(conn, game_id: int): """Lê o nome de um game do DB a partir do seu id""" game_name = await conn.fetchval(''' - SELECT name + SELECT title FROM Games WHERE id = $1 ''', game_id) diff --git a/backend/src/services/db_services/review/data.py b/backend/src/services/db_services/review/data.py index fa51530..ce79615 100644 --- a/backend/src/services/db_services/review/data.py +++ b/backend/src/services/db_services/review/data.py @@ -67,7 +67,7 @@ async def DB_read_review(conn, review_id: str): review = await conn.fetchrow(''' SELECT r.*, u.username, u.pfp, - (SELECT COUNT(*) FROM ReviewLikes rl WHERE rl.usr = r.reviewer) AS like_count + (SELECT COUNT(*) FROM ReviewLikes rl WHERE rl.review = r.id) AS like_count FROM Reviews r JOIN Users u ON u.id = r.reviewer WHERE r.id = $1 diff --git a/backend/src/services/db_services/review/like.py b/backend/src/services/db_services/review/like.py index 6f0fa6c..f6f7645 100644 --- a/backend/src/services/db_services/review/like.py +++ b/backend/src/services/db_services/review/like.py @@ -1,7 +1,7 @@ from ....models.schemas.review import ReviewOutOverview from ....models.schemas.game import GameOverview from ....models.schemas.user import User -from ....utils.utils import db_query, RelationshipStatus +from ....utils.utils import db_query, RelationshipStatus, fix_date from ....utils import pagination as pag @@ -173,9 +173,9 @@ async def DB_read_user_likes(conn, user_id: str, page_query: pag.PageQuery): # Pega uma página de reviews curtidas where, order_by, cursor_cols, params = pag.build_where(clauses, page_query, False) rows = await conn.fetch(f''' - SELECT r.*, u.id AS user_id, u.pfp, u.username, g.id AS game_id, g.name, g.picture, g.year, + SELECT r.*, u.id AS user_id, u.pfp, u.username, g.id AS game_id, g.title, g.picture, g.year, + (SELECT COUNT(*) FROM ReviewLikes rl WHERE rl.usr = r.reviewer) AS like_count, {cursor_cols} - (SELECT COUNT(*) FROM ReviewLikes rl WHERE rl.usr = r.reviewer) AS like_count FROM Reviews r RIGHT JOIN Games g ON g.id = r.game RIGHT JOIN Users u ON u.id = r.reviewer @@ -197,7 +197,7 @@ async def DB_read_user_likes(conn, user_id: str, page_query: pag.PageQuery): privacy = r["privacy"], like_count = r["like_count"], game = GameOverview(game_id=r["game_id"], title=r["title"], picture=r["picture"], year=r["year"]), - created_at = r["created_at"] + created_at = fix_date(r["created_at"]) ) for r in rows] return pag.PageResult( From 18cce4b2dc876604cb221009d888924da823e4bd Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Thu, 12 Nov 2026 00:32:47 -0300 Subject: [PATCH 6/9] =?UTF-8?q?fix:=20reordenando=20cat=C3=A1logo=20para?= =?UTF-8?q?=20ficar=20mais=20leg=C3=ADvel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/data/games.txt | 822 ++++++++++++++++++++--------------------- 1 file changed, 411 insertions(+), 411 deletions(-) diff --git a/backend/data/games.txt b/backend/data/games.txt index 1ea0755..ace9fb0 100644 --- a/backend/data/games.txt +++ b/backend/data/games.txt @@ -1,412 +1,412 @@ Total: 411 -New Super Mario Bros. Wii, 414 -Minecraft, 500 -Grand Theft Auto V, 499 -The Witcher 3: Wild Hunt, 487 -Red Dead Redemption 2, 492 -Elden Ring, 485 -The Legend of Zelda: Breath of the Wild, 498 -Mario Kart 8 Deluxe, 490 -Terraria, 483 -Stardew Valley, 488 -The Elder Scrolls V: Skyrim, 489 -Baldur's Gate 3, 484 -Tetris, 495 -Super Mario Bros., 494 -The Legend of Zelda, 400 -Metroid, 392 -Final Fantasy, 411 -Mega Man 2, 110 -Castlevania III: Dracula's Curse, 113 -Sonic the Hedgehog, 471 -Street Fighter II, 410 -The Legend of Zelda: A Link to the Past, 399 -Super Mario World, 422 -Chrono Trigger, 220 -Super Mario 64, 479 -Pokémon Red/Blue, 493 -Resident Evil, 438 -Tomb Raider, 369 -GoldenEye 007, 165 -Final Fantasy VII, 441 -Age of Empires, 297 -Half-Life, 451 -The Legend of Zelda: Ocarina of Time, 461 -StarCraft, 301 -Baldur's Gate, 442 -Metal Gear Solid, 425 -Super Smash Bros., 419 -Tony Hawk's Pro Skater 2, 312 -The Sims, 449 -Diablo II, 302 -Deus Ex, 9 -Counter-Strike, 454 -Grand Theft Auto III, 473 -Halo: Combat Evolved, 387 -Super Smash Bros. Melee, 417 -Animal Crossing, 19 -Ico, 19 -The Elder Scrolls III: Morrowind, 28 -Metroid Prime, 390 -Warcraft III: Reign of Chaos, 298 -Grand Theft Auto: Vice City, 472 -The Legend of Zelda: The Wind Waker, 397 -Call of Duty, 456 -Star Wars: Knights of the Old Republic, 36 -Prince of Persia: The Sands of Time, 36 -Beyond Good & Evil, 36 -World of Warcraft, 453 -Half-Life 2, 450 -Grand Theft Auto: San Andreas, 475 -Metal Gear Solid 3: Snake Eater, 41 -Resident Evil 4, 439 -God of War, 430 -Shadow of the Colossus, 47 -Guitar Hero, 47 -The Elder Scrolls IV: Oblivion, 53 -Gears of War, 53 -Wii Sports, 476 -Bully, 53 -Okami, 12 -The Legend of Zelda: Twilight Princess, 398 -BioShock, 377 -Portal, 433 -Call of Duty 4: Modern Warfare, 458 -Assassin's Creed, 375 -Mass Effect, 379 -Super Mario Galaxy, 421 -Rock Band, 59 -Fallout 3, 382 -Left 4 Dead, 65 -Dead Space, 65 -Braid, 3 -LittleBigPlanet, 65 -Super Smash Bros. Brawl, 416 -Portal 2, 432 -Batman: Arkham Asylum, 251 -Demon's Souls, 363 -Uncharted 2: Among Thieves, 366 -League of Legends, 455 -Angry Birds, 342 -Limbo, 2 -Red Dead Redemption, 426 -Super Mario Galaxy 2, 271 -Mass Effect 2, 380 -StarCraft II: Wings of Liberty, 300 -Fallout: New Vegas, 383 -Super Meat Boy, 76 -Amnesia: The Dark Descent, 76 -Dark Souls, 437 -Batman: Arkham City, 252 -The Binding of Isaac, 82 -Fez, 1 -Journey, 283 -Hotline Miami, 89 -Far Cry 3, 371 -Dishonored, 89 -XCOM: Enemy Unknown, 292 -Borderlands 2, 303 -Papers, Please, 92 -The Last of Us, 482 -BioShock Infinite, 376 -Dota 2, 402 -The Stanley Parable, 281 -Payday 2, 92 -The Legend of Zelda: A Link Between Worlds, 393 -Super Mario 3D World, 275 -Dark Souls II, 261 -Hearthstone, 99 -Mario Kart 8, 415 -Five Nights at Freddy's, 346 -Shovel Knight, 99 -The Sims 4, 448 -Alien: Isolation, 99 -Dragon Age: Inquisition, 352 -Bloodborne, 436 -Undertale, 359 -Rocket League, 405 -Fallout 4, 385 -Metal Gear Solid V: The Phantom Pain, 424 -Life Is Strange, 290 -Ori and the Blind Forest, 279 -Cities: Skylines, 322 -Dying Light, 107 -Splatoon, 107 -Xenoblade Chronicles X, 107 -Overwatch, 447 -Doom, 431 -Dark Souls III, 266 -Inside, 117 -The Witness, 117 -Pokémon Go, 478 -Uncharted 4: A Thief's End, 368 -Civilization VI, 295 -The Last Guardian, 117 -Final Fantasy XV, 413 -Hollow Knight, 434 -PlayerUnknown's Battlegrounds, 126 -Horizon Zero Dawn, 126 -Super Mario Odyssey, 459 -Cuphead, 280 -Nier: Automata, 126 -Fortnite, 496 -Assassin's Creed Origins, 374 -Monster Hunter: World, 258 -Super Smash Bros. Ultimate, 477 -Celeste, 358 -Dead Cells, 278 -Among Us, 445 -Marvel's Spider-Man, 365 -Assassin's Creed Odyssey, 373 -Detroit: Become Human, 289 -Apex Legends, 404 -Sekiro: Shadows Die Twice, 362 -Resident Evil 2, 262 -Disco Elysium, 357 -Fire Emblem: Three Houses, 152 -Luigi's Mansion 3, 237 -Control, 152 -Death Stranding, 152 -The Outer Worlds, 152 -Call of Duty: Modern Warfare, 306 -Animal Crossing: New Horizons, 481 -The Last of Us Part II, 427 -Hades, 360 -Doom Eternal, 162 -Cyberpunk 2077, 444 -Ghost of Tsushima, 162 -Microsoft Flight Simulator, 162 -Genshin Impact, 403 -Fall Guys, 341 -It Takes Two, 340 -Resident Evil Village, 267 -Forza Horizon 5, 246 -Metroid Dread, 388 -Psychonauts 2, 169 -Ratchet & Clank: Rift Apart, 169 -Halo Infinite, 386 -Returnal, 169 -Monster Hunter Rise, 256 -God of War Ragnarök, 428 -Horizon Forbidden West, 177 -Stray, 177 -Vampire Survivors, 277 -Marvel's Midnight Suns, 177 -Xenoblade Chronicles 3, 177 -Cult of the Lamb, 177 -Overwatch 2, 177 -Call of Duty: Modern Warfare II, 305 -Hogwarts Legacy, 443 -The Legend of Zelda: Tears of the Kingdom, 460 -Alan Wake 2, 190 -Super Mario Bros. Wonder, 420 -Marvel's Spider-Man 2, 364 -Lethal Company, 268 -Dave the Diver, 273 -Street Fighter 6, 409 -Resident Evil 4 (2023), 269 -Armored Core VI: Fires of Rubicon, 190 -Starfield, 190 -The Finals, 190 -Palworld, 263 -Helldivers 2, 260 -Super Metroid, 391 -Yoshi's Island, 222 -EarthBound, 221 -Secret of Mana, 218 -Suikoden II, 217 -Vagrant Story, 9 -Parasite Eve, 166 -Xenogears, 216 -Planescape: Torment, 215 -System Shock 2, 213 -Thief: The Dark Project, 212 -Unreal Tournament, 211 -Quake III Arena, 210 -EverQuest, 209 -Homeworld, 207 -Age of Empires II, 296 -Command & Conquer: Red Alert 2, 206 -Baldur's Gate II: Shadows of Amn, 9 -The Legend of Zelda: Majora's Mask, 396 -Perfect Dark, 205 -Jet Set Radio, 182 -Crazy Taxi, 159 -Tony Hawk's Pro Skater 3, 19 -Gran Turismo 3: A-Spec, 19 -Advance Wars, 19 -Max Payne, 19 -Silent Hill 2, 19 -Jak and Daxter: The Precursor Legacy, 19 -Ikaruga, 19 -Rez, 19 -Kingdom Hearts, 247 -Mafia: The City of Lost Heaven, 28 -Neverwinter Nights, 28 -Medal of Honor: Allied Assault, 28 -Battlefield 1942, 28 -Tom Clancy's Splinter Cell, 28 -The Sims 2, 254 -Fable, 41 -Rome: Total War, 41 -Katamari Damacy, 111 -Burnout 3: Takedown, 87 -Paper Mario: The Thousand-Year Door, 69 -Viewtiful Joe, 36 -Psychonauts, 43 -Killer7, 47 -Civilization IV, 294 -Guild Wars, 47 -Dragon Quest VIII, 250 -Mario Kart DS, 264 -Ōkami, 53 -Company of Heroes, 7 -The Legend of Zelda: Phantom Hourglass, 272 -Crackdown, 59 -S.T.A.L.K.E.R.: Shadow of Chernobyl, 6 -Team Fortress 2, 308 -Crysis, 59 -The Orange Box, 307 -Patapon, 59 -No More Heroes, 59 -Valkyria Chronicles, 65 -Persona 4, 354 -Dead Space 2, 82 -F.E.A.R., 47 -Mirror's Edge, 5 -Left 4 Dead 2, 309 -Dragon Age: Origins, 353 -Dawn of War II, 71 -Plants vs. Zombies, 343 -Bayonetta, 71 -Forza Motorsport 3, 240 -L.A. Noire, 82 -Saints Row: The Third, 82 -Deus Ex: Human Revolution, 82 -The Witcher 2: Assassins of Kings, 381 -Dead Island, 82 -Rayman Origins, 82 -The Walking Dead: Season Two, 92 -Far Cry 4, 370 -Middle-earth: Shadow of Mordor, 99 -Darkest Dungeon, 117 -The Talos Principle, 99 -Alien Swarm, 76 -The Crew, 99 -Until Dawn, 107 -Splatoon 2, 126 -Persona 5, 356 -Firewatch, 288 -The Banner Saga, 99 -Divinity: Original Sin, 99 -Divinity: Original Sin 2, 351 -Thumper, 117 -Nioh, 126 -Prey, 126 -What Remains of Edith Finch, 286 -Night in the Woods, 126 -Injustice 2, 126 -Tekken 7, 407 -Divinity: Original Sin 2 - Definitive Edition, 138 -A Way Out, 138 -Frostpunk, 138 -Subnautica, 339 -Into the Breach, 138 -Return of the Obra Dinn, 284 -Gris, 138 -Tetris Effect, 138 -Forza Horizon 4, 244 -Dragon Ball FighterZ, 255 -Octopath Traveler, 138 -The Messenger, 138 -Katana ZERO, 152 -Outer Wilds, 285 -Slay the Spire, 349 -Baba Is You, 152 -A Plague Tale: Innocence, 152 -Sayonara Wild Hearts, 152 -The Legend of Zelda: Link's Awakening, 394 -Pokémon Gold/Silver, 468 -Pokémon Ruby/Sapphire, 466 -Pokémon Diamond/Pearl, 465 -Pokémon Black/White, 464 -Pokémon X/Y, 462 -Pokémon Sun/Moon, 274 -Pokémon Sword/Shield, 467 -Pokémon Scarlet/Violet, 470 -Kirby Super Star, 226 -Kirby and the Forgotten Land, 227 -Donkey Kong Country 2: Diddy's Kong Quest, 224 -Donkey Kong Country: Tropical Freeze, 223 -Pikmin, 233 -Pikmin 2, 229 -Pikmin 3, 228 -Luigi's Mansion, 238 -WarioWare, Inc.: Mega Microgame$!, 36 -Rhythm Heaven, 53 -Professor Layton and the Curious Village, 239 -Ghost Trick: Phantom Detective, 241 -Phoenix Wright: Ace Attorney, 245 -Danganronpa: Trigger Happy Havoc, 243 -Zero Escape: Nine Hours, Nine Persons, Nine Doors, 71 -The House in Fata Morgana, 76 -Doki Doki Literature Club!, 345 -Inscryption, 347 -Balatro, 348 -Animal Well, 201 -Cocoon, 190 -Chants of Sennaar, 190 -The Talos Principle 2, 190 -Sea of Stars, 190 -Dredge, 190 -Hi-Fi Rush, 190 -Lies of P, 190 -Remnant II, 190 -Warhammer 40,000: Space Marine 2, 235 -Tekken 8, 408 -Like a Dragon: Infinite Wealth, 201 -Persona 3 Reload, 257 -Unicorn Overlord, 201 -Prince of Persia: The Lost Crown, 201 -Thank Goodness You're Here!, 201 -UFO 50, 201 -Satisfactory, 324 -Factorio, 326 -RimWorld, 325 -Oxygen Not Included, 152 -Kerbal Space Program, 319 -Euro Truck Simulator 2, 323 -American Truck Simulator, 117 -Planet Coaster, 320 -Planet Zoo, 152 -Two Point Hospital, 138 -RollerCoaster Tycoon, 172 -Football Manager 2024, 315 -FIFA 23, 318 -NBA 2K24, 317 -WWE 2K24, 232 -Tony Hawk's Pro Skater 1 + 2, 311 -Gran Turismo 7, 314 -Forza Motorsport, 249 -F1 23, 234 -Trackmania, 162 -Need for Speed: Most Wanted, 313 -Burnout Paradise, 65 -SSX 3, 36 -F1 2020, 230 -This War of Mine, 99 -Don't Starve, 328 -Don't Starve Together, 329 -Valheim, 337 -The Forest, 332 -Sons of the Forest, 331 -Green Hell, 152 -Project Zomboid, 334 -DayZ, 330 -Rust, 336 -ARK: Survival Evolved, 335 -Conan Exiles, 138 -Grounded, 177 -Raft, 138 -The Long Dark, 126 -Subnautica: Below Zero, 169 +Minecraft +Grand Theft Auto V +The Legend of Zelda: Breath of the Wild +Fortnite +Tetris +Super Mario Bros. +Pokémon Red/Blue +Red Dead Redemption 2 +Mario Kart 8 Deluxe +The Elder Scrolls V: Skyrim +Stardew Valley +The Witcher 3: Wild Hunt +Elden Ring +Baldur's Gate 3 +Terraria +The Last of Us +Animal Crossing: New Horizons +Super Mario 64 +Pokémon Go +Super Smash Bros. Ultimate +Wii Sports +Grand Theft Auto: San Andreas +Grand Theft Auto III +Grand Theft Auto: Vice City +Sonic the Hedgehog +Pokémon Scarlet/Violet +Pokémon Gold/Silver +Pokémon Sword/Shield +Pokémon Ruby/Sapphire +Pokémon Diamond/Pearl +Pokémon Black/White +Pokémon X/Y +The Legend of Zelda: Ocarina of Time +The Legend of Zelda: Tears of the Kingdom +Super Mario Odyssey +Call of Duty 4: Modern Warfare +Call of Duty +League of Legends +Counter-Strike +World of Warcraft +Half-Life +Half-Life 2 +The Sims +The Sims 4 +Overwatch +Among Us +Cyberpunk 2077 +Hogwarts Legacy +Baldur's Gate +Final Fantasy VII +Resident Evil 4 +Resident Evil +Dark Souls +Bloodborne +Hollow Knight +Portal +Portal 2 +Doom +God of War +God of War Ragnarök +The Last of Us Part II +Red Dead Redemption +Metal Gear Solid +Metal Gear Solid V: The Phantom Pain +Super Mario World +Super Mario Galaxy +Super Mario Bros. Wonder +Super Smash Bros. +Super Smash Bros. Melee +Super Smash Bros. Brawl +Mario Kart 8 +New Super Mario Bros. Wii +Final Fantasy XV +Final Fantasy +Street Fighter II +Street Fighter 6 +Tekken 8 +Tekken 7 +Rocket League +Apex Legends +Genshin Impact +Dota 2 +The Legend of Zelda +The Legend of Zelda: A Link to the Past +The Legend of Zelda: Twilight Princess +The Legend of Zelda: The Wind Waker +The Legend of Zelda: Majora's Mask +The Legend of Zelda: Link's Awakening +The Legend of Zelda: A Link Between Worlds +Metroid +Super Metroid +Metroid Prime +Metroid Dread +Halo: Combat Evolved +Halo Infinite +Fallout 4 +Fallout: New Vegas +Fallout 3 +The Witcher 2: Assassins of Kings +Mass Effect 2 +Mass Effect +BioShock +BioShock Infinite +Assassin's Creed +Assassin's Creed Origins +Assassin's Creed Odyssey +Far Cry 3 +Far Cry 4 +Tomb Raider +Uncharted 4: A Thief's End +Uncharted 2: Among Thieves +Marvel's Spider-Man +Marvel's Spider-Man 2 +Demon's Souls +Sekiro: Shadows Die Twice +Hades +Undertale +Celeste +Disco Elysium +Persona 5 +Persona 4 +Dragon Age: Origins +Dragon Age: Inquisition +Divinity: Original Sin 2 +Slay the Spire +Balatro +Inscryption +Five Nights at Freddy's +Doki Doki Literature Club! +Plants vs. Zombies +Angry Birds +Fall Guys +It Takes Two +Subnautica +Valheim +Rust +ARK: Survival Evolved +Project Zomboid +The Forest +Sons of the Forest +DayZ +Don't Starve Together +Don't Starve +Factorio +RimWorld +Satisfactory +Euro Truck Simulator 2 +Cities: Skylines +Planet Coaster +Kerbal Space Program +FIFA 23 +NBA 2K24 +Football Manager 2024 +Gran Turismo 7 +Need for Speed: Most Wanted +Tony Hawk's Pro Skater 2 +Tony Hawk's Pro Skater 1 + 2 +Left 4 Dead 2 +Team Fortress 2 +The Orange Box +Call of Duty: Modern Warfare +Call of Duty: Modern Warfare II +Borderlands 2 +Diablo II +StarCraft +StarCraft II: Wings of Liberty +Warcraft III: Reign of Chaos +Age of Empires +Age of Empires II +Civilization VI +Civilization IV +XCOM: Enemy Unknown +Life Is Strange +Detroit: Become Human +Firewatch +What Remains of Edith Finch +Outer Wilds +Return of the Obra Dinn +Journey +The Stanley Parable +Cuphead +Ori and the Blind Forest +Dead Cells +Vampire Survivors +Super Mario 3D World +Pokémon Sun/Moon +Dave the Diver +The Legend of Zelda: Phantom Hourglass +Super Mario Galaxy 2 +Resident Evil 4 (2023) +Lethal Company +Resident Evil Village +Dark Souls III +Mario Kart DS +Palworld +Resident Evil 2 +Dark Souls II +Helldivers 2 +Monster Hunter: World +Persona 3 Reload +Monster Hunter Rise +Dragon Ball FighterZ +The Sims 2 +Batman: Arkham City +Batman: Arkham Asylum +Dragon Quest VIII +Forza Motorsport +Kingdom Hearts +Forza Horizon 5 +Phoenix Wright: Ace Attorney +Forza Horizon 4 +Danganronpa: Trigger Happy Havoc +Ghost Trick: Phantom Detective +Forza Motorsport 3 +Professor Layton and the Curious Village +Luigi's Mansion +Luigi's Mansion 3 +Warhammer 40, 000: Space Marine 2 +F1 23 +Pikmin +WWE 2K24 +F1 2020 +Pikmin 2 +Pikmin 3 +Kirby and the Forgotten Land +Kirby Super Star +Donkey Kong Country 2: Diddy's Kong Quest +Donkey Kong Country: Tropical Freeze +Yoshi's Island +EarthBound +Chrono Trigger +Secret of Mana +Suikoden II +Xenogears +Planescape: Torment +System Shock 2 +Thief: The Dark Project +Unreal Tournament +Quake III Arena +EverQuest +Homeworld +Command & Conquer: Red Alert 2 +Perfect Dark +Animal Well +Like a Dragon: Infinite Wealth +Unicorn Overlord +Prince of Persia: The Lost Crown +Thank Goodness You're Here! +UFO 50 +Alan Wake 2 +Armored Core VI: Fires of Rubicon +Starfield +The Finals +Cocoon +Chants of Sennaar +The Talos Principle 2 +Sea of Stars +Dredge +Hi-Fi Rush +Lies of P +Remnant II +Jet Set Radio +Horizon Forbidden West +Stray +Marvel's Midnight Suns +Xenoblade Chronicles 3 +Cult of the Lamb +Overwatch 2 +Grounded +RollerCoaster Tycoon +Psychonauts 2 +Ratchet & Clank: Rift Apart +Returnal +Subnautica: Below Zero +Parasite Eve +GoldenEye 007 +Doom Eternal +Ghost of Tsushima +Microsoft Flight Simulator +Trackmania +Crazy Taxi +Fire Emblem: Three Houses +Control +Death Stranding +The Outer Worlds +Katana ZERO +Baba Is You +A Plague Tale: Innocence +Sayonara Wild Hearts +Oxygen Not Included +Planet Zoo +Green Hell +Divinity: Original Sin 2 - Definitive Edition +A Way Out +Frostpunk +Into the Breach +Gris +Tetris Effect +Octopath Traveler +The Messenger +Two Point Hospital +Conan Exiles +Raft +PlayerUnknown's Battlegrounds +Horizon Zero Dawn +Nier: Automata +Splatoon 2 +Nioh +Prey +Night in the Woods +Injustice 2 +The Long Dark +Inside +The Witness +The Last Guardian +Darkest Dungeon +Thumper +American Truck Simulator +Castlevania III: Dracula's Curse +Katamari Damacy +Mega Man 2 +Dying Light +Splatoon +Xenoblade Chronicles X +Until Dawn +Hearthstone +Shovel Knight +Alien: Isolation +Middle-earth: Shadow of Mordor +The Talos Principle +The Crew +The Banner Saga +Divinity: Original Sin +This War of Mine +Papers +Payday 2 +The Walking Dead: Season Two +Hotline Miami +Dishonored +Burnout 3: Takedown +The Binding of Isaac +Dead Space 2 +L.A. Noire +Saints Row: The Third +Deus Ex: Human Revolution +Dead Island +Rayman Origins +Super Meat Boy +Amnesia: The Dark Descent +Alien Swarm +The House in Fata Morgana +Dawn of War II +Bayonetta +Zero Escape: Nine Hours, Nine Persons, Nine Doors +Paper Mario: The Thousand-Year Door +Left 4 Dead +Dead Space +LittleBigPlanet +Valkyria Chronicles +Burnout Paradise +Rock Band +Crackdown +Crysis +Patapon +No More Heroes +The Elder Scrolls IV: Oblivion +Gears of War +Bully +Ōkami +Rhythm Heaven +Shadow of the Colossus +Guitar Hero +Killer7 +Guild Wars +F.E.A.R. +Psychonauts +Metal Gear Solid 3: Snake Eater +Fable +Rome: Total War +Star Wars: Knights of the Old Republic +Prince of Persia: The Sands of Time +Beyond Good & Evil +Viewtiful Joe +WarioWare, Inc.: Mega Microgame$! +SSX 3 +The Elder Scrolls III: Morrowind +Mafia: The City of Lost Heaven +Neverwinter Nights +Medal of Honor: Allied Assault +Battlefield 1942 +Tom Clancy's Splinter Cell +Animal Crossing +Ico +Tony Hawk's Pro Skater 3 +Gran Turismo 3: A-Spec +Advance Wars +Max Payne +Silent Hill 2 +Jak and Daxter: The Precursor Legacy +Ikaruga +Rez +Okami +Deus Ex +Vagrant Story +Baldur's Gate II: Shadows of Amn +Company of Heroes +S.T.A.L.K.E.R.: Shadow of Chernobyl +Mirror's Edge +Braid +Limbo +Fez \ No newline at end of file From 4becf25a83fa3202c99fd2535bdd9680743fd043 Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Sat, 14 Nov 2026 23:33:41 -0300 Subject: [PATCH 7/9] chore: criando docker para o projeto --- .github/workflows/ci.yml | 41 +++++++++++++++++++++++++--- backend/.dockerignore | 18 +++++++++++++ backend/Dockerfile | 17 ++++++++++++ backend/src/config/lifespan.py | 16 ++++++----- backend/src/main.py | 3 ++- backend/tests/conftest.py | 2 +- docker-compose.yml | 48 +++++++++++++++++++++++++++++++++ frontend/.dockerignore | 49 ++++++++++++++++++++++++++++++++++ frontend/Dockerfile | 20 ++++++++++++++ frontend/vite.config.js | 3 +++ 10 files changed, 204 insertions(+), 13 deletions(-) create mode 100644 backend/.dockerignore create mode 100644 backend/Dockerfile create mode 100644 docker-compose.yml create mode 100644 frontend/.dockerignore create mode 100644 frontend/Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dda1aa6..524b2b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,12 +2,12 @@ name: Vite React CI (Frontend) on: push: - branches: [ "main" ] + branches: [ "main", "refactor/backend" ] pull_request: - branches: [ "main" ] + branches: [ "main", "refactore/backend" ] jobs: - build-test-and-lint: + build-test-and-lint-frontend: runs-on: ubuntu-latest # Isso avisa ao GitHub que todos os comandos 'run' devem ser executados dentro da pasta frontend @@ -41,4 +41,37 @@ jobs: run: npm run test:ci - name: Build da aplicação (Verificação de compilação) - run: npm run build \ No newline at end of file + run: npm run build + + build-test-and-lint-backend: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./backend + + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + + steps: + + - name: Checkout do código + uses: actions/checkout@v4 + + - name: Configurar Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Instalar as dependências + run: | + python -m pip install --upgrade pip + pip install pylint + pip install -r requirements.txt + + - name: Rodar Linter (Verificação de código) + run: pylint $(git ls-files '*.py') + + - name: Rodar Testes + run: pytest tests \ No newline at end of file diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 0000000..2a8be59 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,18 @@ +# Virtual enviroments +.venv + +# Docker & Documentation +Dockerfile +.dockerignore +**/*.md +docs/ +*/.env.example + +# Python Cache & Artifacts +__pycache__/ +*.pyc + +# Testing & Linting Caches +tests/ +.pytest_cache + diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..ec3034b --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.14.10-alpine3.24 AS production + +WORKDIR /api + +COPY requirements.txt . + +RUN pip install --no-cache-dir -r requirements.txt + +RUN addgroup -S appgroup && adduser -S -D -G appgroup appuser + +COPY --chown=appuser:appgroup . . + +ENV PYTHONDONTWRITEBYTECODE=1 + +USER appuser + +CMD ["fastapi", "run", "src/main.py"] \ No newline at end of file diff --git a/backend/src/config/lifespan.py b/backend/src/config/lifespan.py index 47d8d4a..d0cfd59 100644 --- a/backend/src/config/lifespan.py +++ b/backend/src/config/lifespan.py @@ -35,13 +35,14 @@ def read_env(self): "LOAD_GAMES" ] - for val in env_keys: - if val not in self.env.keys(): - raise ValueError(f"Campo {val} faltando no .env!") + for key in env_keys: + if key not in self.env.keys(): + raise ValueError(f"Campo {key} faltando no .env!") - for key, value in self.env.items(): - val = int(value) if value.isdigit() else value - setattr(self, key.lower(), val) + else: + value = str(self.env[key]) + parsed_value = int(value) if value.isdigit() else value + setattr(self, key.lower(), parsed_value) if self.load_games not in ["all", "skip", "new"]: raise ValueError('O campo LOAD_GAMES tem que ser "all", "skip" ou "new"!') @@ -108,7 +109,8 @@ async def create_external_pool(self): async def load_games_into_db(self, conn): """Joga os games do JSON para a tabela de games""" - json_path = Path.cwd().parent / "data" + cwd = Path.cwd() + json_path = cwd.parent / "data" if cwd.name not in ["backend", "api"] else cwd / "data" games_json = [f for f in json_path.iterdir() if f.is_file() and f.suffix == ".json"][0] with open(games_json, "r", encoding="utf-8") as file: diff --git a/backend/src/main.py b/backend/src/main.py index 147f0be..80f3353 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -4,13 +4,14 @@ from fastapi.exceptions import RequestValidationError from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import JSONResponse +import os from .config import LifespanConfig from .middlewares import * from .routes import auth_router, game_router, list_router, review_router, user_router from .utils.errors import QueryError -env = dotenv_values("../.env") +env = {**dotenv_values(), **os.environ} lifespan = LifespanConfig(env) app = FastAPI(lifespan=lifespan) diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index 6520640..e094ee9 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -4,7 +4,7 @@ import pytest import requests -load_dotenv("../.env") +load_dotenv() os.environ["BASE_URL"] = os.getenv("BACK_URL") from .utils import ( diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c629807 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,48 @@ +name: Gamerboxd + +services: + frontend: + build: + context: ./frontend + target: production + ports: + - 5173:80 + depends_on: + - backend + + backend: + build: + context: ./backend + target: production + + environment: + DB_HOST: db + env_file: + - .env + + ports: + - 8000:8000 + depends_on: + db: + condition: service_healthy + + db: + image: postgres:18.7-alpine3.24 + restart: unless-stopped + volumes: + - pgdata:/var/lib/postgresql + + environment: + POSTGRES_USER: ${VM_USER} + POSTGRES_PASSWORD: ${VM_PASS} + + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 10s + + +volumes: + pgdata: \ No newline at end of file diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..d6a94ac --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,49 @@ +# Ignore dependencies and build output +node_modules/ +dist/ +out/ +.tmp/ +.cache/ + +# Ignore Vite, Webpack, and React-specific build artifacts +.vite/ +.vitepress/ +.eslintcache +.npm/ +coverage/ +jest/ +cypress/ +cypress/screenshots/ +cypress/videos/ +reports/ + +# Ignore environment and config files (sensitive data) +*.env* +*.log + +# Ignore TypeScript build artifacts (if using TypeScript) +*.tsbuildinfo + +# Ignore lockfiles (optional if using Docker for package installation) +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# Ignore local development files +.git/ +.gitignore +.vscode/ +.idea/ +*.swp +.DS_Store +Thumbs.db + +# Ignore Docker-related files (to avoid copying unnecessary configs) +Dockerfile +.dockerignore +docker-compose.yml +docker-compose.override.yml + +# Ignore build-specific cache files +*.lock \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..96bd0bd --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,20 @@ +FROM node:27.0.0-alpha.0.1.0-alpine3.24 AS builder + +WORKDIR /web + +COPY package.json ./ +COPY package-lock.json* ./ + +RUN --mount=type=cache,target=/root/.npm npm ci + +COPY . . + +RUN npm run build + +FROM nginxinc/nginx-unprivileged:stable-alpine AS production + +COPY --from=builder /web/dist /usr/share/nginx/html + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/frontend/vite.config.js b/frontend/vite.config.js index b8c67cd..b4b9c84 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -7,6 +7,9 @@ export default defineConfig({ react(), tailwindcss(), ], + server:{ + host: true, + }, test: { globals: true, environment: 'jsdom', From faa909f4603aa5517edcc7fc3710aad463a5dbc3 Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Sat, 14 Nov 2026 23:37:31 -0300 Subject: [PATCH 8/9] =?UTF-8?q?fix:=20corrigindo=20erro=20de=20digita?= =?UTF-8?q?=C3=A7=C3=A3o=20no=20ci.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 524b2b9..47b60e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: branches: [ "main", "refactor/backend" ] pull_request: - branches: [ "main", "refactore/backend" ] + branches: [ "main", "refactor/backend" ] jobs: build-test-and-lint-frontend: From 43094168022044169ff2fd0cb1dace5a3dc346d7 Mon Sep 17 00:00:00 2001 From: CLQueirozz Date: Sat, 14 Nov 2026 23:40:30 -0300 Subject: [PATCH 9/9] =?UTF-8?q?fix:=20corrigindo=20vers=C3=B5es=20do=20pyt?= =?UTF-8?q?hin=20para=20mais=20recentes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47b60e6..66d4b91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.11", "3.12"] steps: