Ejemplo n.º 1
0
    def update(self):

        if self.__response:
            if self.__response.done():
                if 'games' in self.__response.data:
                    raw_games = sort_games(self.__response.data['games'])
                    games = []

                    for game in raw_games:
                        games.append(Game.from_json_dict(game))

                    self.__game_list.update_game_list(games)

        self.__response = self.__client.get_games()
        self.after(1000, self.update)