Example #1
0
        async public static Task <BlankResult> DeleteCurrencyData(string titleId, List <VirtualCurrencyData> currencyData)
        {
            var currentPlayFabTitleId = PlayFabSettings.TitleId;
            var currentDevKey         = PlayFabSettings.DeveloperSecretKey;

            var title = FindTitle(titleId);

            PlayFabSettings.TitleId            = titleId;
            PlayFabSettings.DeveloperSecretKey = title.SecretKey;
            var result = await PlayFabAdminAPI.RemoveVirtualCurrencyTypesAsync(new RemoveVirtualCurrencyTypesRequest()
            {
                VirtualCurrencies = currencyData
            });

            PlayFabSettings.TitleId            = currentPlayFabTitleId;
            PlayFabSettings.DeveloperSecretKey = currentDevKey;
            if (result.Error != null)
            {
                Console.WriteLine(PlayFabUtil.GetErrorReport(result.Error));
                return(null);
            }
            return(result.Result);
        }