Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#220815
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Aug 15, 2022
2 parents 16a83d2 + 4f06fdf commit aa19f7e
Show file tree
Hide file tree
Showing 36 changed files with 884 additions and 42 deletions.
2 changes: 1 addition & 1 deletion AndroidStudioExample/app/packageMe.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds
popd

cd target
Copy-Item client-sdk-0.167.220804.jar -Destination ../../builds/client-sdk-0.167.220804.jar
Copy-Item client-sdk-0.168.220815.jar -Destination ../../builds/client-sdk-0.168.220815.jar
2 changes: 1 addition & 1 deletion AndroidStudioExample/app/packageMe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ mkdir -p ./builds
popd

cd target
cp client-sdk-0.167.220804.jar ../../builds/client-sdk-0.167.220804.jar
cp client-sdk-0.168.220815.jar ../../builds/client-sdk-0.168.220815.jar
Original file line number Diff line number Diff line change
Expand Up @@ -3329,6 +3329,76 @@ private static PlayFabResult<GetPlayFabIDsFromGoogleIDsResult> privateGetPlayFab
return pfResult;
}

/**
* Retrieves the unique PlayFab identifiers for the given set of Google Play Games identifiers. The Google Play Games
* identifiers are the IDs for the user accounts, available as "playerId" in the Google Play Games Services - Players API
* calls.
* @param request GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest
* @return Async Task will return GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>> GetPlayFabIDsFromGooglePlayGamesPlayerIDsAsync(final GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest request) {
return new FutureTask(new Callable<PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>>() {
public PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> call() throws Exception {
return privateGetPlayFabIDsFromGooglePlayGamesPlayerIDsAsync(request);
}
});
}

/**
* Retrieves the unique PlayFab identifiers for the given set of Google Play Games identifiers. The Google Play Games
* identifiers are the IDs for the user accounts, available as "playerId" in the Google Play Games Services - Players API
* calls.
* @param request GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest
* @return GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> GetPlayFabIDsFromGooglePlayGamesPlayerIDs(final GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest request) {
FutureTask<PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>> task = new FutureTask(new Callable<PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>>() {
public PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> call() throws Exception {
return privateGetPlayFabIDsFromGooglePlayGamesPlayerIDsAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> exceptionResult = new PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/**
* Retrieves the unique PlayFab identifiers for the given set of Google Play Games identifiers. The Google Play Games
* identifiers are the IDs for the user accounts, available as "playerId" in the Google Play Games Services - Players API
* calls.
*/
@SuppressWarnings("unchecked")
private static PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> privateGetPlayFabIDsFromGooglePlayGamesPlayerIDsAsync(final GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest request) throws Exception {
if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/GetPlayFabIDsFromGooglePlayGamesPlayerIDs"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
task.run();
Object httpResult = task.get();
if (httpResult instanceof PlayFabError) {
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler.callback(error);
PlayFabResult result = new PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

PlayFabJsonSuccess<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>>(){}.getType());
GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult result = resultData.data;

PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult> pfResult = new PlayFabResult<GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult>();
pfResult.Result = result;
return pfResult;
}

