mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-28 06:28:08 +03:00
Added SteamUserStats.RequestGlobalStats
This commit is contained in:
parent
d58dfdf4d2
commit
c8cb180b78
@ -138,6 +138,22 @@ namespace Steamworks
|
|||||||
return Internal.RequestCurrentStats();
|
return Internal.RequestCurrentStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Asynchronously fetches global stats data, which is available for stats marked as
|
||||||
|
/// "aggregated" in the App Admin panel of the Steamworks website.
|
||||||
|
/// You must have called RequestCurrentStats and it needs to return successfully via
|
||||||
|
/// its callback prior to calling this.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60.</param>
|
||||||
|
/// <returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the remote call failed</returns>
|
||||||
|
public static async Task<Result> RequestGlobalStats( int days )
|
||||||
|
{
|
||||||
|
var result = await SteamUserStats.Internal.RequestGlobalStats( days );
|
||||||
|
if ( !result.HasValue ) return Result.Fail;
|
||||||
|
return result.Value.Result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a leaderboard by name, it will create it if it's not yet created.
|
/// Gets a leaderboard by name, it will create it if it's not yet created.
|
||||||
/// Leaderboards created with this function will not automatically show up in the Steam Community.
|
/// Leaderboards created with this function will not automatically show up in the Steam Community.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user