Calling the Player Stats API
        Args:
            player_key: Key of the player
            board_key: key of the board
        Return:
            json data
199823
def get_player_stats(self, player_key, board_key):
        
        player_stats_url = self.api_path + 'player/' + player_key + '/league/' + board_key + '/stats/'
        response = self.get_response(player_stats_url)
        return response
307120
def get_season_team(self, season_key, season_team_key,stats_type=None):
        
        params = {"stats_type": stats_type}
        season_team_url = self.api_path + 'season/' +  season_key + '/team/' + season_team_key + '/'
        response = self.get_response(season_team_url, params=params)
        return response
673955
def get_season_schedule(self, season_key):
        

        schedule_url = self.api_path + "season/" + season_key + "/schedule/"
        response = self.get_response(schedule_url)
        return response
1319737
def get_number_of_current_players(self, appID, format=None):
        
        parameters = {'appid' : appID}
        if format is not None:
            parameters['format'] = format
        url = self.create_request_url(self.interface,
            'GetNumberOfCurrentPlayers', 1, parameters)
        data = self.retrieve_request(url)
        return self.return_data(data, format=format)
831592
def get_items_stats(key, value):
        
        itemized_key = key.split(':')
        slab_id = itemized_key[1]
        metric = itemized_key[2]

        tags = ["slab:{}".format(slab_id)]

        return metric, tags, value
979602
def attrs(self):
        """"""
        ret = dict(self.__dict__) # obtain copy of internal __dict__
        del ret["_matches"] # match history is specifically distinguished from player information (and stored separately)
        if self.type != c.COMPUTER: # difficulty only matters for computer playres
            del ret["difficulty"]
        return ret
1223546
def stats(self, key=None):
        
        # TODO: Stats with key is not working.

        returns = {}
        for server in self.servers:
            returns[server.server] = server.stats(key)

        return returns
1366499
public static void buildPositionStats(JsonObject json, EntityPlayerMP player)
    {
        json.addProperty("XPos",  player.posX);
        json.addProperty("YPos",  player.posY);
        json.addProperty("ZPos", player.posZ);
        json.addProperty("Pitch",  player.rotationPitch);
        json.addProperty("Yaw", player.rotationYaw);
    }
1251152
def team_players(self, team):
        """"""
        keys = 'shirtNumber name position nationality dateOfBirth'.split()
        data = [{key: player[key] for key in keys} for player in team]
        self.generate_output({'players': data})
499639
def get_season(self, season_key, card_type="micro_card"):
        

        season_url = self.api_path + "season/" + season_key + "/"
        params = {}
        params["card_type"] = card_type
        response = self.get_response(season_url, params)
        return response
530431
def team_stats(game_id):
    """"""
    # get data
    data = mlbgame.stats.team_stats(game_id)
    return mlbgame.stats.Stats(data, game_id, False)
514586
def get_season_stats(self, season_key):
        

        season_stats_url = self.api_path + "season/" + season_key + "/stats/"
        response = self.get_response(season_stats_url)
        return response
1182153
def get_players_game_stats_for_season_for_week(self, season, week, season_type="REG"):
        
        try:
            season = int(season)
            week = int(week)
            if season_type not in ["REG", "PRE", "POST"]:
                raise ValueError
        except (TypeError, ValueError):
            raise FantasyDataError('Error: Invalid method parameters')

        season_param = "{0}{1}".format(season, season_type)
        result = self._method_call("PlayerGameStatsByWeek/{season}/{week}", "stats", season=season_param, week=week)
        return result
288948
def getGameHighScores(self, user_id, game_message_identifier):
        
        p = _strip(locals(), more=['game_message_identifier'])
        p.update(_dismantle_message_identifier(game_message_identifier))
        return self._api_request('getGameHighScores', _rectify(p))
59562
def player_stats(game_id):
    """"""
    # get information for that game
    data = mlbgame.stats.player_stats(game_id)
    return mlbgame.stats.Stats(data, game_id, True)
634599
def whoAmI(self):
        """"""
        self.inflate() # ensure self.players contains player objects
        if self.thePlayer:
            for p in self.players:
                if p.name != self.thePlayer: continue
                return p
        elif len(self.players) == 1:
            ret = self.players[0]
            self.thePlayer = ret.name # remember this for the future in case more players are added
            return ret
        raise Exception("could not identify which player this is given %s (%s)"%(self.players, self.thePlayer))
1259160
def mpris(self):
        
        if self._kill:
            raise KeyboardInterrupt
        current_player_id = self._player_details.get("id")
        cached_until = self.py3.CACHE_FOREVER

        if self._player is None:
            text = self.format_none
            color = self.py3.COLOR_BAD
            composite = [{"full_text": text, "color": color}]
            self._data = {}
        else:
            self._init_data()
            (text, color, cached_until) = self._get_text()
            self._control_states = self._get_control_states()
            buttons = self._get_response_buttons()
            composite = self.py3.safe_format(self.format, dict(text, **buttons))

        if self._data.get(
            "error_occurred"
        ) or current_player_id != self._player_details.get("id"):
            # Something went wrong or the player changed during our processing
            # This is usually due to something like a player being killed
            # whilst we are checking its details
            # Retry but limit the number of attempts
            self._tries += 1
            if self._tries < 3:
                return self.mpris()
            # Max retries hit we need to output something
            composite = [
                {"full_text": "Something went wrong", "color": self.py3.COLOR_BAD}
            ]
            cached_until = self.py3.time_in(1)

        response = {
            "cached_until": cached_until,
            "color": color,
            "composite": composite,
        }

        # we are outputing so reset tries
        self._tries = 0
        return response