/**
* Retrieves the unique PlayFab identifiers for the given set of Kongregate identifiers. The Kongregate identifiers are the
* IDs for the user accounts, available as "user_id" from the Kongregate API methods(ex:
Expand Down Expand Up @@ -5179,6 +5249,73 @@ private static PlayFabResult<LinkGoogleAccountResult> privateLinkGoogleAccountAs
return pfResult;
}

/**
* Links the currently signed-in user account to their Google Play Games account, using their Google Play Games account
* credentials
* @param request LinkGooglePlayGamesServicesAccountRequest
* @return Async Task will return LinkGooglePlayGamesServicesAccountResult
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<LinkGooglePlayGamesServicesAccountResult>> LinkGooglePlayGamesServicesAccountAsync(final LinkGooglePlayGamesServicesAccountRequest request) {
return new FutureTask(new Callable<PlayFabResult<LinkGooglePlayGamesServicesAccountResult>>() {
public PlayFabResult<LinkGooglePlayGamesServicesAccountResult> call() throws Exception {
return privateLinkGooglePlayGamesServicesAccountAsync(request);
}
});
}

/**
* Links the currently signed-in user account to their Google Play Games account, using their Google Play Games account
* credentials
* @param request LinkGooglePlayGamesServicesAccountRequest
* @return LinkGooglePlayGamesServicesAccountResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<LinkGooglePlayGamesServicesAccountResult> LinkGooglePlayGamesServicesAccount(final LinkGooglePlayGamesServicesAccountRequest request) {
FutureTask<PlayFabResult<LinkGooglePlayGamesServicesAccountResult>> task = new FutureTask(new Callable<PlayFabResult<LinkGooglePlayGamesServicesAccountResult>>() {
public PlayFabResult<LinkGooglePlayGamesServicesAccountResult> call() throws Exception {
return privateLinkGooglePlayGamesServicesAccountAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<LinkGooglePlayGamesServicesAccountResult> exceptionResult = new PlayFabResult<LinkGooglePlayGamesServicesAccountResult>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/**
* Links the currently signed-in user account to their Google Play Games account, using their Google Play Games account
* credentials
*/
@SuppressWarnings("unchecked")
private static PlayFabResult<LinkGooglePlayGamesServicesAccountResult> privateLinkGooglePlayGamesServicesAccountAsync(final LinkGooglePlayGamesServicesAccountRequest request) throws Exception {
if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/LinkGooglePlayGamesServicesAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
task.run();
Object httpResult = task.get();
if (httpResult instanceof PlayFabError) {
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler.callback(error);
PlayFabResult result = new PlayFabResult<LinkGooglePlayGamesServicesAccountResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

PlayFabJsonSuccess<LinkGooglePlayGamesServicesAccountResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<LinkGooglePlayGamesServicesAccountResult>>(){}.getType());
LinkGooglePlayGamesServicesAccountResult result = resultData.data;

PlayFabResult<LinkGooglePlayGamesServicesAccountResult> pfResult = new PlayFabResult<LinkGooglePlayGamesServicesAccountResult>();
pfResult.Result = result;
return pfResult;
}

/**
* Links the vendor-specific iOS device identifier to the user's PlayFab account
* @param request LinkIOSDeviceIDRequest
Expand Down Expand Up @@ -8938,6 +9075,68 @@ private static PlayFabResult<UnlinkGoogleAccountResult> privateUnlinkGoogleAccou
return pfResult;
}

/**
* Unlinks the related Google Play Games account from the user's PlayFab account.
* @param request UnlinkGooglePlayGamesServicesAccountRequest
* @return Async Task will return UnlinkGooglePlayGamesServicesAccountResult
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult>> UnlinkGooglePlayGamesServicesAccountAsync(final UnlinkGooglePlayGamesServicesAccountRequest request) {
return new FutureTask(new Callable<PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult>>() {
public PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult> call() throws Exception {
return privateUnlinkGooglePlayGamesServicesAccountAsync(request);
}
});
}

/**
* Unlinks the related Google Play Games account from the user's PlayFab account.
* @param request UnlinkGooglePlayGamesServicesAccountRequest
* @return UnlinkGooglePlayGamesServicesAccountResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult> UnlinkGooglePlayGamesServicesAccount(final UnlinkGooglePlayGamesServicesAccountRequest request) {
FutureTask<PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult>> task = new FutureTask(new Callable<PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult>>() {
public PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult> call() throws Exception {
return privateUnlinkGooglePlayGamesServicesAccountAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult> exceptionResult = new PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/** Unlinks the related Google Play Games account from the user's PlayFab account. */
@SuppressWarnings("unchecked")
private static PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult> privateUnlinkGooglePlayGamesServicesAccountAsync(final UnlinkGooglePlayGamesServicesAccountRequest request) throws Exception {
if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/UnlinkGooglePlayGamesServicesAccount"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
task.run();
Object httpResult = task.get();
if (httpResult instanceof PlayFabError) {
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler.callback(error);
PlayFabResult result = new PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

PlayFabJsonSuccess<UnlinkGooglePlayGamesServicesAccountResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<UnlinkGooglePlayGamesServicesAccountResult>>(){}.getType());
UnlinkGooglePlayGamesServicesAccountResult result = resultData.data;

PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult> pfResult = new PlayFabResult<UnlinkGooglePlayGamesServicesAccountResult>();
pfResult.Result = result;
return pfResult;
}

