Skip to content

Commit eafb390

Browse files
https://api.playfab.com/releaseNotes/#170530
1 parent 393d486 commit eafb390

34 files changed

+523
-59
lines changed

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,68 @@ private static PlayFabResult<GetPlayerCombinedInfoResult> privateGetPlayerCombin
12981298
return pfResult;
12991299
}
13001300

1301+
/**
1302+
* Retrieves the player's profile
1303+
* @param request GetPlayerProfileRequest
1304+
* @return Async Task will return GetPlayerProfileResult
1305+
*/
1306+
@SuppressWarnings("unchecked")
1307+
public static FutureTask<PlayFabResult<GetPlayerProfileResult>> GetPlayerProfileAsync(final GetPlayerProfileRequest request) {
1308+
return new FutureTask(new Callable<PlayFabResult<GetPlayerProfileResult>>() {
1309+
public PlayFabResult<GetPlayerProfileResult> call() throws Exception {
1310+
return privateGetPlayerProfileAsync(request);
1311+
}
1312+
});
1313+
}
1314+
1315+
/**
1316+
* Retrieves the player's profile
1317+
* @param request GetPlayerProfileRequest
1318+
* @return GetPlayerProfileResult
1319+
*/
1320+
@SuppressWarnings("unchecked")
1321+
public static PlayFabResult<GetPlayerProfileResult> GetPlayerProfile(final GetPlayerProfileRequest request) {
1322+
FutureTask<PlayFabResult<GetPlayerProfileResult>> task = new FutureTask(new Callable<PlayFabResult<GetPlayerProfileResult>>() {
1323+
public PlayFabResult<GetPlayerProfileResult> call() throws Exception {
1324+
return privateGetPlayerProfileAsync(request);
1325+
}
1326+
});
1327+
try {
1328+
task.run();
1329+
return task.get();
1330+
} catch(Exception e) {
1331+
return null;
1332+
}
1333+
}
1334+
1335+
/**
1336+
* Retrieves the player's profile
1337+
*/
1338+
@SuppressWarnings("unchecked")
1339+
private static PlayFabResult<GetPlayerProfileResult> privateGetPlayerProfileAsync(final GetPlayerProfileRequest request) throws Exception {
1340+
if (_authKey == null) throw new Exception ("Must be logged in to call this method");
1341+
1342+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerProfile", request, "X-Authorization", _authKey);
1343+
task.run();
1344+
Object httpResult = task.get();
1345+
if(httpResult instanceof PlayFabError) {
1346+
PlayFabError error = (PlayFabError)httpResult;
1347+
if (PlayFabSettings.GlobalErrorHandler != null)
1348+
PlayFabSettings.GlobalErrorHandler.callback(error);
1349+
PlayFabResult result = new PlayFabResult<GetPlayerProfileResult>();
1350+
result.Error = error;
1351+
return result;
1352+
}
1353+
String resultRawJson = (String) httpResult;
1354+
1355+
PlayFabJsonSuccess<GetPlayerProfileResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetPlayerProfileResult>>(){}.getType());
1356+
GetPlayerProfileResult result = resultData.data;
1357+
1358+
PlayFabResult<GetPlayerProfileResult> pfResult = new PlayFabResult<GetPlayerProfileResult>();
1359+
pfResult.Result = result;
1360+
return pfResult;
1361+
}
1362+
13011363
/**
13021364
* Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers.
13031365
* @param request GetPlayFabIDsFromFacebookIDsRequest

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

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,15 +1038,15 @@ public static class ExecuteCloudScriptResult {
10381038
*/
10391039
public Object FunctionResult;
10401040
/**
1041-
* Flag indicating if the FunctionResult was too large and was subsequently dropped from this event
1041+
* Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if the total event size is larger than 350KB.
10421042
*/
10431043
public Boolean FunctionResultTooLarge;
10441044
/**
10451045
* Entries logged during the function execution. These include both entries logged in the function code using log.info() and log.error() and error entries for API and HTTP request failures.
10461046
*/
10471047
public ArrayList<LogStatement> Logs;
10481048
/**
1049-
* Flag indicating if the logs were too large and were subsequently dropped from this event
1049+
* Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total event size is larger than 350KB after the FunctionResult was removed.
10501050
*/
10511051
public Boolean LogsTooLarge;
10521052
public Double ExecutionTimeSeconds;
@@ -1746,6 +1746,14 @@ public static class GetPlayerCombinedInfoRequestParams {
17461746
* Specific statistics to retrieve. Leave null to get all keys. Has no effect if GetPlayerStatistics is false
17471747
*/
17481748
public ArrayList<String> PlayerStatisticNames;
1749+
/**
1750+
* Whether to get player profile. Defaults to false.
1751+
*/
1752+
public Boolean GetPlayerProfile;
1753+
/**
1754+
* Specifies the properties to return from the player profile. Defaults to returning the player's display name.
1755+
*/
1756+
public PlayerProfileViewConstraints ProfileConstraints;
17491757

17501758
}
17511759

