Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#231208
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Dec 11, 2023
2 parents e64e549 + f91d068 commit 102902f
Show file tree
Hide file tree
Showing 34 changed files with 1,267 additions and 19 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.206.231124.jar -Destination ../../builds/client-sdk-0.206.231124.jar
Copy-Item client-sdk-0.207.231208.jar -Destination ../../builds/client-sdk-0.207.231208.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.206.231124.jar ../../builds/client-sdk-0.206.231124.jar
cp client-sdk-0.207.231208.jar ../../builds/client-sdk-0.207.231208.jar
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ public static enum PlayFabErrorCode {
LeaderboardColumnLengthMismatch(1562),
InvalidStatisticScore(1563),
LeaderboardColumnsNotSpecified(1564),
LeaderboardMaxSizeTooLarge(1565),
MatchmakingEntityInvalid(2001),
MatchmakingPlayerAttributesInvalid(2002),
MatchmakingQueueNotFound(2016),
Expand Down Expand Up @@ -606,6 +607,7 @@ public static enum PlayFabErrorCode {
CatalogItemTypeInvalid(4012),
CatalogBadRequest(4013),
CatalogTooManyRequests(4014),
InvalidCatalogItemConfiguration(4015),
ExportInvalidStatusUpdate(5000),
ExportInvalidPrefix(5001),
ExportBlobContainerDoesNotExist(5002),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2831,6 +2831,68 @@ private static PlayFabResult<JoinLobbyResult> privateJoinLobbyAsync(final JoinLo
return pfResult;
}

/**
* Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections.
* @param request JoinLobbyAsServerRequest
* @return Async Task will return JoinLobbyAsServerResult
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<JoinLobbyAsServerResult>> JoinLobbyAsServerAsync(final JoinLobbyAsServerRequest request) {
return new FutureTask(new Callable<PlayFabResult<JoinLobbyAsServerResult>>() {
public PlayFabResult<JoinLobbyAsServerResult> call() throws Exception {
return privateJoinLobbyAsServerAsync(request);
}
});
}

/**
* Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections.
* @param request JoinLobbyAsServerRequest
* @return JoinLobbyAsServerResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<JoinLobbyAsServerResult> JoinLobbyAsServer(final JoinLobbyAsServerRequest request) {
FutureTask<PlayFabResult<JoinLobbyAsServerResult>> task = new FutureTask(new Callable<PlayFabResult<JoinLobbyAsServerResult>>() {
public PlayFabResult<JoinLobbyAsServerResult> call() throws Exception {
return privateJoinLobbyAsServerAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<JoinLobbyAsServerResult> exceptionResult = new PlayFabResult<JoinLobbyAsServerResult>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/** Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections. */
@SuppressWarnings("unchecked")
private static PlayFabResult<JoinLobbyAsServerResult> privateJoinLobbyAsServerAsync(final JoinLobbyAsServerRequest 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("/Lobby/JoinLobbyAsServer"), 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<JoinLobbyAsServerResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

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

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

/**
* Join a matchmaking ticket.
* @param request JoinMatchmakingTicketRequest
Expand Down Expand Up @@ -2955,6 +3017,68 @@ private static PlayFabResult<LobbyEmptyResult> privateLeaveLobbyAsync(final Leav
return pfResult;
}

/**
* Preview: Request for server to leave a lobby. This is restricted to client owned lobbies which are using connections.
* @param request LeaveLobbyAsServerRequest
* @return Async Task will return LobbyEmptyResult
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<LobbyEmptyResult>> LeaveLobbyAsServerAsync(final LeaveLobbyAsServerRequest request) {
return new FutureTask(new Callable<PlayFabResult<LobbyEmptyResult>>() {
public PlayFabResult<LobbyEmptyResult> call() throws Exception {
return privateLeaveLobbyAsServerAsync(request);
}
});
}

/**
* Preview: Request for server to leave a lobby. This is restricted to client owned lobbies which are using connections.
* @param request LeaveLobbyAsServerRequest
* @return LobbyEmptyResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<LobbyEmptyResult> LeaveLobbyAsServer(final LeaveLobbyAsServerRequest request) {
FutureTask<PlayFabResult<LobbyEmptyResult>> task = new FutureTask(new Callable<PlayFabResult<LobbyEmptyResult>>() {
public PlayFabResult<LobbyEmptyResult> call() throws Exception {
return privateLeaveLobbyAsServerAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<LobbyEmptyResult> exceptionResult = new PlayFabResult<LobbyEmptyResult>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/** Preview: Request for server to leave a lobby. This is restricted to client owned lobbies which are using connections. */
@SuppressWarnings("unchecked")
private static PlayFabResult<LobbyEmptyResult> privateLeaveLobbyAsServerAsync(final LeaveLobbyAsServerRequest 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("/Lobby/LeaveLobbyAsServer"), 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<LobbyEmptyResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

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

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

/**
* Lists archived multiplayer server sessions for a build.
* @param request ListMultiplayerServersRequest
Expand Down Expand Up @@ -4648,6 +4772,76 @@ private static PlayFabResult<LobbyEmptyResult> privateUpdateLobbyAsync(final Upd
return pfResult;
}

/**
* Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring
* by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect
* behavior.
* @param request UpdateLobbyAsServerRequest
* @return Async Task will return LobbyEmptyResult
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<LobbyEmptyResult>> UpdateLobbyAsServerAsync(final UpdateLobbyAsServerRequest request) {
return new FutureTask(new Callable<PlayFabResult<LobbyEmptyResult>>() {
public PlayFabResult<LobbyEmptyResult> call() throws Exception {
return privateUpdateLobbyAsServerAsync(request);
}
});
}

/**
* Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring
* by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect
* behavior.
* @param request UpdateLobbyAsServerRequest
* @return LobbyEmptyResult
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<LobbyEmptyResult> UpdateLobbyAsServer(final UpdateLobbyAsServerRequest request) {
FutureTask<PlayFabResult<LobbyEmptyResult>> task = new FutureTask(new Callable<PlayFabResult<LobbyEmptyResult>>() {
public PlayFabResult<LobbyEmptyResult> call() throws Exception {
return privateUpdateLobbyAsServerAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
PlayFabResult<LobbyEmptyResult> exceptionResult = new PlayFabResult<LobbyEmptyResult>();
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null, null);
return exceptionResult;
}
}

/**
* Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring
* by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect
* behavior.
*/
@SuppressWarnings("unchecked")
private static PlayFabResult<LobbyEmptyResult> privateUpdateLobbyAsServerAsync(final UpdateLobbyAsServerRequest 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("/Lobby/UpdateLobbyAsServer"), 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<LobbyEmptyResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

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

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

/**
* Uploads a multiplayer server game certificate.
* @param request UploadCertificateRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,45 @@ public static class JoinArrangedLobbyRequest {

}

/**
* Preview: Request to join a lobby as a server. Only callable by a game_server entity and this is restricted to client
* owned lobbies which are using connections.
*/
public static class JoinLobbyAsServerRequest {
/**
* A field which indicates which lobby the game_server will be joining. This field is opaque to everyone except the Lobby
* service.
*/
public String ConnectionString;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;
/**
* The private key-value pairs which are visible to all entities in the lobby but can only be modified by the joined
* server.At most 30 key - value pairs may be stored here, keys are limited to 30 characters and values to 1000.The total
* size of all serverData values may not exceed 4096 bytes.
*/
public Map<String,String> ServerData;
/**
* The game_server entity which is joining the Lobby. If a different game_server entity has already joined the request will
* fail unless the joined entity is disconnected, in which case the incoming game_server entity will replace the
* disconnected entity.
*/
public EntityKey ServerEntity;

}

public static class JoinLobbyAsServerResult {
/** Successfully joined lobby's id. */
public String LobbyId;
/**
* A setting that describes the state of the ServerData after JoinLobbyAsServer call is completed. It is "Initialized", the
* first time a server joins the lobby. It is "Ignored" in any subsequent JoinLobbyAsServer calls after it has been
* initialized. Any new server taking over should call UpdateLobbyAsServer to update ServerData fields.
*/
public ServerDataStatus ServerDataStatus;

}

/** Request to join a lobby. Only a client can join a lobby. */
public static class JoinLobbyRequest {
/** A field which indicates which lobby the user will be joining. This field is opaque to everyone except the Lobby service. */
Expand Down Expand Up @@ -1748,6 +1787,23 @@ public static class JoinMatchmakingTicketResult {

}

/**
* Preview: Request for server to leave a lobby. Only a game_server entity can leave and this is restricted to client owned
* lobbies which are using connections.
*/
public static class LeaveLobbyAsServerRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;
/** The id of the lobby. */
public String LobbyId;
/**
* The game_server entity leaving the lobby. If the game_server was subscribed to notifications, it will be unsubscribed.
* If a the given game_server entity is not in the lobby, it will fail.
*/
public EntityKey ServerEntity;

}

/** Request to leave a lobby. Only a client can leave a lobby. */
public static class LeaveLobbyRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
Expand Down Expand Up @@ -2457,6 +2513,11 @@ public static class ScheduledStandbySettings {

}

public static enum ServerDataStatus {
Initialized,
Ignored
}

public static class ServerDetails {
/** The fully qualified domain name of the virtual machine that is hosting this multiplayer server. */
public String Fqdn;
Expand Down Expand Up @@ -2627,6 +2688,37 @@ public static class UpdateBuildRegionsRequest {

}

/**
* Preview: Request to update the serverData and serverEntity in case of migration. Only a game_server entity can update
* this information and this is restricted to client owned lobbies which are using connections.
*/
public static class UpdateLobbyAsServerRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
public Map<String,String> CustomTags;
/** The id of the lobby. */
public String LobbyId;
/**
* The lobby server. Optional. Set a different server as the joined server of the lobby (there can only be 1 joined
* server). When changing the server the previous server will automatically be unsubscribed.
*/
public EntityKey Server;
/**
* The private key-value pairs which are visible to all entities in the lobby and modifiable by the joined server.
* Optional. Sets or updates key-value pairs on the lobby. Only the current lobby lobby server can set serverData. Keys may
* be an arbitrary string of at most 30 characters. The total size of all serverData values may not exceed 4096 bytes.
* Values are not individually limited. There can be up to 30 key-value pairs stored here. Keys are case sensitive.
*/
public Map<String,String> ServerData;
/**
* The keys to delete from the lobby serverData. Optional. Optional. Deletes key-value pairs on the lobby. Only the current
* joined lobby server can delete serverData. All the specified keys will be removed from the serverData. Keys that do not
* exist in the lobby are a no-op. If the key to delete exists in the serverData (same request) it will result in a bad
* request.
*/
public ArrayList<String> ServerDataToDelete;

}

/** Request to update a lobby. */
public static class UpdateLobbyRequest {
/**
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.206.231124";
public static String SdkVersion = "0.207.231208";
public static String BuildIdentifier = "adobuild_javasdk_118";
public static String SdkVersionString = "JavaSDK-0.206.231124";
public static String SdkVersionString = "JavaSDK-0.207.231208";

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.206.231124.jar -Destination ../../builds/client-sdk-0.206.231124.jar
Copy-Item client-sdk-0.207.231208.jar -Destination ../../builds/client-sdk-0.207.231208.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.206.231124.jar ../../builds/client-sdk-0.206.231124.jar
cp client-sdk-0.207.231208.jar ../../builds/client-sdk-0.207.231208.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.206.231124</version>
<version>0.207.231208</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
Loading

0 comments on commit 102902f

Please sign in to comment.