Skip to content

Commit

Permalink
add SeasonType enum and update Season model
Browse files Browse the repository at this point in the history
  • Loading branch information
staciax committed Dec 29, 2024
1 parent 9490dc9 commit 8ac952a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions valorant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
MissionType,
RelationType,
RewardType,
SeasonType,
WeaponCategory,
)
from .errors import BadRequest, Forbidden, HTTPException, InternalServerError, RateLimited, ValorantError
Expand All @@ -42,6 +43,7 @@
'RateLimited',
'RelationType',
'RewardType',
'SeasonType',
'ValorantError',
'WeaponCategory',
'models',
Expand Down
5 changes: 5 additions & 0 deletions valorant/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'MissionType',
'RelationType',
'RewardType',
'SeasonType',
'WeaponCategory',
)

Expand Down Expand Up @@ -108,6 +109,10 @@ class RewardType(str, Enum):
spray = 'Spray'


class SeasonType(str, Enum):
act = 'EAresSeasonType::Act'


class WeaponCategory(str, Enum):
melee = 'EEquippableCategory::Melee'
sidearm = 'EEquippableCategory::Sidearm'
Expand Down
3 changes: 2 additions & 1 deletion valorant/models/seasons.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

from pydantic import Field

from ..enums import SeasonType
from .base import BaseUUIDModel, LocalizedField

__all__ = (
Expand All @@ -46,7 +47,7 @@ class Season(BaseUUIDModel):
# uuid: str
display_name: LocalizedField = Field(alias='displayName')
title: LocalizedField | None
type: str | None
type: SeasonType | None
start_time: datetime = Field(alias='startTime')
end_time: datetime = Field(alias='endTime')
parent_uuid: UUID | None = Field(alias='parentUuid')
Expand Down

0 comments on commit 8ac952a

Please sign in to comment.