Skip to content

Commit

Permalink
Ignore all unknown api attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
solesensei committed Sep 21, 2021
1 parent fedcf43 commit 629fad7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ _feel free to contribute and create issues_

## Plans

- rewrite on official [notion api](https://developers.notion.com/)
- connect to existing page
- update existing page values, do not recreate databases
- add options for setting status
Expand Down
25 changes: 14 additions & 11 deletions ngl/models/steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def __init__(
discount_percent: int,
initial_formatted: str,
final_formatted: str,
**kwargs
):
self.currency = currency
self.initial = initial
Expand All @@ -33,7 +34,8 @@ def __init__(
option_description: str,
can_get_free_license: str,
is_free_license: bool,
price_in_cents_with_discount: int
price_in_cents_with_discount: int,
**kwargs
):
self.packageid = packageid
self.percent_savings_text = percent_savings_text
Expand Down Expand Up @@ -77,21 +79,21 @@ def load(cls, d: tp.Optional[dict]):

class SteamStoreAppCategory(BaseModel):

def __init__(self, id: int, description: str):
def __init__(self, id: int, description: str, **kwargs):
self.id = id
self.description = description


class SteamStoreAppGenre(BaseModel):

def __init__(self, id: str, description: str):
def __init__(self, id: str, description: str, **kwargs):
self.id = id
self.description = description


class SteamStoreAppScreenshot(BaseModel):

def __init__(self, id: int, path_thumbnail: str, path_full: str):
def __init__(self, id: int, path_thumbnail: str, path_full: str, **kwargs):
self.id = id
self.path_thumbnail = path_thumbnail
self.path_full = path_full
Expand All @@ -106,7 +108,8 @@ def __init__(
thumbnail: str,
webm: tp.Dict[str, str],
mp4: tp.Dict[str, str],
highlight: bool
highlight: bool,
**kwargs
):
self.id = id
self.name = name
Expand All @@ -118,21 +121,21 @@ def __init__(

class SteamStoreAppMetacriticScore(BaseModel):

def __init__(self, score: int, url: tp.Optional[str] = None):
def __init__(self, score: int, url: tp.Optional[str] = None, **kwargs):
self.score = score
self.url = url


class SteamStoreAppAchievementHighlighted(BaseModel):

def __init__(self, name: str, path: str):
def __init__(self, name: str, path: str, **kwargs):
self.name = name
self.path = path


class SteamStoreAppAchievements(BaseModel):

def __init__(self, total: int, highlighted: tp.List[SteamStoreAppAchievementHighlighted]):
def __init__(self, total: int, highlighted: tp.List[SteamStoreAppAchievementHighlighted], **kwargs):
self.total = total
self.highlighted = highlighted

Expand All @@ -146,21 +149,21 @@ def load(cls, d: tp.Optional[dict]):

class SteamStoreAppReleaseDate(BaseModel):

def __init__(self, coming_soon: bool, date: str):
def __init__(self, coming_soon: bool, date: str, **kwargs):
self.coming_soon = coming_soon
self.date = date if date else None


class SteamStoreAppSupportInfo(BaseModel):

def __init__(self, url: str, email: str):
def __init__(self, url: str, email: str, **kwargs):
self.url = url
self.email = email


class SteamStoreAppContentDescriptors(BaseModel):

def __init__(self, ids: tp.List[int], notes: str):
def __init__(self, ids: tp.List[int], notes: str, **kwargs):
self.ids = ids
self.notes = notes

Expand Down

0 comments on commit 629fad7

Please sign in to comment.