/// <summary> /// Retrieves the build details for the specified game server executable /// </summary> public static void GetServerBuildInfo(GetServerBuildInfoRequest request, GetServerBuildInfoCallback resultCallback, ErrorCallback errorCallback, object customData = null) { string serializedJSON = JsonConvert.SerializeObject(request, Util.JsonFormatting, Util.JsonSettings); Action<string,PlayFabError> callback = delegate(string responseStr, PlayFabError pfError) { GetServerBuildInfoResult result = null; ResultContainer<GetServerBuildInfoResult>.HandleResults(responseStr, ref pfError, out result); if(pfError != null && errorCallback != null) { errorCallback(pfError); } if(result != null) { result.CustomData = customData; result.Request = request; if(resultCallback != null) { resultCallback(result); } } }; PlayFabHTTP.Post(PlayFabSettings.GetURL()+"/Admin/GetServerBuildInfo", serializedJSON, null, null, callback); }
/// <summary> /// Retrieves the build details for the specified game server executable /// </summary> public static void GetServerBuildInfo(GetServerBuildInfoRequest request, GetServerBuildInfoCallback resultCallback, ErrorCallback errorCallback) { string serializedJSON = JsonConvert.SerializeObject(request, Util.JsonFormatting, Util.JsonSettings); Action<string,string> callback = delegate(string responseStr, string errorStr) { GetServerBuildInfoResult result = null; PlayFabError error = null; ResultContainer<GetServerBuildInfoResult>.HandleResults(responseStr, errorStr, out result, out error); if(error != null && errorCallback != null) { errorCallback(error); } if(result != null) { if(resultCallback != null) { resultCallback(result); } } }; PlayFabHTTP.Post(PlayFabSettings.GetURL()+"/Admin/GetServerBuildInfo", serializedJSON, null, null, callback); }
/// <summary> /// Retrieves the build details for the specified game server executable /// </summary> public static void GetServerBuildInfo(GetServerBuildInfoRequest request, PlayFabResultCommon.ProcessApiCallback<GetServerBuildInfoResult> resultCallback, ErrorCallback errorCallback, object customData = null) { if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); string serializedJson = JsonWrapper.SerializeObject(request, PlayFabUtil.ApiSerializerStrategy); Action<CallRequestContainer> callback = delegate(CallRequestContainer requestContainer) { ResultContainer<GetServerBuildInfoResult>.HandleResults(requestContainer, resultCallback, errorCallback, null); }; PlayFabHttp.Post("/Admin/GetServerBuildInfo", serializedJson, "X-SecretKey", PlayFabSettings.DeveloperSecretKey, callback, request, customData); }
/// <summary> /// Retrieves the build details for the specified game server executable /// </summary> public static void GetServerBuildInfo(GetServerBuildInfoRequest request, Action<GetServerBuildInfoResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null) { if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception("Must have PlayFabSettings.DeveloperSecretKey set to call this method"); PlayFabHttp.MakeApiCall("/Admin/GetServerBuildInfo", request, AuthType.DevSecretKey, resultCallback, errorCallback, customData); }
/// <summary> /// Retrieves the build details for the specified game server executable /// </summary> public static async Task<PlayFabResult<GetServerBuildInfoResult>> GetServerBuildInfoAsync(GetServerBuildInfoRequest request) { object httpResult = await PlayFabHTTP.DoPost(PlayFabSettings.GetURL() + "/Admin/GetServerBuildInfo", request, null, null); if(httpResult is PlayFabError) { PlayFabError error = (PlayFabError)httpResult; if (PlayFabSettings.GlobalErrorHandler != null) PlayFabSettings.GlobalErrorHandler(error); return new PlayFabResult<GetServerBuildInfoResult> { Error = error, }; } string resultRawJson = (string)httpResult; var serializer = JsonSerializer.Create(PlayFabSettings.JsonSettings); var resultData = serializer.Deserialize<PlayFabJsonSuccess<GetServerBuildInfoResult>>(new JsonTextReader(new StringReader(resultRawJson))); GetServerBuildInfoResult result = resultData.data; return new PlayFabResult<GetServerBuildInfoResult> { Result = result }; }