@@ -1811,6 +1819,30 @@ public static class GetPlayerCombinedInfoResultPayload {
18111819
* List of statistics for this player.
18121820
*/
18131821
public ArrayList<StatisticValue> PlayerStatistics;
1822+
/**
1823+
* The profile of the players. This profile is not guaranteed to be up-to-date. For a new player, this profile will not exist.
1824+
*/
1825+
public PlayerProfileModel PlayerProfile;
1826+
1827+
}
1828+
1829+
public static class GetPlayerProfileRequest {
1830+
/**
1831+
* Unique PlayFab assigned ID of the user on whom the operation will be performed.
1832+
*/
1833+
public String PlayFabId;
1834+
/**
1835+
* If non-null, this determines which properties of the profile to return. If null, playfab will only include display names. On client, only ShowDisplayName, ShowStatistics, ShowAvatarUrl are allowed.
1836+
*/
1837+
public PlayerProfileViewConstraints ProfileConstraints;
1838+
1839+
}
1840+
1841+
public static class GetPlayerProfileResult {
1842+
/**
1843+
* The profile of the player. This profile is not guaranteed to be up-to-date. For a new player, this profile will not exist.
1844+
*/
1845+
public PlayerProfileModel PlayerProfile;
18141846

18151847
}
18161848

@@ -2063,11 +2095,6 @@ public static class GetPurchaseResult {
20632095
* Date and time of the purchase.
20642096
*/
20652097
public Date PurchaseDate;
2066-
/**
2067-
* @deprecated Please use instead.
2068-
*/
2069-
@Deprecated
2070-
public ArrayList<ItemInstance> Items;
20712098

20722099
}
20732100

