Skip to content

Commit d203ac4

Browse files
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#201027
1 parent b84c785 commit d203ac4

37 files changed

+375
-54
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.121.201014.jar -Destination ../../builds/client-sdk-0.121.201014.jar
8+
Copy-Item client-sdk-0.122.201027.jar -Destination ../../builds/client-sdk-0.122.201027.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.121.201014.jar ../../builds/client-sdk-0.121.201014.jar
10+
cp client-sdk-0.122.201027.jar ../../builds/client-sdk-0.122.201027.jar

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,68 @@ private static PlayFabResult<ConsumeItemResult> privateConsumeItemAsync(final Co
809809
return pfResult;
810810
}
811811

812+
/**
813+
* Grants the player's current entitlements from Microsoft Store's Collection API
814+
* @param request ConsumeMicrosoftStoreEntitlementsRequest
815+
* @return Async Task will return ConsumeMicrosoftStoreEntitlementsResponse
816+
*/
817+
@SuppressWarnings("unchecked")
818+
public static FutureTask<PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse>> ConsumeMicrosoftStoreEntitlementsAsync(final ConsumeMicrosoftStoreEntitlementsRequest request) {
819+
return new FutureTask(new Callable<PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse>>() {
820+
public PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse> call() throws Exception {
821+
return privateConsumeMicrosoftStoreEntitlementsAsync(request);
822+
}
823+
});
824+
}
825+
826+
/**
827+
* Grants the player's current entitlements from Microsoft Store's Collection API
828+
* @param request ConsumeMicrosoftStoreEntitlementsRequest
829+
* @return ConsumeMicrosoftStoreEntitlementsResponse
830+
*/
831+
@SuppressWarnings("unchecked")
832+
public static PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse> ConsumeMicrosoftStoreEntitlements(final ConsumeMicrosoftStoreEntitlementsRequest request) {
833+
FutureTask<PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse>> task = new FutureTask(new Callable<PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse>>() {
834+
public PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse> call() throws Exception {
835+
return privateConsumeMicrosoftStoreEntitlementsAsync(request);
836+
}
837+
});
838+
try {
839+
task.run();
840+
return task.get();
841+
} catch(Exception e) {
842+
PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse> exceptionResult = new PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse>();
843+
exceptionResult.Error = PlayFabHTTP.GeneratePfError(-1, PlayFabErrorCode.Unknown, e.getMessage(), null);
844+
return exceptionResult;
845+
}
846+
}
847+
848+
/** Grants the player's current entitlements from Microsoft Store's Collection API */
849+
@SuppressWarnings("unchecked")
850+
private static PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse> privateConsumeMicrosoftStoreEntitlementsAsync(final ConsumeMicrosoftStoreEntitlementsRequest request) throws Exception {
851+
if (PlayFabSettings.ClientSessionTicket == null) throw new Exception ("Must be logged in to call this method");
852+
853+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Client/ConsumeMicrosoftStoreEntitlements"), request, "X-Authorization", PlayFabSettings.ClientSessionTicket);
854+
task.run();
855+
Object httpResult = task.get();
856+
if (httpResult instanceof PlayFabError) {
857+
PlayFabError error = (PlayFabError)httpResult;
858+
if (PlayFabSettings.GlobalErrorHandler != null)
859+
PlayFabSettings.GlobalErrorHandler.callback(error);
860+
PlayFabResult result = new PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse>();
861+
result.Error = error;
862+
return result;
863+
}
864+
String resultRawJson = (String) httpResult;
865+
866+
PlayFabJsonSuccess<ConsumeMicrosoftStoreEntitlementsResponse> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<ConsumeMicrosoftStoreEntitlementsResponse>>(){}.getType());
867+
ConsumeMicrosoftStoreEntitlementsResponse result = resultData.data;
868+
869+
PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse> pfResult = new PlayFabResult<ConsumeMicrosoftStoreEntitlementsResponse>();
870+
pfResult.Result = result;
871+
return pfResult;
872+
}
873+
812874
/**
813875
* Checks for any new consumable entitlements. If any are found, they are consumed and added as PlayFab items
814876
* @param request ConsumePSNEntitlementsRequest

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

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,22 @@ public static class ConsumeItemResult {
481481

482482
}
483483

484+
public static class ConsumeMicrosoftStoreEntitlementsRequest {
485+
/** Catalog version to use */
486+
public String CatalogVersion;
487+
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
488+
public Map<String,String> CustomTags;
489+
/** Marketplace specific payload containing details to fetch in app purchase transactions */
490+
public MicrosoftStorePayload MarketplaceSpecificData;
491+
492+
}
493+
494+
public static class ConsumeMicrosoftStoreEntitlementsResponse {
495+
/** Details for the items purchased. */
496+
public ArrayList<ItemInstance> Items;
497+
498+
}
499+
484500
public static class ConsumePSNEntitlementsRequest {
485501
/** Which catalog to match granted entitlements against. If null, defaults to title default catalog */
486502
public String CatalogVersion;
@@ -1589,11 +1605,7 @@ public static class GetLeaderboardRequest {
15891605

15901606
}
15911607

1592-
/**
1593-
* Note that the Position of the user in the results is for the overall leaderboard. If Facebook friends are included, make
1594-
* sure the access token from previous LoginWithFacebook call is still valid and not expired. If Xbox Live friends are
1595-
* included, make sure the access token from the previous LoginWithXbox call is still valid and not expired.
1596-
*/
1608+
/** Note: the user's Position is relative to the overall leaderboard. */
15971609
public static class GetLeaderboardResult {
15981610
/** Ordered listing of users and their positions in the requested leaderboard. */
15991611
public ArrayList<PlayerLeaderboardEntry> Leaderboard;
@@ -3367,6 +3379,19 @@ public static class MembershipModel {
33673379

33683380
}
33693381

3382+
public static class MicrosoftStorePayload {
3383+
/** Microsoft store ID key. This is optional. Alternatively you can use XboxToken */
3384+
public String CollectionsMsIdKey;
3385+
/** If collectionsMsIdKey is provided, this will verify the user id in the collectionsMsIdKey is the same. */
3386+
public String UserId;
3387+
/**
3388+
* Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). This is
3389+
* optional. Alternatively can use CollectionsMsIdKey
3390+
*/
3391+
public String XboxToken;
3392+
3393+
}
3394+
33703395
public static class ModifyUserVirtualCurrencyResult {
33713396
/** Balance of the virtual currency after modification. */
33723397
public Integer Balance;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,6 @@ public static enum PlayFabErrorCode {
546546
CatalogSearchParameterInvalid(4008),
547547
CatalogFeatureDisabled(4009),
548548
CatalogConfigInvalid(4010),
549-
CatalogUnauthorized(4011),
550549
CatalogItemTypeInvalid(4012),
551550
CatalogBadRequest(4013),
552551
CatalogTooManyRequests(4014),
@@ -608,6 +607,10 @@ public static enum PlayFabErrorCode {
608607
SegmentManagementInvalidSegmentId(10004),
609608
SegmentManagementInvalidInput(10005),
610609
SegmentManagementInvalidSegmentName(10006),
610+
DeleteSegmentRateLimitExceeded(10007),
611+
CreateSegmentRateLimitExceeded(10008),
612+
UpdateSegmentRateLimitExceeded(10009),
613+
GetSegmentsRateLimitExceeded(10010),
611614
SnapshotNotFound(11000);
612615

613616
public int id;

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ public static enum AzureVmFamily {
5959
Dv3,
6060
F,
6161
Fsv2,
62-
Dasv4
62+
Dasv4,
63+
Dav4,
64+
Eav4,
65+
Easv4,
66+
Ev4,
67+
Esv4
6368
}
6469

6570
public static enum AzureVmSize {
@@ -92,7 +97,11 @@ public static enum AzureVmSize {
9297
Standard_D2as_v4,
9398
Standard_D4as_v4,
9499
Standard_D8as_v4,
95-
Standard_D16as_v4
100+
Standard_D16as_v4,
101+
Standard_D2a_v4,
102+
Standard_D4a_v4,
103+
Standard_D8a_v4,
104+
Standard_D16a_v4
96105
}
97106

98107
public static class BuildAliasDetailsResponse {

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.121.201014";
13-
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-2_2";
14-
public static String SdkVersionString = "JavaSDK-0.121.201014";
12+
public static String SdkVersion = "0.122.201027";
13+
public static String BuildIdentifier = "jbuild_javasdk__sdk-genericslave-2_0";
14+
public static String SdkVersionString = "JavaSDK-0.122.201027";
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.121.201014.jar -Destination ../../builds/client-sdk-0.121.201014.jar
8+
Copy-Item client-sdk-0.122.201027.jar -Destination ../../builds/client-sdk-0.122.201027.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.121.201014.jar ../../builds/client-sdk-0.121.201014.jar
10+
cp client-sdk-0.122.201027.jar ../../builds/client-sdk-0.122.201027.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.121.201014</version>
17+
<version>0.122.201027</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>https://docs.microsoft.com/gaming/playfab/</url>

0 commit comments

Comments
 (0)