/**
* Unlinks the related iOS device identifier from the user's PlayFab account
* @param request UnlinkIOSDeviceIDRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1619,11 +1619,7 @@ public static class GetLeaderboardRequest {

}

/**
* Note that the Position of the user in the results is for the overall leaderboard. If Facebook friends are included, make
* sure the access token from previous LoginWithFacebook call is still valid and not expired. If Xbox Live friends are
* included, make sure the access token from the previous LoginWithXbox call is still valid and not expired.
*/
/** Note: the user's Position is relative to the overall leaderboard. */
public static class GetLeaderboardResult {
/** Ordered listing of users and their positions in the requested leaderboard. */
public ArrayList<PlayerLeaderboardEntry> Leaderboard;
Expand Down Expand Up @@ -1932,6 +1928,19 @@ public static class GetPlayFabIDsFromGoogleIDsResult {

}

public static class GetPlayFabIDsFromGooglePlayGamesPlayerIDsRequest {
/** Array of unique Google Play Games identifiers (Google+ user IDs) for which the title needs to get PlayFab identifiers. */
public ArrayList<String> GooglePlayGamesPlayerIDs;

}

/** For Google Play Games identifiers which have not been linked to PlayFab accounts, null will be returned. */
public static class GetPlayFabIDsFromGooglePlayGamesPlayerIDsResult {
/** Mapping of Google Play Games identifiers to PlayFab identifiers. */
public ArrayList<GooglePlayGamesPlayFabIdPair> Data;

}

public static class GetPlayFabIDsFromKongregateIDsRequest {
/** Array of unique Kongregate identifiers (Kongregate's user_id) for which the title needs to get PlayFab identifiers. */
public ArrayList<String> KongregateIDs;
Expand Down Expand Up @@ -2285,6 +2294,14 @@ public static class GooglePlayFabIdPair {

}

public static class GooglePlayGamesPlayFabIdPair {
/** Unique Google Play Games identifier for a user. */
public String GooglePlayGamesPlayerId;
/** Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Google Play Games identifier. */
public String PlayFabId;

}

/**
* Grants a character to the user of the type specified by the item ID. The user must already have an instance of this item
* in their inventory in order to allow character creation. This item can come from a purchase or grant, which must be done
Expand Down Expand Up @@ -2533,6 +2550,30 @@ public static class LinkGoogleAccountResult {

}

/**
* Google Play Games sign-in is accomplished by obtaining a Google OAuth 2.0 credential using the Google Play Games sign-in
* for Android APIs on the device and passing it to this API.
*/
public static class LinkGooglePlayGamesServicesAccountRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;
/**
* If another user is already linked to the account, unlink the other user and re-link. If the current user is already
* linked, link both accounts
*/
public Boolean ForceLink;
/**
* OAuth 2.0 server authentication code obtained on the client by calling the requestServerSideAccess()
* (https://developers.google.com/games/services/android/signin) Google Play Games client API.
*/
public String ServerAuthCode;

}

public static class LinkGooglePlayGamesServicesAccountResult {

}

public static class LinkIOSDeviceIDRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;
Expand Down Expand Up @@ -4424,6 +4465,16 @@ public static class UnlinkGoogleAccountResult {

}

public static class UnlinkGooglePlayGamesServicesAccountRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;

}

public static class UnlinkGooglePlayGamesServicesAccountResult {

}

public static class UnlinkIOSDeviceIDRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ public static enum PlayFabErrorCode {
AutomationRuleAlreadyExists(1543),
AutomationRuleLimitExceeded(1544),
InvalidGooglePlayGamesServerAuthCode(1545),
StorageAccountNotFound(1546),
MatchmakingEntityInvalid(2001),
MatchmakingPlayerAttributesInvalid(2002),
MatchmakingQueueNotFound(2016),
Expand Down
Loading

0 comments on commit aa19f7e

Please sign in to comment.