Class SteamUserStats
- java.lang.Object
-
- in.dragonbra.javasteam.handlers.ClientMsgHandler
-
- in.dragonbra.javasteam.steam.handlers.steamuserstats.SteamUserStats
-
public class SteamUserStats extends ClientMsgHandler
This handler handles Steam user statistic related actions.
-
-
Field Summary
-
Fields inherited from class in.dragonbra.javasteam.handlers.ClientMsgHandler
client
-
-
Constructor Summary
Constructors Constructor Description SteamUserStats()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobIDcreateLeaderboard(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.JobIDfindLeaderBoard(int appId, java.lang.String name)Asks the Steam back-end for a leaderboard by name for a given appid.JobIDgetLeaderboardEntries(int appId, int id, int rangeStart, int rangeEnd, ELeaderboardDataRequest dataRequest)Asks the Steam back-end for a set of rows in the leaderboard.JobIDgetNumberOfCurrentPlayers(int appId)Retrieves the number of current players for a given app id.voidhandleMsg(IPacketMsg packetMsg)Handles a client message.-
Methods inherited from class in.dragonbra.javasteam.handlers.ClientMsgHandler
getClient, isExpectDisconnection, setExpectDisconnection, setup
-
-
-
-
Method Detail
-
getNumberOfCurrentPlayers
public JobID getNumberOfCurrentPlayers(int appId)
Retrieves the number of current players for a given app id. Results are returned in aNumberOfPlayersCallback.- 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 aFindOrCreateLeaderboardCallback.- 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 aFindOrCreateLeaderboardCallback.- Parameters:
appId- The AppID to request a leaderboard for.name- Name of the leaderboard to create.sortMethod- Sort method to use for this leaderboarddisplayType- 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 aLeaderboardEntriesCallback.- 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:ClientMsgHandlerHandles a client message. This should not be called directly.- Specified by:
handleMsgin classClientMsgHandler- Parameters:
packetMsg- The packet message that contains the data.
-
-