Module valolyticspy.dtos.valorant_api.agent
Expand source code
from pydantic import BaseModel
from typing import List, Optional
from datetime import datetime
class Role(BaseModel):
"""
Represents a role in the Valorant game.
Attributes:
uuid (str): The unique identifier of the role.
displayName (str): The display name of the role.
description (str): The description of the role.
displayIcon (str): The display icon of the role.
assetPath (str): The asset path of the role.
"""
uuid:str
displayName:str
description:str
displayIcon:str
assetPath:str
class RecruitmentData(BaseModel):
"""
Represents the recruitment data for an agent.
Attributes:
counterId (str): The counter ID.
milestoneId (str): The milestone ID.
milestoneThreshold (int): The milestone threshold.
useLevelVpCostOverride (bool): Indicates whether to use level VP cost override.
levelVpCostOverride (int): The level VP cost override.
startDate (datetime): The start date of the recruitment.
endDate (datetime): The end date of the recruitment.
"""
counterId: str
milestoneId: str
milestoneThreshold: int
useLevelVpCostOverride: bool
levelVpCostOverride: int
startDate: datetime
endDate: datetime
class Ability(BaseModel):
"""
Represents an ability of an agent in Valorant.
Attributes:
slot (str): The slot of the ability.
displayName (str): The display name of the ability.
description (str): The description of the ability.
displayIcon (Optional[str], optional): The display icon of the ability. Defaults to None.
"""
slot: str
displayName: str
description: str
displayIcon: Optional[str] = None
class Media(BaseModel):
"""
Represents a media object in the Valorant API.
Attributes:
id (int): The ID of the media.
wwise (str): The Wwise ID of the media.
wave (str): The wave ID of the media.
"""
id: int
wwise: str
wave: str
class Media(BaseModel):
id:int
wwise:str
wave:str
class VoiceLine(BaseModel):
"""
Represents a voice line in Valorant.
Attributes:
minDuration (float): The minimum duration of the voice line.
maxDuration (float): The maximum duration of the voice line.
mediaList (List[Media]): A list of media associated with the voice line.
"""
minDuration: float
maxDuration: float
mediaList: List[Media]
class Agent(BaseModel):
"""
Represents an agent in the Valorant game.
Attributes:
uuid (str): The unique identifier of the agent.
displayName (str): The display name of the agent.
description (str): The description of the agent.
developerName (str): The developer name of the agent.
characterTags (Optional[List[str]]): The tags associated with the agent.
displayIcon (str): The URL of the agent's display icon.
displayIconSmall (str): The URL of the agent's small display icon.
bustPortrait (str): The URL of the agent's bust portrait.
fullPortrait (str): The URL of the agent's full portrait.
fullPortraitV2 (str): The URL of the agent's updated full portrait.
killfeedPortrait (str): The URL of the agent's killfeed portrait.
background (str): The URL of the agent's background image.
backgroundGradientColors (List[str]): The gradient colors for the agent's background.
assetPath (str): The path to the agent's assets.
isFullPortraitRightFacing (bool): Indicates if the agent's full portrait is right-facing.
isPlayableCharacter (bool): Indicates if the agent is a playable character.
isAvailableForTest (bool): Indicates if the agent is available for testing.
isBaseContent (bool): Indicates if the agent is base content.
role (Role): The role of the agent.
recruitmentData (Optional[RecruitmentData]): The recruitment data for the agent.
abilities (List[Ability]): The abilities of the agent.
voiceLine (Optional[VoiceLine]): The voice line for the agent.
"""
uuid:str
displayName:str
description:str
developerName:str
characterTags:Optional[List[str]] = None
displayIcon:str
displayIconSmall:str
bustPortrait:str
fullPortrait:str
fullPortraitV2:str
killfeedPortrait:str
background:str
backgroundGradientColors:List[str]
assetPath:str
isFullPortraitRightFacing:bool
isPlayableCharacter:bool
isAvailableForTest:bool
isBaseContent:bool
role:Role
recruitmentData:Optional[RecruitmentData] = None
abilities:List[Ability]
voiceLine:Optional[VoiceLine] = None
Classes
class Ability (**data: Any)-
Represents an ability of an agent in Valorant.
Attributes
slot:str- The slot of the ability.
displayName:str- The display name of the ability.
description:str- The description of the ability.
displayIcon:Optional[str], optional- The display icon of the ability. Defaults to None.
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 Ability(BaseModel): """ Represents an ability of an agent in Valorant. Attributes: slot (str): The slot of the ability. displayName (str): The display name of the ability. description (str): The description of the ability. displayIcon (Optional[str], optional): The display icon of the ability. Defaults to None. """ slot: str displayName: str description: str displayIcon: Optional[str] = NoneAncestors
- pydantic.main.BaseModel
Class variables
var description : strvar displayIcon : Optional[str]var displayName : strvar model_computed_fieldsvar model_configvar model_fieldsvar slot : str
class Agent (**data: Any)-
Represents an agent in the Valorant game.
Attributes
uuid:str- The unique identifier of the agent.
displayName:str- The display name of the agent.
description:str- The description of the agent.
developerName:str- The developer name of the agent.
characterTags:Optional[List[str]]- The tags associated with the agent.
displayIcon:str- The URL of the agent's display icon.
displayIconSmall:str- The URL of the agent's small display icon.
bustPortrait:str- The URL of the agent's bust portrait.
fullPortrait:str- The URL of the agent's full portrait.
fullPortraitV2:str- The URL of the agent's updated full portrait.
killfeedPortrait:str- The URL of the agent's killfeed portrait.
background:str- The URL of the agent's background image.
backgroundGradientColors:List[str]- The gradient colors for the agent's background.
assetPath:str- The path to the agent's assets.
isFullPortraitRightFacing:bool- Indicates if the agent's full portrait is right-facing.
isPlayableCharacter:bool- Indicates if the agent is a playable character.
isAvailableForTest:bool- Indicates if the agent is available for testing.
isBaseContent:bool- Indicates if the agent is base content.
role:Role- The role of the agent.
recruitmentData:Optional[RecruitmentData]- The recruitment data for the agent.
abilities:List[Ability]- The abilities of the agent.
voiceLine:Optional[VoiceLine]- The voice line for the agent.
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 Agent(BaseModel): """ Represents an agent in the Valorant game. Attributes: uuid (str): The unique identifier of the agent. displayName (str): The display name of the agent. description (str): The description of the agent. developerName (str): The developer name of the agent. characterTags (Optional[List[str]]): The tags associated with the agent. displayIcon (str): The URL of the agent's display icon. displayIconSmall (str): The URL of the agent's small display icon. bustPortrait (str): The URL of the agent's bust portrait. fullPortrait (str): The URL of the agent's full portrait. fullPortraitV2 (str): The URL of the agent's updated full portrait. killfeedPortrait (str): The URL of the agent's killfeed portrait. background (str): The URL of the agent's background image. backgroundGradientColors (List[str]): The gradient colors for the agent's background. assetPath (str): The path to the agent's assets. isFullPortraitRightFacing (bool): Indicates if the agent's full portrait is right-facing. isPlayableCharacter (bool): Indicates if the agent is a playable character. isAvailableForTest (bool): Indicates if the agent is available for testing. isBaseContent (bool): Indicates if the agent is base content. role (Role): The role of the agent. recruitmentData (Optional[RecruitmentData]): The recruitment data for the agent. abilities (List[Ability]): The abilities of the agent. voiceLine (Optional[VoiceLine]): The voice line for the agent. """ uuid:str displayName:str description:str developerName:str characterTags:Optional[List[str]] = None displayIcon:str displayIconSmall:str bustPortrait:str fullPortrait:str fullPortraitV2:str killfeedPortrait:str background:str backgroundGradientColors:List[str] assetPath:str isFullPortraitRightFacing:bool isPlayableCharacter:bool isAvailableForTest:bool isBaseContent:bool role:Role recruitmentData:Optional[RecruitmentData] = None abilities:List[Ability] voiceLine:Optional[VoiceLine] = NoneAncestors
- pydantic.main.BaseModel
Class variables
var abilities : List[Ability]var assetPath : strvar background : strvar backgroundGradientColors : List[str]var bustPortrait : strvar characterTags : Optional[List[str]]var description : strvar developerName : strvar displayIcon : strvar displayIconSmall : strvar displayName : strvar fullPortrait : strvar fullPortraitV2 : strvar isAvailableForTest : boolvar isBaseContent : boolvar isFullPortraitRightFacing : boolvar isPlayableCharacter : boolvar killfeedPortrait : strvar model_computed_fieldsvar model_configvar model_fieldsvar recruitmentData : Optional[RecruitmentData]var role : Rolevar uuid : strvar voiceLine : Optional[VoiceLine]
class Media (**data: Any)-
Usage docs: https://docs.pydantic.dev/2.7/concepts/models/
A base class for creating Pydantic models.
Attributes
__class_vars__- The names of classvars defined on the model.
__private_attributes__- Metadata about the private attributes of the model.
__signature__- The signature for instantiating the model.
__pydantic_complete__- Whether model building is completed, or if there are still undefined fields.
__pydantic_core_schema__- The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
__pydantic_custom_init__- Whether the model has a custom
__init__function. __pydantic_decorators__- Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. __pydantic_generic_metadata__- Metadata for generic models; contains data used for a similar purpose to args, origin, parameters in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__- Parent namespace of the model, used for automatic rebuilding of models.
__pydantic_post_init__- The name of the post-init method for the model, if defined.
__pydantic_root_model__- Whether the model is a
RootModel. __pydantic_serializer__- The pydantic-core SchemaSerializer used to dump instances of the model.
__pydantic_validator__- The pydantic-core SchemaValidator used to validate instances of the model.
__pydantic_extra__- An instance attribute with the values of extra fields from validation when
model_config['extra'] == 'allow'. __pydantic_fields_set__- An instance attribute with the names of fields explicitly set.
__pydantic_private__- Instance attribute with the values of private attributes set on the model instance.
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 Media(BaseModel): """ Represents a media object in the Valorant API. Attributes: id (int): The ID of the media. wwise (str): The Wwise ID of the media. wave (str): The wave ID of the media. """ id: int wwise: str wave: strAncestors
- pydantic.main.BaseModel
Class variables
var id : intvar model_computed_fieldsvar model_configvar model_fieldsvar wave : strvar wwise : str
class RecruitmentData (**data: Any)-
Represents the recruitment data for an agent.
Attributes
counterId:str- The counter ID.
milestoneId:str- The milestone ID.
milestoneThreshold:int- The milestone threshold.
useLevelVpCostOverride:bool- Indicates whether to use level VP cost override.
levelVpCostOverride:int- The level VP cost override.
startDate:datetime- The start date of the recruitment.
endDate:datetime- The end date of the recruitment.
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 RecruitmentData(BaseModel): """ Represents the recruitment data for an agent. Attributes: counterId (str): The counter ID. milestoneId (str): The milestone ID. milestoneThreshold (int): The milestone threshold. useLevelVpCostOverride (bool): Indicates whether to use level VP cost override. levelVpCostOverride (int): The level VP cost override. startDate (datetime): The start date of the recruitment. endDate (datetime): The end date of the recruitment. """ counterId: str milestoneId: str milestoneThreshold: int useLevelVpCostOverride: bool levelVpCostOverride: int startDate: datetime endDate: datetimeAncestors
- pydantic.main.BaseModel
Class variables
var counterId : strvar endDate : datetime.datetimevar levelVpCostOverride : intvar milestoneId : strvar milestoneThreshold : intvar model_computed_fieldsvar model_configvar model_fieldsvar startDate : datetime.datetimevar useLevelVpCostOverride : bool
class Role (**data: Any)-
Represents a role in the Valorant game.
Attributes
uuid:str- The unique identifier of the role.
displayName:str- The display name of the role.
description:str- The description of the role.
displayIcon:str- The display icon of the role.
assetPath:str- The asset path of the role.
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 Role(BaseModel): """ Represents a role in the Valorant game. Attributes: uuid (str): The unique identifier of the role. displayName (str): The display name of the role. description (str): The description of the role. displayIcon (str): The display icon of the role. assetPath (str): The asset path of the role. """ uuid:str displayName:str description:str displayIcon:str assetPath:strAncestors
- pydantic.main.BaseModel
Class variables
var assetPath : strvar description : strvar displayIcon : strvar displayName : strvar model_computed_fieldsvar model_configvar model_fieldsvar uuid : str
class VoiceLine (**data: Any)-
Represents a voice line in Valorant.
Attributes
minDuration:float- The minimum duration of the voice line.
maxDuration:float- The maximum duration of the voice line.
mediaList:List[Media]- A list of media associated with the voice line.
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 VoiceLine(BaseModel): """ Represents a voice line in Valorant. Attributes: minDuration (float): The minimum duration of the voice line. maxDuration (float): The maximum duration of the voice line. mediaList (List[Media]): A list of media associated with the voice line. """ minDuration: float maxDuration: float mediaList: List[Media]Ancestors
- pydantic.main.BaseModel
Class variables
var maxDuration : floatvar mediaList : List[Media]var minDuration : floatvar model_computed_fieldsvar model_configvar model_fields