Esempio n. 1
0
 def farm_hall_of_fame_trophy_reward(self, trophy_id: str) -> Reward:
     return Reward.parse_obj(
         self.call('hallOfFameFarmTrophyReward', {
             'trophyId': trophy_id,
             'rewardType': 'champion',
         }).response)
Esempio n. 2
0
 def farm_offer_reward(self, offer_id: str) -> Reward:
     return Reward.parse_obj(
         self.call('offerFarmReward', {
             'offerId': offer_id
         }).response)
Esempio n. 3
0
 def drop_titan_hero_gift(self, hero_id: str) -> Tuple[Reward, Quests]:
     result = self.call('heroTitanGiftDrop', {'heroId': hero_id})
     return Reward.parse_obj(result.response), result.quests
Esempio n. 4
0
 def skip_tower_floor(self) -> Tuple[Tower, Reward]:
     response = self.call('towerSkipFloor').response
     return Tower.parse_obj(response['tower']), Reward.parse_obj(
         response['reward'])
Esempio n. 5
0
 def open_tower_chest(self, number: int) -> Tuple[Reward, Quests]:
     assert number in (0, 1, 2)
     result = self.call('towerOpenChest', {'num': number})
     return Reward.parse_obj(result.response['reward']), result.quests
Esempio n. 6
0
 def raid_boss(self, boss_id: str) -> Reward:
     return Reward.parse_obj(
         self.call('bossRaid', {
             'bossId': boss_id
         }).response['everyWinReward'])
Esempio n. 7
0
 def shop(self, *, slot_id: str, shop_id: str) -> Reward:
     return Reward.parse_obj(
         self.call('shopBuy', {
             'slot': slot_id,
             'shopId': shop_id
         }).response)
Esempio n. 8
0
 def check_freebie(self, gift_id: str) -> Optional[Reward]:
     response = self.call('freebieCheck', {'giftId': gift_id}).response
     return Reward.parse_obj(response) if response else None
Esempio n. 9
0
 def farm_zeppelin_gift(self) -> Reward:
     return Reward.parse_obj(self.call('zeppelinGiftFarm').response)
Esempio n. 10
0
 def farm_grand_coins(self) -> Reward:
     return Reward.parse_obj(
         self.call('grandFarmCoins').response['reward'] or {})
Esempio n. 11
0
 def farm_mail(self, letter_ids: Iterable[str]) -> Dict[str, Reward]:
     result = self.call('mailFarm', {'letterIds': list(letter_ids)})
     return {
         letter_id: Reward.parse_obj(item or {})
         for letter_id, item in result.response.items()
     }
Esempio n. 12
0
 def farm_quest(self, quest_id: str) -> Reward:
     return Reward.parse_obj(
         self.call('questFarm', {
             'questId': quest_id
         }).response)
Esempio n. 13
0
 def farm_expedition(self, expedition_id: str) -> Reward:
     return Reward.parse_obj(
         self.call('expeditionFarm', {
             'expeditionId': expedition_id
         }).response['reward'])
Esempio n. 14
0
 def farm_daily_bonus(self) -> Reward:
     return Reward.parse_obj(
         self.call('dailyBonusFarm', {
             'vip': 0
         }).response)