Module valolyticspy.services.helper.competitive_tier_from_tier
Expand source code
import sys
sys.path.append("")
from valolyticspy.services.dto_loader import ValorantDTO
from valolyticspy.dtos.valorant_api.competitive_tier import CompetitiveTier, Tier
def get_competitive_tier_from_tier(tier:int) -> Tier:
"""
Retrieves the competitive tier object based on the given tier value.
Args:
tier (int): The tier value to search for.
Returns:
Tier: The competitive tier object corresponding to the given tier value, or None if not found.
"""
competitive_tier:CompetitiveTier = list(ValorantDTO.COMPETITIVE_TIERS.values())[-1]
for c_tier in competitive_tier.tiers:
if(c_tier.tier == tier):
return c_tier
return None
Functions
def get_competitive_tier_from_tier(tier: int) ‑> Tier-
Retrieves the competitive tier object based on the given tier value.
Args
tier:int- The tier value to search for.
Returns
Tier- The competitive tier object corresponding to the given tier value, or None if not found.
Expand source code
def get_competitive_tier_from_tier(tier:int) -> Tier: """ Retrieves the competitive tier object based on the given tier value. Args: tier (int): The tier value to search for. Returns: Tier: The competitive tier object corresponding to the given tier value, or None if not found. """ competitive_tier:CompetitiveTier = list(ValorantDTO.COMPETITIVE_TIERS.values())[-1] for c_tier in competitive_tier.tiers: if(c_tier.tier == tier): return c_tier return None