@@ -3745,8 +3772,9 @@ public static class ReportPlayerClientRequest {
37453772

37463773
public static class ReportPlayerClientResult {
37473774
/**
3748-
* Indicates whether this action completed successfully.
3775+
* @deprecated Do not use
37493776
*/
3777+
@Deprecated
37503778
public Boolean Updated;
37513779
/**
37523780
* The number of remaining reports which may be filed today.

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ public static enum PlayFabErrorCode {
303303
InvalidEnvironmentForReceipt(1300),
304304
EncryptedRequestNotAllowed(1301),
305305
SignedRequestNotAllowed(1302),
306-
RequestViewConstraintParamsNotAllowed(1303);
306+
RequestViewConstraintParamsNotAllowed(1303),
307+
BadPartnerConfiguration(1304),
308+
XboxBPCertificateFailure(1305),
309+
XboxXASSExchangeFailure(1306);
307310

308311
public int id;
309312

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import com.playfab.PlayFabErrors.ErrorCallback;
55

66
public class PlayFabSettings {
7-
public static String SdkVersion = "0.49.170508";
7+
public static String SdkVersion = "0.50.170530";
88
public static String BuildIdentifier = "jbuild_javasdk_0";
9-
public static String SdkVersionString = "JavaSDK-0.49.170508";
9+
public static String SdkVersionString = "JavaSDK-0.50.170530";
1010

1111
public static String TitleId = null; // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
1212
public static ErrorCallback GlobalErrorHandler;

PlayFabClientSDK/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<inceptionYear>2016</inceptionYear>
55
<groupId>com.playfab</groupId>
66
<artifactId>client-sdk</artifactId>
7-
<version>0.49.170508</version>
7+
<version>0.50.170530</version>
88
<name>PlayFab Client API</name>
99
<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>
1010
<url>http://api.playfab.com/</url>

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,68 @@ private static PlayFabResult<GetPlayerCombinedInfoResult> privateGetPlayerCombin
12971297
return pfResult;
12981298
}
12991299

1300+
/**
1301+
* Retrieves the player's profile
1302+
* @param request GetPlayerProfileRequest
1303+
* @return Async Task will return GetPlayerProfileResult
1304+
*/
1305+
@SuppressWarnings("unchecked")
1306+
public static FutureTask<PlayFabResult<GetPlayerProfileResult>> GetPlayerProfileAsync(final GetPlayerProfileRequest request) {
1307+
return new FutureTask(new Callable<PlayFabResult<GetPlayerProfileResult>>() {
1308+
public PlayFabResult<GetPlayerProfileResult> call() throws Exception {
1309+
return privateGetPlayerProfileAsync(request);
1310+
}
1311+
});
1312+
}
1313+
1314+
/**
1315+
* Retrieves the player's profile
1316+
* @param request GetPlayerProfileRequest
1317+
* @return GetPlayerProfileResult
1318+
*/
1319+
@SuppressWarnings("unchecked")
1320+
public static PlayFabResult<GetPlayerProfileResult> GetPlayerProfile(final GetPlayerProfileRequest request) {
1321+
FutureTask<PlayFabResult<GetPlayerProfileResult>> task = new FutureTask(new Callable<PlayFabResult<GetPlayerProfileResult>>() {
1322+
public PlayFabResult<GetPlayerProfileResult> call() throws Exception {
1323+
return privateGetPlayerProfileAsync(request);
1324+
}
1325+
});
1326+
try {
1327+
task.run();
1328+
return task.get();
1329+
} catch(Exception e) {
1330+
return null;
1331+
}
1332+
}
1333+
1334+
/**
1335+
* Retrieves the player's profile
1336+
*/
1337+
@SuppressWarnings("unchecked")
1338+
private static PlayFabResult<GetPlayerProfileResult> privateGetPlayerProfileAsync(final GetPlayerProfileRequest request) throws Exception {
1339+
if (_authKey == null) throw new Exception ("Must be logged in to call this method");
1340+
1341+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Client/GetPlayerProfile", request, "X-Authorization", _authKey);
1342+
task.run();
1343+
Object httpResult = task.get();
1344+
if(httpResult instanceof PlayFabError) {
1345+
PlayFabError error = (PlayFabError)httpResult;
1346+
if (PlayFabSettings.GlobalErrorHandler != null)
1347+
PlayFabSettings.GlobalErrorHandler.callback(error);
1348+
PlayFabResult result = new PlayFabResult<GetPlayerProfileResult>();
1349+
result.Error = error;
1350+
return result;
1351+
}
1352+
String resultRawJson = (String) httpResult;
1353+
1354+
PlayFabJsonSuccess<GetPlayerProfileResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetPlayerProfileResult>>(){}.getType());
1355+
GetPlayerProfileResult result = resultData.data;
1356+
1357+
PlayFabResult<GetPlayerProfileResult> pfResult = new PlayFabResult<GetPlayerProfileResult>();
1358+
pfResult.Result = result;
1359+
return pfResult;
1360+
}
1361+
13001362
/**
13011363
* Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers.
13021364
* @param request GetPlayFabIDsFromFacebookIDsRequest

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

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,15 +1038,15 @@ public static class ExecuteCloudScriptResult {
10381038
*/
10391039
public Object FunctionResult;
10401040
/**
1041-
* Flag indicating if the FunctionResult was too large and was subsequently dropped from this event
1041+
* Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if the total event size is larger than 350KB.
10421042
*/
10431043
public Boolean FunctionResultTooLarge;
10441044
/**
10451045
* Entries logged during the function execution. These include both entries logged in the function code using log.info() and log.error() and error entries for API and HTTP request failures.
10461046
*/
10471047
public ArrayList<LogStatement> Logs;
10481048
/**
1049-
* Flag indicating if the logs were too large and were subsequently dropped from this event
1049+
* Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total event size is larger than 350KB after the FunctionResult was removed.
10501050
*/
10511051
public Boolean LogsTooLarge;
10521052
public Double ExecutionTimeSeconds;
@@ -1746,6 +1746,14 @@ public static class GetPlayerCombinedInfoRequestParams {
17461746
* Specific statistics to retrieve. Leave null to get all keys. Has no effect if GetPlayerStatistics is false
17471747
*/
17481748
public ArrayList<String> PlayerStatisticNames;
1749+
/**
1750+
* Whether to get player profile. Defaults to false.
1751+
*/
1752+
public Boolean GetPlayerProfile;
1753+
/**
1754+
* Specifies the properties to return from the player profile. Defaults to returning the player's display name.
1755+
*/
1756+
public PlayerProfileViewConstraints ProfileConstraints;
17491757

17501758
}
17511759

@@ -1811,6 +1819,30 @@ public static class GetPlayerCombinedInfoResultPayload {
18111819
* List of statistics for this player.
18121820
*/
18131821
public ArrayList<StatisticValue> PlayerStatistics;
1822+
/**
1823+
* The profile of the players. This profile is not guaranteed to be up-to-date. For a new player, this profile will not exist.
1824+
*/
1825+
public PlayerProfileModel PlayerProfile;
1826+
1827+
}
1828+
1829+
public static class GetPlayerProfileRequest {
1830+
/**
1831+
* Unique PlayFab assigned ID of the user on whom the operation will be performed.
1832+
*/
1833+
public String PlayFabId;
1834+
/**
1835+
* If non-null, this determines which properties of the profile to return. If null, playfab will only include display names. On client, only ShowDisplayName, ShowStatistics, ShowAvatarUrl are allowed.
1836+
*/
1837+
public PlayerProfileViewConstraints ProfileConstraints;
1838+
1839+
}
1840+
1841+
public static class GetPlayerProfileResult {
1842+
/**
1843+
* The profile of the player. This profile is not guaranteed to be up-to-date. For a new player, this profile will not exist.
1844+
*/
1845+
public PlayerProfileModel PlayerProfile;
18141846

18151847
}
18161848

@@ -2063,11 +2095,6 @@ public static class GetPurchaseResult {
20632095
* Date and time of the purchase.
20642096
*/
20652097
public Date PurchaseDate;
2066-
/**
2067-
* @deprecated Please use instead.
2068-
*/
2069-
@Deprecated
2070-
public ArrayList<ItemInstance> Items;
20712098

20722099
}
20732100

@@ -3745,8 +3772,9 @@ public static class ReportPlayerClientRequest {
37453772

37463773
public static class ReportPlayerClientResult {
37473774
/**
3748-
* Indicates whether this action completed successfully.
3775+
* @deprecated Do not use
37493776
*/
3777+
@Deprecated
37503778
public Boolean Updated;
37513779
/**
37523780
* The number of remaining reports which may be filed today.

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ public static enum PlayFabErrorCode {
303303
InvalidEnvironmentForReceipt(1300),
304304
EncryptedRequestNotAllowed(1301),
305305
SignedRequestNotAllowed(1302),
306-
RequestViewConstraintParamsNotAllowed(1303);
306+
RequestViewConstraintParamsNotAllowed(1303),
307+
BadPartnerConfiguration(1304),
308+
XboxBPCertificateFailure(1305),
309+
XboxXASSExchangeFailure(1306);
307310

308311
public int id;
309312

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

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

55
public class PlayFabSettings {
6-
public static String SdkVersion = "0.49.170508";
6+
public static String SdkVersion = "0.50.170530";
77
public static String BuildIdentifier = "jbuild_javasdk_0";
8-
public static String SdkVersionString = "JavaSDK-0.49.170508";
8+
public static String SdkVersionString = "JavaSDK-0.50.170530";
99

1010
public static String TitleId = null; // You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website)
1111
public static ErrorCallback GlobalErrorHandler;

PlayFabSDK/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<inceptionYear>2016</inceptionYear>
55
<groupId>com.playfab</groupId>
66
<artifactId>combo-sdk</artifactId>
7-
<version>0.49.170508</version>
7+
<version>0.50.170530</version>
88
<name>PlayFab Combo API</name>
99
<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>
1010
<url>http://api.playfab.com/</url>

0 commit comments

Comments
 (0)