-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #661 from rommapp/mobygames-new-api
Mobygames API support
- Loading branch information
Showing
61 changed files
with
112,610 additions
and
895 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"""empty message | ||
Revision ID: 0015_mobygames_data | ||
Revises: 0014_asset_files | ||
Create Date: 2024-02-13 17:57:25.936825 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import mysql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "0015_mobygames_data" | ||
down_revision = "0014_asset_files" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("platforms", schema=None) as batch_op: | ||
batch_op.add_column(sa.Column("moby_id", sa.Integer(), nullable=True)) | ||
|
||
with op.batch_alter_table("roms", schema=None) as batch_op: | ||
batch_op.add_column(sa.Column("moby_id", sa.Integer(), nullable=True)) | ||
batch_op.add_column(sa.Column("moby_metadata", mysql.JSON(), nullable=True)) | ||
|
||
with op.batch_alter_table("roms", schema=None) as batch_op: | ||
batch_op.execute("update roms set moby_metadata = '\\{\\}'") | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("roms", schema=None) as batch_op: | ||
batch_op.drop_column("moby_metadata") | ||
batch_op.drop_column("moby_id") | ||
|
||
with op.batch_alter_table("platforms", schema=None) as batch_op: | ||
batch_op.drop_column("moby_id") | ||
|
||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
from handler.igdb_handler import IGDBRom | ||
from pydantic import BaseModel | ||
|
||
|
||
class SearchRomSchema(IGDBRom): | ||
pass | ||
class SearchRomSchema(BaseModel): | ||
igdb_id: int | None = None | ||
moby_id: int | None = None | ||
slug: str | ||
name: str | ||
summary: str | ||
url_cover: str | ||
url_screenshots: list[str] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.