Skip to content

Commit 042a150

Browse files
https://api.playfab.com/releaseNotes/#190903
1 parent 19662f2 commit 042a150

27 files changed

+314
-28
lines changed

AndroidStudioExample/app/packageMe.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds
55
popd
66

77
cd target
8-
Copy-Item client-sdk-0.96.190828.jar -Destination ../../builds/client-sdk-0.96.190828.jar
8+
Copy-Item client-sdk-0.97.190903.jar -Destination ../../builds/client-sdk-0.97.190903.jar

AndroidStudioExample/app/packageMe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ mkdir -p ./builds
77
popd
88

99
cd target
10-
cp client-sdk-0.96.190828.jar ../../builds/client-sdk-0.96.190828.jar
10+
cp client-sdk-0.97.190903.jar ../../builds/client-sdk-0.97.190903.jar

AndroidStudioExample/app/src/main/java/com/playfab/PlayFabClientModels.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ public static class GetSharedGroupDataResult {
19481948
* to the user.
19491949
*/
19501950
public static class GetStoreItemsRequest {
1951-
/** catalog version to store items from. Use default catalog version if null */
1951+
/** Catalog version to store items from. Use default catalog version if null */
19521952
public String CatalogVersion;
19531953
/** Unqiue identifier for the store which is being requested. */
19541954
public String StoreId;

AndroidStudioExample/app/src/main/java/com/playfab/PlayFabSettings.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import com.playfab.PlayFabErrors.ErrorCallback;
1010

1111
public class PlayFabSettings {
12-
public static String SdkVersion = "0.96.190828";
13-
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-1_1";
14-
public static String SdkVersionString = "JavaSDK-0.96.190828";
12+
public static String SdkVersion = "0.97.190903";
13+
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-2_1";
14+
public static String SdkVersionString = "JavaSDK-0.97.190903";
1515

1616
public static Map<String, String> RequestGetParams;
1717
static {

PlayFabClientSDK/packageMe.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds
55
popd
66

77
cd target
8-
Copy-Item client-sdk-0.96.190828.jar -Destination ../../builds/client-sdk-0.96.190828.jar
8+
Copy-Item client-sdk-0.97.190903.jar -Destination ../../builds/client-sdk-0.97.190903.jar

PlayFabClientSDK/packageMe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ mkdir -p ./builds
77
popd
88

99
cd target
10-
cp client-sdk-0.96.190828.jar ../../builds/client-sdk-0.96.190828.jar
10+
cp client-sdk-0.97.190903.jar ../../builds/client-sdk-0.97.190903.jar

PlayFabClientSDK/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- GAV & Meta -->
1515
<groupId>com.playfab</groupId>
1616
<artifactId>client-sdk</artifactId>
17-
<version>0.96.190828</version>
17+
<version>0.97.190903</version>
1818
<name>PlayFab Client API</name>
1919
<description>PlayFab is the unified backend platform for games — everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience. </description>
2020
<url>http://api.playfab.com/</url>

PlayFabClientSDK/src/main/java/com/playfab/PlayFabClientModels.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ public static class GetSharedGroupDataResult {
19481948
* to the user.
19491949
*/
19501950
public static class GetStoreItemsRequest {
1951-
/** catalog version to store items from. Use default catalog version if null */
1951+
/** Catalog version to store items from. Use default catalog version if null */
19521952
public String CatalogVersion;
19531953
/** Unqiue identifier for the store which is being requested. */
19541954
public String StoreId;

PlayFabClientSDK/src/main/java/com/playfab/PlayFabSettings.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import com.playfab.PlayFabErrors.ErrorCallback;
99

1010
public class PlayFabSettings {
11-
public static String SdkVersion = "0.96.190828";
12-
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-1_1";
13-
public static String SdkVersionString = "JavaSDK-0.96.190828";
11+
public static String SdkVersion = "0.97.190903";
12+
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-2_1";
13+
public static String SdkVersionString = "JavaSDK-0.97.190903";
1414

1515
public static Map<String, String> RequestGetParams;
1616
static {

PlayFabSDK/packageMe.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds
55
popd
66

77
cd target
8-
Copy-Item combo-sdk-0.96.190828.jar -Destination ../../builds/combo-sdk-0.96.190828.jar
8+
Copy-Item combo-sdk-0.97.190903.jar -Destination ../../builds/combo-sdk-0.97.190903.jar

PlayFabSDK/packageMe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ mkdir -p ./builds
77
popd
88

99
cd target
10-
cp combo-sdk-0.96.190828.jar ../../builds/combo-sdk-0.96.190828.jar
10+
cp combo-sdk-0.97.190903.jar ../../builds/combo-sdk-0.97.190903.jar

PlayFabSDK/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- GAV & Meta -->
1515
<groupId>com.playfab</groupId>
1616
<artifactId>combo-sdk</artifactId>
17-
<version>0.96.190828</version>
17+
<version>0.97.190903</version>
1818
<name>PlayFab Combo API</name>
1919
<description>PlayFab is the unified backend platform for games — everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience. </description>
2020
<url>http://api.playfab.com/</url>

PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ public static class GetServerBuildUploadURLResult {
22622262
* specified in the store for an item, the price set in the catalog should be displayed to the user.
22632263
*/
22642264
public static class GetStoreItemsRequest {
2265-
/** catalog version to store items from. Use default catalog version if null */
2265+
/** Catalog version to store items from. Use default catalog version if null */
22662266
public String CatalogVersion;
22672267
/** Unqiue identifier for the store which is being requested. */
22682268
public String StoreId;

PlayFabSDK/src/main/java/com/playfab/PlayFabClientModels.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ public static class GetSharedGroupDataResult {
19481948
* to the user.
19491949
*/
19501950
public static class GetStoreItemsRequest {
1951-
/** catalog version to store items from. Use default catalog version if null */
1951+
/** Catalog version to store items from. Use default catalog version if null */
19521952
public String CatalogVersion;
19531953
/** Unqiue identifier for the store which is being requested. */
19541954
public String StoreId;

PlayFabSDK/src/main/java/com/playfab/PlayFabServerAPI.java

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3260,6 +3260,66 @@ private static PlayFabResult<GetSharedGroupDataResult> privateGetSharedGroupData
32603260
return pfResult;
32613261
}
32623262

3263+
/**
3264+
* Retrieves the set of items defined for the specified store, including all prices defined, for the specified player
3265+
* @param request GetStoreItemsServerRequest
3266+
* @return Async Task will return GetStoreItemsResult
3267+
*/
3268+
@SuppressWarnings("unchecked")
3269+
public static FutureTask<PlayFabResult<GetStoreItemsResult>> GetStoreItemsAsync(final GetStoreItemsServerRequest request) {
3270+
return new FutureTask(new Callable<PlayFabResult<GetStoreItemsResult>>() {
3271+
public PlayFabResult<GetStoreItemsResult> call() throws Exception {
3272+
return privateGetStoreItemsAsync(request);
3273+
}
3274+
});
3275+
}
3276+
3277+
/**
3278+
* Retrieves the set of items defined for the specified store, including all prices defined, for the specified player
3279+
* @param request GetStoreItemsServerRequest
3280+
* @return GetStoreItemsResult
3281+
*/
3282+
@SuppressWarnings("unchecked")
3283+
public static PlayFabResult<GetStoreItemsResult> GetStoreItems(final GetStoreItemsServerRequest request) {
3284+
FutureTask<PlayFabResult<GetStoreItemsResult>> task = new FutureTask(new Callable<PlayFabResult<GetStoreItemsResult>>() {
3285+
public PlayFabResult<GetStoreItemsResult> call() throws Exception {
3286+
return privateGetStoreItemsAsync(request);
3287+
}
3288+
});
3289+
try {
3290+
task.run();
3291+
return task.get();
3292+
} catch(Exception e) {
3293+
return null;
3294+
}
3295+
}
3296+
3297+
/** Retrieves the set of items defined for the specified store, including all prices defined, for the specified player */
3298+
@SuppressWarnings("unchecked")
3299+
private static PlayFabResult<GetStoreItemsResult> privateGetStoreItemsAsync(final GetStoreItemsServerRequest request) throws Exception {
3300+
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");
3301+
3302+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Server/GetStoreItems"), request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
3303+
task.run();
3304+
Object httpResult = task.get();
3305+
if (httpResult instanceof PlayFabError) {
3306+
PlayFabError error = (PlayFabError)httpResult;
3307+
if (PlayFabSettings.GlobalErrorHandler != null)
3308+
PlayFabSettings.GlobalErrorHandler.callback(error);
3309+
PlayFabResult result = new PlayFabResult<GetStoreItemsResult>();
3310+
result.Error = error;
3311+
return result;
3312+
}
3313+
String resultRawJson = (String) httpResult;
3314+
3315+
PlayFabJsonSuccess<GetStoreItemsResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetStoreItemsResult>>(){}.getType());
3316+
GetStoreItemsResult result = resultData.data;
3317+
3318+
PlayFabResult<GetStoreItemsResult> pfResult = new PlayFabResult<GetStoreItemsResult>();
3319+
pfResult.Result = result;
3320+
return pfResult;
3321+
}
3322+
32633323
/**
32643324
* Retrieves the current server time
32653325
* @param request GetTimeRequest

PlayFabSDK/src/main/java/com/playfab/PlayFabServerModels.java

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,6 +2339,45 @@ public static class GetSharedGroupDataResult {
23392339

23402340
}
23412341

2342+
public static class GetStoreItemsResult {
2343+
/** The base catalog that this store is a part of. */
2344+
public String CatalogVersion;
2345+
/** Additional data about the store. */
2346+
public StoreMarketingModel MarketingData;
2347+
/** How the store was last updated (Admin or a third party). */
2348+
public SourceType Source;
2349+
/** Array of items which can be purchased from this store. */
2350+
@Unordered("ItemId")
2351+
public ArrayList<StoreItem> Store;
2352+
/** The ID of this store. */
2353+
public String StoreId;
2354+
2355+
}
2356+
2357+
/**
2358+
* A store contains an array of references to items defined in one or more catalog versions of the game, along with the
2359+
* prices for the item, in both real world and virtual currencies. These prices act as an override to any prices defined in
2360+
* the catalog. In this way, the base definitions of the items may be defined in the catalog, with all associated
2361+
* properties, while the pricing can be set for each store, as needed. This allows for subsets of goods to be defined for
2362+
* different purposes (in order to simplify showing some, but not all catalog items to users, based upon different
2363+
* characteristics), along with unique prices. Note that all prices defined in the catalog and store definitions for the
2364+
* item are considered valid, and that a compromised client can be made to send a request for an item based upon any of
2365+
* these definitions. If no price is specified in the store for an item, the price set in the catalog should be displayed
2366+
* to the user.
2367+
*/
2368+
public static class GetStoreItemsServerRequest {
2369+
/** Catalog version to store items from. Use default catalog version if null */
2370+
public String CatalogVersion;
2371+
/**
2372+
* Optional identifier for the player to use in requesting the store information - if used, segment overrides will be
2373+
* applied
2374+
*/
2375+
public String PlayFabId;
2376+
/** Unqiue identifier for the store which is being requested */
2377+
public String StoreId;
2378+
2379+
}
2380+
23422381
/**
23432382
* This query retrieves the current time from one of the servers in PlayFab. Please note that due to clock drift between
23442383
* servers, there is a potential variance of up to 5 seconds.
@@ -3768,6 +3807,16 @@ public static class SharedGroupDataRecord {
37683807

37693808
}
37703809

3810+
public static enum SourceType {
3811+
Admin,
3812+
BackEnd,
3813+
GameClient,
3814+
GameServer,
3815+
Partner,
3816+
Custom,
3817+
API
3818+
}
3819+
37713820
public static class StatisticModel {
37723821
/** Statistic name */
37733822
public String Name;
@@ -3817,6 +3866,40 @@ public static class SteamPlayFabIdPair {
38173866

38183867
}
38193868

3869+
/** A store entry that list a catalog item at a particular price */
3870+
public static class StoreItem implements Comparable<StoreItem> {
3871+
/** Store specific custom data. The data only exists as part of this store; it is not transferred to item instances */
3872+
public Object CustomData;
3873+
/** Intended display position for this item. Note that 0 is the first position */
3874+
public Long DisplayPosition;
3875+
/**
3876+
* Unique identifier of the item as it exists in the catalog - note that this must exactly match the ItemId from the
3877+
* catalog
3878+
*/
3879+
public String ItemId;
3880+
/** Override prices for this item for specific currencies */
3881+
public Map<String,Long> RealCurrencyPrices;
3882+
/** Override prices for this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) */
3883+
public Map<String,Long> VirtualCurrencyPrices;
3884+
3885+
public int compareTo(StoreItem other) {
3886+
if (other == null || other.ItemId == null) return 1;
3887+
if (ItemId == null) return -1;
3888+
return ItemId.compareTo(other.ItemId);
3889+
}
3890+
}
3891+
3892+
/** Marketing data about a specific store */
3893+
public static class StoreMarketingModel {
3894+
/** Tagline for a store. */
3895+
public String Description;
3896+
/** Display name of a store as it will appear to users. */
3897+
public String DisplayName;
3898+
/** Custom data about a store. */
3899+
public Object Metadata;
3900+
3901+
}
3902+
38203903
public static class SubscriptionModel {
38213904
/** When this subscription expires. */
38223905
public Date Expiration;

PlayFabSDK/src/main/java/com/playfab/PlayFabSettings.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import com.playfab.PlayFabErrors.ErrorCallback;
99

1010
public class PlayFabSettings {
11-
public static String SdkVersion = "0.96.190828";
12-
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-1_1";
13-
public static String SdkVersionString = "JavaSDK-0.96.190828";
11+
public static String SdkVersion = "0.97.190903";
12+
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-2_1";
13+
public static String SdkVersionString = "JavaSDK-0.97.190903";
1414

1515
public static Map<String, String> RequestGetParams;
1616
static {

PlayFabServerSDK/packageMe.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ New-Item -ItemType Directory -Force ./builds
55
popd
66

77
cd target
8-
Copy-Item server-sdk-0.96.190828.jar -Destination ../../builds/server-sdk-0.96.190828.jar
8+
Copy-Item server-sdk-0.97.190903.jar -Destination ../../builds/server-sdk-0.97.190903.jar

PlayFabServerSDK/packageMe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ mkdir -p ./builds
77
popd
88

99
cd target
10-
cp server-sdk-0.96.190828.jar ../../builds/server-sdk-0.96.190828.jar
10+
cp server-sdk-0.97.190903.jar ../../builds/server-sdk-0.97.190903.jar

PlayFabServerSDK/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- GAV & Meta -->
1515
<groupId>com.playfab</groupId>
1616
<artifactId>server-sdk</artifactId>
17-
<version>0.96.190828</version>
17+
<version>0.97.190903</version>
1818
<name>PlayFab Server API</name>
1919
<description>PlayFab is the unified backend platform for games — everything you need to build and operate your game, all in one place, so you can focus on creating and delivering a great player experience. </description>
2020
<url>http://api.playfab.com/</url>

PlayFabServerSDK/src/main/java/com/playfab/PlayFabAdminModels.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ public static class GetServerBuildUploadURLResult {
22622262
* specified in the store for an item, the price set in the catalog should be displayed to the user.
22632263
*/
22642264
public static class GetStoreItemsRequest {
2265-
/** catalog version to store items from. Use default catalog version if null */
2265+
/** Catalog version to store items from. Use default catalog version if null */
22662266
public String CatalogVersion;
22672267
/** Unqiue identifier for the store which is being requested. */
22682268
public String StoreId;

0 commit comments

Comments
 (0)