XblUserStatisticsGetSingleUserStatisticsAsync

Get specified statistics for a single user.

Syntax

HRESULT XblUserStatisticsGetSingleUserStatisticsAsync(  
         XblContextHandle xblContextHandle,  
         uint64_t xboxUserId,  
         const char* serviceConfigurationId,  
         const char** statisticNames,  
         size_t statisticNamesCount,  
         XAsyncBlock* async  
)  

Parameters

xblContextHandle   _In_
Type: XblContextHandle

Xbox live context for the local user.

xboxUserId   _In_
Type: uint64_t

The Xbox User ID of the player to get statistics for.

serviceConfigurationId   _In_z_
Type: char*

The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.

statisticNames   _In_
Type: char**

A collection of statistic names to lookup.

statisticNamesCount   _In_
Type: size_t

The number of statistic names.

async   _In_
Type: XAsyncBlock*

The AsyncBlock for this operation.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

Call XblUserStatisticsGetSingleUserStatisticsResultSize and XblUserStatisticsGetSingleUserStatisticsResult upon completion to get the result. Only statistics with values are returned. For example, if you ask for 3 statistic names and only 2 have values, only 2 statistics are returned by the service.

If using event-based Stats, statistic names will coincide with each stat's stat instance. If using title-managed Stats, statistic names will coincide with each stat's ID.

Statistics requested via this API are transformed into a comma-delimited list that has a 260 character limit. If a 400 error is received when calling this method, try requesting fewer statistics to shorten the length of this transformed string.

REST Call

V1 GET /users/xuid({xuid})/scids/{scid}/stats/{statname1},...,{statnameN}

Requirements

Header: user_statistics_c.h

Library: Microsoft.Xbox.Services.141.GSDK.C.lib

See also

user_statistics_c