Edit

Share via


AchievementService.GetAchievementAsync(String, String, String) Method

Definition

Returns a specific Achievement object for a specified player.

public Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Achievements.Achievement> GetAchievementAsync (string xboxUserId, string serviceConfigurationId, string achievementId);
abstract member GetAchievementAsync : string * string * string -> Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Achievements.Achievement>
override this.GetAchievementAsync : string * string * string -> Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Achievements.Achievement>
Public Function GetAchievementAsync (xboxUserId As String, serviceConfigurationId As String, achievementId As String) As IAsyncOperation(Of Achievement)

Parameters

xboxUserId
String

The Xbox User ID of the player.

serviceConfigurationId
String

The service configuration ID (SCID) for the service.

achievementId
String

The achievement ID.

Returns

Windows.Foundation.IAsyncOperation<Achievement>

The requested Achievement object if it exists. If the achievement does not exist, the method throws a Platform::COMException() exception, with hr = INET_E_OBJECT_NOT_FOUND (0x800C0006L).

Implements

Microsoft.Xbox.Services.Achievements.__IAchievementServicePublicNonVirtuals.GetAchievementAsync(System.String,System.String,System.String)

Remarks

Returns an IAsyncOperation<TResult> object that represents the state of the asynchronous operation. Completion of the asynchronous operation is signaled by using a handler that is passed to the IAsyncOperation<TResult>.Completed property. When the asynchronous operation is complete, the result of the operation can be retrieved by using the IAsyncOperation<TResult>.GetResults method.

This method calls V2 GET /users/xuid({xuid})/achievements/{scid}/{achievementId}.

Applies to