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.

self is explicitly positional-only to allow self as 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] = None

Ancestors

  • pydantic.main.BaseModel

Class variables

var description : str
var displayIcon : Optional[str]
var displayName : str
var model_computed_fields
var model_config
var model_fields
var 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.

self is explicitly positional-only to allow self as 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] = None

Ancestors

  • pydantic.main.BaseModel

Class variables

var abilities : List[Ability]
var assetPath : str
var background : str
var backgroundGradientColors : List[str]
var bustPortrait : str
var characterTags : Optional[List[str]]
var description : str
var developerName : str
var displayIcon : str
var displayIconSmall : str
var displayName : str
var fullPortrait : str
var fullPortraitV2 : str
var isAvailableForTest : bool
var isBaseContent : bool
var isFullPortraitRightFacing : bool
var isPlayableCharacter : bool
var killfeedPortrait : str
var model_computed_fields
var model_config
var model_fields
var recruitmentData : Optional[RecruitmentData]
var roleRole
var uuid : str
var 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__ and Model.__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.

self is explicitly positional-only to allow self as 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: str

Ancestors

  • pydantic.main.BaseModel

Class variables

var id : int
var model_computed_fields
var model_config
var model_fields
var wave : str
var 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.

self is explicitly positional-only to allow self as 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: datetime

Ancestors

  • pydantic.main.BaseModel

Class variables

var counterId : str
var endDate : datetime.datetime
var levelVpCostOverride : int
var milestoneId : str
var milestoneThreshold : int
var model_computed_fields
var model_config
var model_fields
var startDate : datetime.datetime
var 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.

self is explicitly positional-only to allow self as 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:str

Ancestors

  • pydantic.main.BaseModel

Class variables

var assetPath : str
var description : str
var displayIcon : str
var displayName : str
var model_computed_fields
var model_config
var model_fields
var 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.

self is explicitly positional-only to allow self as 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 : float
var mediaList : List[Media]
var minDuration : float
var model_computed_fields
var model_config
var model_fields