public static void ExportGooglePlayCatalog()
        {
            PlayFabSettingsHelper.Initialize();

            StringBuilder outputFile = new StringBuilder();

            outputFile.AppendLine("Product Id, Published State, Purchase Type, Auto Translate, Locale; Title; Description, Auto Fill Prices, Price");

            // Getting the CatalogItems
            var catalogItems = PlayFabEditorAdmin.GetCatalogItems("1.0");

            Debug.Log("Catalog Count = " + catalogItems?.Result?.Catalog?.Count);

            // // Foreach Catalog Item...
            // string productId = string.Empty;
            // string purchaseType = string.Empty;
            // string autoTranslate = string.Empty;
            // string autoFillPrices = string.Empty;
            // StringBuilder localeTitleDescription = new StringBuilder();
            // StringBuilder price = new StringBuilder();
            // AppendRow(outputFile, productId, purchaseType, autoTranslate, localeTitleDescription.ToString(), autoFillPrices, price.ToString());
            //
            // // Exporint out the file to the desktop
            // string desktop = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            // string outputPath = System.IO.Path.Combine(desktop, "GooglePlay.csv");
            // System.IO.File.WriteAllText(outputPath, outputFile.ToString());
        }
Esempio n. 2
0
        public static PlayFabResult <GetCatalogItemsResult> GetCatalogItems(string catalotVersion)
        {
            PlayFabSettingsHelper.Initialize();

            PlayFabResult <GetCatalogItemsResult> result = null;

            var task = Task.Run(async() =>
            {
                result = await PlayFab.PlayFabAdminAPI.GetCatalogItemsAsync(new GetCatalogItemsRequest
                {
                    CatalogVersion = catalotVersion,
                });
            });

            task.Wait();

            return(result);
        }
Esempio n. 3
0
        public static PlayFabResult <SetTitleDataResult> SetTitleDataTask(string titleDataKey, string json)
        {
            PlayFabSettingsHelper.Initialize();

            PlayFabResult <SetTitleDataResult> result = null;

            var task = Task.Run(async() =>
            {
                result = await PlayFab.PlayFabAdminAPI.SetTitleDataAsync(new SetTitleDataRequest
                {
                    Key   = titleDataKey,
                    Value = json,
                });
            });

            task.Wait();

            return(result);
        }