Class SteamUserStats


  • public class SteamUserStats
    extends ClientMsgHandler
    This handler handles Steam user statistic related actions.
    • Constructor Detail

      • SteamUserStats

        public SteamUserStats()
    • Method Detail

      • getNumberOfCurrentPlayers

        public JobID getNumberOfCurrentPlayers​(int appId)
        Retrieves the number of current players for a given app id. Results are returned in a NumberOfPlayersCallback.
        Parameters:
        appId - The app id to request the number of players for.
        Returns:
        The Job ID of the request. This can be used to find the appropriate NumberOfPlayersCallback.
      • findLeaderBoard

        public JobID findLeaderBoard​(int appId,
                                     java.lang.String name)
        Asks the Steam back-end for a leaderboard by name for a given appid. Results are returned in a FindOrCreateLeaderboardCallback.
        Parameters:
        appId - The AppID to request a leaderboard for.
        name - Name of the leaderboard to request.
        Returns:
        The Job ID of the request. This can be used to find the appropriate FindOrCreateLeaderboardCallback.
      • createLeaderboard

        public JobID createLeaderboard​(int appId,
                                       java.lang.String name,
                                       ELeaderboardSortMethod sortMethod,
                                       ELeaderboardDisplayType displayType)
        Asks the Steam back-end for a leaderboard by name, and will create it if it's not yet. Results are returned in a FindOrCreateLeaderboardCallback.
        Parameters:
        appId - The AppID to request a leaderboard for.
        name - Name of the leaderboard to create.
        sortMethod - Sort method to use for this leaderboard
        displayType - Display type for this leaderboard.
        Returns:
        The Job ID of the request. This can be used to find the appropriate FindOrCreateLeaderboardCallback.
      • getLeaderboardEntries

        public JobID getLeaderboardEntries​(int appId,
                                           int id,
                                           int rangeStart,
                                           int rangeEnd,
                                           ELeaderboardDataRequest dataRequest)
        Asks the Steam back-end for a set of rows in the leaderboard. Results are returned in a LeaderboardEntriesCallback.
        Parameters:
        appId - The AppID to request leaderboard rows for.
        id - ID of the leaderboard to view.
        rangeStart - Range start or 0.
        rangeEnd - Range end or max leaderboard entries.
        dataRequest - Type of request.
        Returns:
        The Job ID of the request. This can be used to find the appropriate LeaderboardEntriesCallback.
      • handleMsg

        public void handleMsg​(IPacketMsg packetMsg)
        Description copied from class: ClientMsgHandler
        Handles a client message. This should not be called directly.
        Specified by:
        handleMsg in class ClientMsgHandler
        Parameters:
        packetMsg - The packet message that contains the data.