Module valolyticspy.dtos.valorant_api.contract
Expand source code
from pydantic import BaseModel
from typing import List, Optional
class Reward(BaseModel):
"""
Represents a reward in the Valorant API.
Attributes:
type (str): The type of the reward.
uuid (str): The unique identifier of the reward.
amount (int): The amount of the reward.
isHighlighted (bool): Indicates whether the reward is highlighted or not.
"""
type: str
uuid: str
amount: int
isHighlighted: bool
class Level(BaseModel):
"""
Represents a level in the Valorant API.
Attributes:
reward (Reward): The reward associated with the level.
xp (int): The amount of XP required to reach the level.
vpCost (int): The cost in Valorant Points (VP) to purchase the level.
isPurchasableWithVP (bool): Indicates whether the level is purchasable with VP.
doughCost (int): The cost in dough to purchase the level.
isPurchasableWithDough (bool): Indicates whether the level is purchasable with dough.
"""
reward: Reward
xp: int
vpCost: int
isPurchasableWithVP: bool
doughCost: int
isPurchasableWithDough: bool
class Chapter(BaseModel):
"""
Represents a chapter in a game.
Attributes:
isEpilogue (bool): Indicates whether the chapter is an epilogue.
levels (List[Level]): A list of levels in the chapter.
freeRewards (Optional[List[Reward]]): An optional list of free rewards available in the chapter.
"""
isEpilogue: bool
levels: List[Level]
freeRewards: Optional[List[Reward]] = None
class Content(BaseModel):
"""
Represents the content information.
Attributes:
relationType (Optional[str]): The relation type.
relationUuid (Optional[str]): The relation UUID.
chapters (List[Chapter]): The list of chapters.
premiumRewardScheduleUuid (Optional[str]): The premium reward schedule UUID.
premiumVPCost (int): The premium VP cost.
"""
relationType: Optional[str] = None
relationUuid: Optional[str] = None
chapters: List[Chapter]
premiumRewardScheduleUuid: Optional[str] = None
premiumVPCost: int
class Contract(BaseModel):
"""
Represents a contract in the Valorant API.
Attributes:
uuid (str): The UUID of the contract.
displayName (str): The display name of the contract.
displayIcon (str, optional): The display icon of the contract. Defaults to None.
shipIt (bool): Indicates whether the contract is ready to be shipped.
useLevelVPCostOverride (bool): Indicates whether the contract uses a level VP cost override.
levelVPCostOverride (int): The level VP cost override of the contract.
freeRewardScheduleUuid (str): The UUID of the free reward schedule associated with the contract.
content (Content): The content of the contract.
assetPath (str): The asset path of the contract.
"""
uuid: str
displayName: str
displayIcon: Optional[str] = None
shipIt: bool
useLevelVPCostOverride: bool
levelVPCostOverride: int
freeRewardScheduleUuid: str
content: Content
assetPath: str
Classes
class Chapter (**data: Any)-
Represents a chapter in a game.
Attributes
isEpilogue:bool- Indicates whether the chapter is an epilogue.
levels:List[Level]- A list of levels in the chapter.
freeRewards:Optional[List[Reward]]- An optional list of free rewards available in the chapter.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Expand source code
class Chapter(BaseModel): """ Represents a chapter in a game. Attributes: isEpilogue (bool): Indicates whether the chapter is an epilogue. levels (List[Level]): A list of levels in the chapter. freeRewards (Optional[List[Reward]]): An optional list of free rewards available in the chapter. """ isEpilogue: bool levels: List[Level] freeRewards: Optional[List[Reward]] = NoneAncestors
- pydantic.main.BaseModel
Class variables
var freeRewards : Optional[List[Reward]]var isEpilogue : boolvar levels : List[Level]var model_computed_fieldsvar model_configvar model_fields
class Content (**data: Any)-
Represents the content information.
Attributes
relationType:Optional[str]- The relation type.
relationUuid:Optional[str]- The relation UUID.
chapters:List[Chapter]- The list of chapters.
premiumRewardScheduleUuid:Optional[str]- The premium reward schedule UUID.
premiumVPCost:int- The premium VP cost.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Expand source code
class Content(BaseModel): """ Represents the content information. Attributes: relationType (Optional[str]): The relation type. relationUuid (Optional[str]): The relation UUID. chapters (List[Chapter]): The list of chapters. premiumRewardScheduleUuid (Optional[str]): The premium reward schedule UUID. premiumVPCost (int): The premium VP cost. """ relationType: Optional[str] = None relationUuid: Optional[str] = None chapters: List[Chapter] premiumRewardScheduleUuid: Optional[str] = None premiumVPCost: intAncestors
- pydantic.main.BaseModel
Class variables
var chapters : List[Chapter]var model_computed_fieldsvar model_configvar model_fieldsvar relationType : Optional[str]var relationUuid : Optional[str]
class Contract (**data: Any)-
Represents a contract in the Valorant API.
Attributes
uuid:str- The UUID of the contract.
displayName:str- The display name of the contract.
displayIcon:str, optional- The display icon of the contract. Defaults to None.
shipIt:bool- Indicates whether the contract is ready to be shipped.
useLevelVPCostOverride:bool- Indicates whether the contract uses a level VP cost override.
levelVPCostOverride:int- The level VP cost override of the contract.
freeRewardScheduleUuid:str- The UUID of the free reward schedule associated with the contract.
content:Content- The content of the contract.
assetPath:str- The asset path of the contract.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Expand source code
class Contract(BaseModel): """ Represents a contract in the Valorant API. Attributes: uuid (str): The UUID of the contract. displayName (str): The display name of the contract. displayIcon (str, optional): The display icon of the contract. Defaults to None. shipIt (bool): Indicates whether the contract is ready to be shipped. useLevelVPCostOverride (bool): Indicates whether the contract uses a level VP cost override. levelVPCostOverride (int): The level VP cost override of the contract. freeRewardScheduleUuid (str): The UUID of the free reward schedule associated with the contract. content (Content): The content of the contract. assetPath (str): The asset path of the contract. """ uuid: str displayName: str displayIcon: Optional[str] = None shipIt: bool useLevelVPCostOverride: bool levelVPCostOverride: int freeRewardScheduleUuid: str content: Content assetPath: strAncestors
- pydantic.main.BaseModel
Class variables
var assetPath : strvar content : Contentvar displayIcon : Optional[str]var displayName : strvar freeRewardScheduleUuid : strvar levelVPCostOverride : intvar model_computed_fieldsvar model_configvar model_fieldsvar shipIt : boolvar useLevelVPCostOverride : boolvar uuid : str
class Level (**data: Any)-
Represents a level in the Valorant API.
Attributes
reward:Reward- The reward associated with the level.
xp:int- The amount of XP required to reach the level.
vpCost:int- The cost in Valorant Points (VP) to purchase the level.
isPurchasableWithVP:bool- Indicates whether the level is purchasable with VP.
doughCost:int- The cost in dough to purchase the level.
isPurchasableWithDough:bool- Indicates whether the level is purchasable with dough.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Expand source code
class Level(BaseModel): """ Represents a level in the Valorant API. Attributes: reward (Reward): The reward associated with the level. xp (int): The amount of XP required to reach the level. vpCost (int): The cost in Valorant Points (VP) to purchase the level. isPurchasableWithVP (bool): Indicates whether the level is purchasable with VP. doughCost (int): The cost in dough to purchase the level. isPurchasableWithDough (bool): Indicates whether the level is purchasable with dough. """ reward: Reward xp: int vpCost: int isPurchasableWithVP: bool doughCost: int isPurchasableWithDough: boolAncestors
- pydantic.main.BaseModel
Class variables
var doughCost : intvar isPurchasableWithDough : boolvar isPurchasableWithVP : boolvar model_computed_fieldsvar model_configvar model_fieldsvar reward : Rewardvar vpCost : intvar xp : int
class Reward (**data: Any)-
Represents a reward in the Valorant API.
Attributes
type:str- The type of the reward.
uuid:str- The unique identifier of the reward.
amount:int- The amount of the reward.
isHighlighted:bool- Indicates whether the reward is highlighted or not.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Expand source code
class Reward(BaseModel): """ Represents a reward in the Valorant API. Attributes: type (str): The type of the reward. uuid (str): The unique identifier of the reward. amount (int): The amount of the reward. isHighlighted (bool): Indicates whether the reward is highlighted or not. """ type: str uuid: str amount: int isHighlighted: boolAncestors
- pydantic.main.BaseModel
Class variables
var amount : intvar isHighlighted : boolvar model_computed_fieldsvar model_configvar model_fieldsvar type : strvar uuid : str