/// <summary> /// Retrieves the list of allowed languages, only accessible by title entities /// </summary> public void GetLanguageList(GetLanguageListRequest request, Action <GetLanguageListResponse> 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; PlayFabHttp.MakeApiCall("/Locale/GetLanguageList", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); }
/// <summary> /// Retrieves the list of allowed languages, only accessible by title entities /// </summary> public void GetLanguageList(GetLanguageListRequest request, Action <GetLanguageListResponse> 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("/Locale/GetLanguageList", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this); }
/// <summary> /// Retrieves the list of allowed languages, only accessible by title entities /// </summary> public static Task <GetLanguageListResponse> GetLanguageList( PlayFabAuthenticationContext customAuthContext = null, object customData = null, Dictionary <string, string> extraHeaders = null) { GetLanguageListRequest request = new GetLanguageListRequest() { }; var context = GetContext(customAuthContext); return(PlayFabHttp.MakeApiCallAsync <GetLanguageListResponse>("/Locale/GetLanguageList", request, AuthType.EntityToken, customData, extraHeaders, context)); }
/// <summary> /// Retrieves the list of allowed languages, only accessible by title entities /// </summary> public async Task <PlayFabResult <GetLanguageListResponse> > GetLanguageListAsync(GetLanguageListRequest request, object customData = null, Dictionary <string, string> extraHeaders = null) { if ((request?.AuthenticationContext?.EntityToken ?? PlayFabSettings.staticPlayer.EntityToken) == null) { throw new PlayFabException(PlayFabExceptionCode.EntityTokenNotSet, "Must call GetEntityToken before calling this method"); } var httpResult = await PlayFabHttp.DoPost("/Locale/GetLanguageList", request, "X-EntityToken", PlayFabSettings.staticPlayer.EntityToken, extraHeaders, apiSettings); if (httpResult is PlayFabError) { var error = (PlayFabError)httpResult; PlayFabSettings.GlobalErrorHandler?.Invoke(error); return(new PlayFabResult <GetLanguageListResponse> { Error = error, CustomData = customData }); } var resultRawJson = (string)httpResult; var resultData = PluginManager.GetPlugin <ISerializerPlugin>(PluginContract.PlayFab_Serializer).DeserializeObject <PlayFabJsonSuccess <GetLanguageListResponse> >(resultRawJson); var result = resultData.data; return(new PlayFabResult <GetLanguageListResponse> { Result = result, CustomData = customData }); }
/// <summary> /// Retrieves the list of allowed languages, only accessible by title entities /// </summary> public static void GetLanguageList(GetLanguageListRequest request, Action <GetLanguageListResponse> resultCallback, Action <PlayFabError> errorCallback, object customData = null, Dictionary <string, string> extraHeaders = null) { PlayFabHttp.MakeApiCall("/Locale/GetLanguageList", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders); }