def __init__(self, **kwargs): MatchBase.__init__(self, **kwargs) PlayerMixin.__init__(self, **kwargs) self.accountLevel = kwargs.get("Account_Level", 0) if kwargs else 0 self.masteryLevel = kwargs.get("Mastery_Level", 0) if kwargs else 0 self.mapName = kwargs.get("mapGame", None) if kwargs else None self.playerCreated = kwargs.get("playerCreated", None) if kwargs else None self.playerRegion = kwargs.get("playerRegion", None) if kwargs else None if self.playerCreated: self.playerCreated = datetime.strptime(self.playerCreated, "%m/%d/%Y %I:%M:%S %p") try: self.tier = Tier(kwargs.get("Tier")) except ValueError: self.tier = kwargs.get("Tier", 0) if kwargs else 0 self.tierLosses = kwargs.get("tierLosses", 0) if kwargs else 0 self.tierWins = kwargs.get("tierWins", 0) if kwargs else 0 try: self.godId = Champions(kwargs.get("ChampionId")) if kwargs.get( "ChampionId") else Gods(kwargs.get("GodId")) self.godName = self.godId.getName() except ValueError: self.godId = kwargs.get("ChampionId", kwargs.get( "GodId", 0)) if kwargs else 0 self.godName = kwargs.get("ChampionName", kwargs.get("GodName", None)) if kwargs else None try: self.queue = QueuePaladins(kwargs.get("Queue")) if kwargs.get( "ChampionId") else QueueSmite(kwargs.get("Queue")) except ValueError: self.queue = kwargs.get("Queue", 0) if kwargs else 0
def __init__(self, **kwargs): APIResponse.__init__(self, **kwargs) PlayerMixin.__init__(self, **kwargs) self.gamerTag = kwargs.get('gamer_tag', None) if kwargs else None self.platform = kwargs.get( 'platform', None) if kwargs else None #'unknown', 'xbox' or 'switch' self.portalId = kwargs.get('portal_id', 0) if kwargs else 0 self.portalName = kwargs.get('portal', None) if kwargs else None self.portalUserId = kwargs.get('portal_userid', 0) if kwargs else 0
def __init__(self, **kwargs): APIResponse.__init__(self, **kwargs) #super().__init__(**kwargs) PlayerMixin.__init__(self, **kwargs) Winratio.__init__(self, **kwargs) self.leaves = kwargs.get('Leaves', 0) if kwargs else 0 self.rankedName = kwargs.get('Name', None) if kwargs else None self.currentTrumpPoints = kwargs.get('Points', 0) if kwargs else 0 self.prevRank = kwargs.get('PrevRank', 0) if kwargs else 0 self.leaderboardIndex = kwargs.get('Rank', 0) if kwargs else 0 self.rankStat = kwargs.get('Rank_Stat', 0) if kwargs else 0 #mmr self.currentSeason = kwargs.get('Season', 0) if kwargs else 0 self.currentRank = Tier(kwargs.get('Tier', 0)) if kwargs else None self.trend = kwargs.get('Trend', 0) if kwargs else 0
def __init__(self, **kwargs): APIResponseBase.__init__(self, **kwargs) Avatar.__init__(self, **kwargs) Player.__init__(self, **kwargs) self.game = kwargs.get('game', None) if kwargs else None self.gameId = kwargs.get('gameId', 0) if kwargs else 0 self.currency = kwargs.get('currency', None) if kwargs else None self.xp = kwargs.get('xp', 0) if kwargs else 0 self.vip = kwargs.get('vip', False) if kwargs else False self.linkedXboxAccount = LinkedAccount( **kwargs.get('linkedXboxAccount', None)) if kwargs and kwargs.get( 'linkedXboxAccount', None) else None self.linkedPsnAccount = LinkedAccount( **kwargs.get('linkedPsnAccount', None)) if kwargs and kwargs.get( 'linkedXboxAccount', None) else None self.ownedFeaturedItems = kwargs.get('ownedFeaturedItems', None) if kwargs else None
def __init__(self, **kwargs): APIResponse.__init__(self, **kwargs) PlayerMixin.__init__(self, **kwargs) self.createdDatetime = kwargs.get('Created_Datetime', kwargs.get('created_datetime', None)) if kwargs else None if self.createdDatetime: self.createdDatetime = datetime.strptime( self.createdDatetime, '%m/%d/%Y %I:%M:%S %p' ) # len(self.createdDatetime) > 0 else datetimeX self.lastLoginDatetime = kwargs.get( 'Last_Login_Datetime', kwargs.get('last_login_datetime', None)) if kwargs else None if self.lastLoginDatetime: self.lastLoginDatetime = datetime.strptime(self.lastLoginDatetime, '%m/%d/%Y %I:%M:%S %p') self.accountLevel = kwargs.get('Level', kwargs.get('level', 0)) if kwargs else 0 self.playerRegion = kwargs.get('Region', kwargs.get( 'region', None)) if kwargs else None
def __init__(self, **kwargs): APIResponse.__init__(self, **kwargs) #super().__init__(**kwargs) KDA.__init__(self, **kwargs) PlayerMixin.__init__(self, **kwargs) Winratio.__init__(self, **kwargs) try: self.godId = Champions(kwargs.get('ChampionId')) if kwargs.get( 'ChampionId') else Gods(kwargs.get('GodId')) self.godName = self.godId.getName() except ValueError: self.godId = kwargs.get('GodId', kwargs.get('ChampionId', 0)) if kwargs else 0 self.godName = kwargs.get('God', kwargs.get('Champion', None)) self.gold = kwargs.get('Gold', 0) if kwargs else 0 self.lastPlayed = kwargs.get('LastPlayed', None) if kwargs else None if self.lastPlayed: self.lastPlayed = datetime.strptime(self.lastPlayed, '%m/%d/%Y %I:%M:%S %p') self.matches = kwargs.get('Matches', 0) if kwargs else 0 self.minutes = kwargs.get('Minutes', 0) if kwargs else 0 self.queue = kwargs.get('Queue', None) if kwargs else None
def __init__(self, **kwargs): APIResponseBase.__init__(self, **kwargs) PlayerMixin.__init__(self, **kwargs) self.mergeDatetime = kwargs.get('merge_datetime', None) if kwargs else None self.portalId = kwargs.get('portalId', 0) if kwargs else 0
def __init__(self, **kwargs): APIResponse.__init__(self, **kwargs) PlayerMixin.__init__(self, **kwargs) self.accountId = kwargs.get("account_id", 0) if kwargs else 0 self.avatarURL = kwargs.get("avatar_url", None) if kwargs else None self.portalId = kwargs.get("portal_id", 0) if kwargs else 0
def __init__(self, **kwargs): APIResponse.__init__(self, **kwargs) PlayerMixin.__init__(self, **kwargs) self.portalId = kwargs.get('portal_id', 0) if kwargs else 0 self.steamId = kwargs.get('steam_id', 0) if kwargs else 0