/// <summary> /// Creates a multiplayer server build with a custom container. /// </summary> public static void CreateBuildWithCustomContainer(CreateBuildWithCustomContainerRequest request, Action <CreateBuildWithCustomContainerResponse> resultCallback, Action <PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer; PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithCustomContainer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context); }
/// <summary> /// Creates a multiplayer server build with a custom container. /// </summary> public void CreateBuildWithCustomContainer(CreateBuildWithCustomContainerRequest request, Action <CreateBuildWithCustomContainerResponse> resultCallback, Action <PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext; var callSettings = apiSettings ?? PlayFabSettings.staticSettings; if (!context.IsEntityLoggedIn()) { throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn, "Must be logged in to call this method"); } PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithCustomContainer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); }
/// <summary> /// Creates a multiplayer server build with a custom container. /// </summary> public static void CreateBuildWithCustomContainer(CreateBuildWithCustomContainerRequest request, Action <CreateBuildWithCustomContainerResponse> resultCallback, Action <PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { PlayFabHttp.MakeApiCall("/MultiplayerServer/CreateBuildWithCustomContainer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders); }
/// <summary> /// Creates a multiplayer server build with a custom container. /// </summary> public static async Task <PlayFabResult <CreateBuildWithCustomContainerResponse> > CreateBuildWithCustomContainerAsync(CreateBuildWithCustomContainerRequest request, object customData = null, Dictionary <string, string> extraHeaders = null) { if (PlayFabSettings.EntityToken == null) { throw new PlayFabException(PlayFabExceptionCode.EntityTokenNotSet, "Must call GetEntityToken before calling this method"); } var httpResult = await PlayFabHttp.DoPost("/MultiplayerServer/CreateBuildWithCustomContainer", request, "X-EntityToken", PlayFabSettings.EntityToken, extraHeaders); if (httpResult is PlayFabError) { var error = (PlayFabError)httpResult; PlayFabSettings.GlobalErrorHandler?.Invoke(error); return(new PlayFabResult <CreateBuildWithCustomContainerResponse> { Error = error, CustomData = customData }); } var resultRawJson = (string)httpResult; var resultData = PluginManager.GetPlugin <ISerializerPlugin>(PluginContract.PlayFab_Serializer).DeserializeObject <PlayFabJsonSuccess <CreateBuildWithCustomContainerResponse> >(resultRawJson); var result = resultData.data; return(new PlayFabResult <CreateBuildWithCustomContainerResponse> { Result = result, CustomData = customData }); }