Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#240913
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Sep 16, 2024
1 parent 7de49f6 commit 806935a
Show file tree
Hide file tree
Showing 49 changed files with 411 additions and 341 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.224.240830.jar -Destination ../../builds/client-sdk-0.224.240830.jar
Copy-Item client-sdk-0.225.240913.jar -Destination ../../builds/client-sdk-0.225.240913.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.224.240830.jar ../../builds/client-sdk-0.224.240830.jar
cp client-sdk-0.225.240913.jar ../../builds/client-sdk-0.225.240913.jar
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public static enum LoginIdentityProvider {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

/** Given an entity token, validates that it hasn't expired or been revoked and will return details of the owner. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,8 @@ public static enum LoginIdentityProvider {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

public static class LoginResult {
Expand Down Expand Up @@ -4907,7 +4908,8 @@ public static enum UserOrigination {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

public static class UserPrivateAccountInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ public static enum LoginIdentityProvider {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

public static class LogStatement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,68 @@ private static PlayFabResult<GetTitlePlayersFromProviderIDsResponse> privateGetT
return pfResult;
}

/**
* Update the display name of the entity
* @param request SetDisplayNameRequest
* @return Async Task will return SetDisplayNameResponse
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<SetDisplayNameResponse>> SetDisplayNameAsync(final SetDisplayNameRequest request) {
return new FutureTask(new Callable<PlayFabResult<SetDisplayNameResponse>>() {
public PlayFabResult<SetDisplayNameResponse> call() throws Exception {
return privateSetDisplayNameAsync(request);
}
});
}

/**
* Update the display name of the entity
* @param request SetDisplayNameRequest
* @return SetDisplayNameResponse
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<SetDisplayNameResponse> SetDisplayName(final SetDisplayNameRequest request) {
FutureTask<PlayFabResult<SetDisplayNameResponse>> task = new FutureTask(new Callable<PlayFabResult<SetDisplayNameResponse>>() {
public PlayFabResult<SetDisplayNameResponse> call() throws Exception {
return privateSetDisplayNameAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<SetDisplayNameResponse> exceptionResult = new PlayFabResult<SetDisplayNameResponse>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/** Update the display name of the entity */
@SuppressWarnings("unchecked")
private static PlayFabResult<SetDisplayNameResponse> privateSetDisplayNameAsync(final SetDisplayNameRequest request) throws Exception {
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Profile/SetDisplayName"), request, "X-EntityToken", PlayFabSettings.EntityToken);
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<SetDisplayNameResponse>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

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

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

/**
* Sets the global title access policy
* @param request SetGlobalPolicyRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,30 @@ public static enum OperationTypes {
None
}

/**
* Given an entity profile, will update its display name to the one passed in if the profile's version is equal to the
* specified value
*/
public static class SetDisplayNameRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;
/** The new value to be set on Entity Profile's display name */
public String DisplayName;
/** The optional entity to perform this action on. Defaults to the currently logged in entity. */
public EntityKey Entity;
/** The expected version of a profile to perform this update on */
public Integer ExpectedVersion;

}

public static class SetDisplayNameResponse {
/** The type of operation that occured on the profile's display name */
public OperationTypes OperationResult;
/** The updated version of the profile after the display name update */
public Integer VersionNumber;

}

/**
* This will set the access policy statements on the given entity profile. This is not additive, any existing statements
* will be replaced with the statements in this request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,68 +757,6 @@ private static PlayFabResult<GetStatisticDefinitionResponse> privateGetStatistic
return pfResult;
}

/**
* Get all current statistic definitions information
* @param request GetStatisticDefinitionsRequest
* @return Async Task will return GetStatisticDefinitionsResponse
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<GetStatisticDefinitionsResponse>> GetStatisticDefinitionsAsync(final GetStatisticDefinitionsRequest request) {
return new FutureTask(new Callable<PlayFabResult<GetStatisticDefinitionsResponse>>() {
public PlayFabResult<GetStatisticDefinitionsResponse> call() throws Exception {
return privateGetStatisticDefinitionsAsync(request);
}
});
}

/**
* Get all current statistic definitions information
* @param request GetStatisticDefinitionsRequest
* @return GetStatisticDefinitionsResponse
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<GetStatisticDefinitionsResponse> GetStatisticDefinitions(final GetStatisticDefinitionsRequest request) {
FutureTask<PlayFabResult<GetStatisticDefinitionsResponse>> task = new FutureTask(new Callable<PlayFabResult<GetStatisticDefinitionsResponse>>() {
public PlayFabResult<GetStatisticDefinitionsResponse> call() throws Exception {
return privateGetStatisticDefinitionsAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<GetStatisticDefinitionsResponse> exceptionResult = new PlayFabResult<GetStatisticDefinitionsResponse>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/** Get all current statistic definitions information */
@SuppressWarnings("unchecked")
private static PlayFabResult<GetStatisticDefinitionsResponse> privateGetStatisticDefinitionsAsync(final GetStatisticDefinitionsRequest request) throws Exception {
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Statistic/GetStatisticDefinitions"), request, "X-EntityToken", PlayFabSettings.EntityToken);
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<GetStatisticDefinitionsResponse>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

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

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

/**
* Gets statistics for the specified entity.
* @param request GetStatisticsRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,18 +277,6 @@ public static class GetStatisticDefinitionResponse {

}

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

}

public static class GetStatisticDefinitionsResponse {
/** List of statistic definitions for the title. */
public ArrayList<StatisticDefinition> StatisticDefinitions;

}

public static class GetStatisticsForEntitiesRequest {
/** 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 @@ -9,9 +9,9 @@
import com.playfab.PlayFabErrors.ErrorCallback;

public class PlayFabSettings {
public static String SdkVersion = "0.224.240830";
public static String BuildIdentifier = "adobuild_javasdk_8";
public static String SdkVersionString = "JavaSDK-0.224.240830";
public static String SdkVersion = "0.225.240913";
public static String BuildIdentifier = "adobuild_javasdk_118";
public static String SdkVersionString = "JavaSDK-0.225.240913";

public static Map<String, String> RequestGetParams;
static {
Expand Down
2 changes: 1 addition & 1 deletion PlayFabClientSDK/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.224.240830.jar -Destination ../../builds/client-sdk-0.224.240830.jar
Copy-Item client-sdk-0.225.240913.jar -Destination ../../builds/client-sdk-0.225.240913.jar
2 changes: 1 addition & 1 deletion PlayFabClientSDK/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.224.240830.jar ../../builds/client-sdk-0.224.240830.jar
cp client-sdk-0.225.240913.jar ../../builds/client-sdk-0.225.240913.jar
2 changes: 1 addition & 1 deletion PlayFabClientSDK/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- GAV & Meta -->
<groupId>com.playfab</groupId>
<artifactId>client-sdk</artifactId>
<version>0.224.240830</version>
<version>0.225.240913</version>
<name>PlayFab Client API</name>
<description>PlayFab is the unified backend platform for games — everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience. </description>
<url>https://docs.microsoft.com/gaming/playfab/</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public static enum LoginIdentityProvider {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

/** Given an entity token, validates that it hasn't expired or been revoked and will return details of the owner. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,8 @@ public static enum LoginIdentityProvider {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

public static class LoginResult {
Expand Down Expand Up @@ -4907,7 +4908,8 @@ public static enum UserOrigination {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

public static class UserPrivateAccountInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ public static enum LoginIdentityProvider {
Apple,
NintendoSwitchAccount,
GooglePlayGames,
XboxMobileStore
XboxMobileStore,
King
}

public static class LogStatement {
Expand Down
62 changes: 62 additions & 0 deletions PlayFabClientSDK/src/main/java/com/playfab/PlayFabProfilesAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,68 @@ private static PlayFabResult<GetTitlePlayersFromProviderIDsResponse> privateGetT
return pfResult;
}

/**
* Update the display name of the entity
* @param request SetDisplayNameRequest
* @return Async Task will return SetDisplayNameResponse
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<SetDisplayNameResponse>> SetDisplayNameAsync(final SetDisplayNameRequest request) {
return new FutureTask(new Callable<PlayFabResult<SetDisplayNameResponse>>() {
public PlayFabResult<SetDisplayNameResponse> call() throws Exception {
return privateSetDisplayNameAsync(request);
}
});
}

/**
* Update the display name of the entity
* @param request SetDisplayNameRequest
* @return SetDisplayNameResponse
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<SetDisplayNameResponse> SetDisplayName(final SetDisplayNameRequest request) {
FutureTask<PlayFabResult<SetDisplayNameResponse>> task = new FutureTask(new Callable<PlayFabResult<SetDisplayNameResponse>>() {
public PlayFabResult<SetDisplayNameResponse> call() throws Exception {
return privateSetDisplayNameAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<SetDisplayNameResponse> exceptionResult = new PlayFabResult<SetDisplayNameResponse>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/** Update the display name of the entity */
@SuppressWarnings("unchecked")
private static PlayFabResult<SetDisplayNameResponse> privateSetDisplayNameAsync(final SetDisplayNameRequest request) throws Exception {
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Profile/SetDisplayName"), request, "X-EntityToken", PlayFabSettings.EntityToken);
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<SetDisplayNameResponse>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

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

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

/**
* Sets the global title access policy
* @param request SetGlobalPolicyRequest
Expand Down
Loading

0 comments on commit 806935a

Please sign in to comment.