Skip to content

Commit 44e2022

Browse files
https://api.playfab.com/releaseNotes/#180829
1 parent f763ab5 commit 44e2022

File tree

85 files changed

+3841
-2601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3841
-2601
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
import com.google.gson.reflect.*;
1111

1212
/**
13-
* The Authentication API group is currently in-progress. The current GetEntityToken method is a stop-gap to convert
14-
* another authentication into an Entity Authentication. See https://api.playfab.com/documentation/client#Authentication
15-
* for the other authentication methods.
13+
* The Authentication APIs provide a convenient way to convert classic authentication responses into entity authentication
14+
* models. These APIs will provide you with the entity authentication token needed for subsequent Entity API calls.
1615
*/
1716
public class PlayFabAuthenticationAPI {
1817
private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
@@ -64,7 +63,7 @@ private static PlayFabResult<GetEntityTokenResponse> privateGetEntityTokenAsync(
6463
else if (PlayFabSettings.ClientSessionTicket != null) { authKey = "X-Authorization"; authValue = PlayFabSettings.ClientSessionTicket; }
6564
else if (PlayFabSettings.DeveloperSecretKey != null) { authKey = "X-SecretKey"; authValue = PlayFabSettings.DeveloperSecretKey; }
6665

67-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Authentication/GetEntityToken", request, authKey, authValue);
66+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Authentication/GetEntityToken"), request, authKey, authValue);
6867
task.run();
6968
Object httpResult = task.get();
7069
if (httpResult instanceof PlayFabError) {

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

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,15 @@
55

66
public class PlayFabAuthenticationModels {
77

8-
/** Entity identifier class that contains both the ID and type. */
8+
/** Combined entity type and ID structure which uniquely identifies a single entity. */
99
public static class EntityKey {
10-
/** Entity profile ID. */
10+
/** Unique ID of the entity. */
1111
public String Id;
12-
/** Entity type. Optional to be used but one of EntityType or EntityTypeString must be set. */
13-
public EntityTypes Type;
14-
/** Entity type. Optional to be used but one of EntityType or EntityTypeString must be set. */
15-
public String TypeString;
12+
/** Entity type. See https://api.playfab.com/docs/tutorials/entities/entitytypes */
13+
public String Type;
1614

1715
}
1816

19-
public static enum EntityTypes {
20-
title,
21-
master_player_account,
22-
title_player_account,
23-
character,
24-
group,
25-
service
26-
}
27-
2817
public static class GetEntityTokenRequest {
2918
/** The entity to perform this action on. */
3019
public EntityKey Entity;

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

Lines changed: 422 additions & 168 deletions
Large diffs are not rendered by default.

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

Lines changed: 189 additions & 35 deletions
Large diffs are not rendered by default.

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ public class PlayFabCloudScriptAPI {
1414
private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
1515

1616
/**
17-
* Executes CloudScript using the Entity Profile
17+
* Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
18+
* custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
1819
* @param request ExecuteEntityCloudScriptRequest
1920
* @return Async Task will return ExecuteCloudScriptResult
2021
*/
@@ -28,7 +29,8 @@ public PlayFabResult<ExecuteCloudScriptResult> call() throws Exception {
2829
}
2930

3031
/**
31-
* Executes CloudScript using the Entity Profile
32+
* Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
33+
* custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
3234
* @param request ExecuteEntityCloudScriptRequest
3335
* @return ExecuteCloudScriptResult
3436
*/
@@ -47,12 +49,15 @@ public PlayFabResult<ExecuteCloudScriptResult> call() throws Exception {
4749
}
4850
}
4951

50-
/** Executes CloudScript using the Entity Profile */
52+
/**
53+
* Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
54+
* custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
55+
*/
5156
@SuppressWarnings("unchecked")
5257
private static PlayFabResult<ExecuteCloudScriptResult> privateExecuteEntityCloudScriptAsync(final ExecuteEntityCloudScriptRequest request) throws Exception {
5358
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
5459

55-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/CloudScript/ExecuteEntityCloudScript", request, "X-EntityToken", PlayFabSettings.EntityToken);
60+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/CloudScript/ExecuteEntityCloudScript"), request, "X-EntityToken", PlayFabSettings.EntityToken);
5661
task.run();
5762
Object httpResult = task.get();
5863
if (httpResult instanceof PlayFabError) {

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

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,15 @@ public static enum CloudScriptRevisionOption {
1111
Specific
1212
}
1313

14-
/** Entity identifier class that contains both the ID and type. */
14+
/** Combined entity type and ID structure which uniquely identifies a single entity. */
1515
public static class EntityKey {
16-
/** Entity profile ID. */
16+
/** Unique ID of the entity. */
1717
public String Id;
18-
/** Entity type. Optional to be used but one of EntityType or EntityTypeString must be set. */
19-
public EntityTypes Type;
20-
/** Entity type. Optional to be used but one of EntityType or EntityTypeString must be set. */
21-
public String TypeString;
18+
/** Entity type. See https://api.playfab.com/docs/tutorials/entities/entitytypes */
19+
public String Type;
2220

2321
}
2422

25-
public static enum EntityTypes {
26-
title,
27-
master_player_account,
28-
title_player_account,
29-
character,
30-
group,
31-
service
32-
}
33-
3423
public static class ExecuteCloudScriptResult {
3524
/** Number of PlayFab API requests issued by the CloudScript function */
3625
public Integer APIRequestsIssued;

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
import com.google.gson.reflect.*;
1111

1212
/**
13-
* Various kinds of data-storage for an entity. Objects: Small (1kb) json-compatible objects that live directly within the
14-
* profile. Files (usage billed separately) for larger storage needs.
13+
* Store arbitrary data associated with an entity. Objects are small (~1KB) JSON-compatible objects which are stored
14+
* directly on the entity profile. Objects are made available for use in other PlayFab contexts, such as PlayStream events
15+
* and CloudScript functions. Files can efficiently store data of any size or format. Both objects and files support a
16+
* flexible permissions system to control read and write access by other entities.
1517
*/
1618
public class PlayFabDataAPI {
1719
private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
@@ -55,7 +57,7 @@ public PlayFabResult<AbortFileUploadsResponse> call() throws Exception {
5557
private static PlayFabResult<AbortFileUploadsResponse> privateAbortFileUploadsAsync(final AbortFileUploadsRequest request) throws Exception {
5658
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
5759

58-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/File/AbortFileUploads", request, "X-EntityToken", PlayFabSettings.EntityToken);
60+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/File/AbortFileUploads"), request, "X-EntityToken", PlayFabSettings.EntityToken);
5961
task.run();
6062
Object httpResult = task.get();
6163
if (httpResult instanceof PlayFabError) {
@@ -115,7 +117,7 @@ public PlayFabResult<DeleteFilesResponse> call() throws Exception {
115117
private static PlayFabResult<DeleteFilesResponse> privateDeleteFilesAsync(final DeleteFilesRequest request) throws Exception {
116118
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
117119

118-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/File/DeleteFiles", request, "X-EntityToken", PlayFabSettings.EntityToken);
120+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/File/DeleteFiles"), request, "X-EntityToken", PlayFabSettings.EntityToken);
119121
task.run();
120122
Object httpResult = task.get();
121123
if (httpResult instanceof PlayFabError) {
@@ -175,7 +177,7 @@ public PlayFabResult<FinalizeFileUploadsResponse> call() throws Exception {
175177
private static PlayFabResult<FinalizeFileUploadsResponse> privateFinalizeFileUploadsAsync(final FinalizeFileUploadsRequest request) throws Exception {
176178
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
177179

178-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/File/FinalizeFileUploads", request, "X-EntityToken", PlayFabSettings.EntityToken);
180+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/File/FinalizeFileUploads"), request, "X-EntityToken", PlayFabSettings.EntityToken);
179181
task.run();
180182
Object httpResult = task.get();
181183
if (httpResult instanceof PlayFabError) {
@@ -235,7 +237,7 @@ public PlayFabResult<GetFilesResponse> call() throws Exception {
235237
private static PlayFabResult<GetFilesResponse> privateGetFilesAsync(final GetFilesRequest request) throws Exception {
236238
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
237239

238-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/File/GetFiles", request, "X-EntityToken", PlayFabSettings.EntityToken);
240+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/File/GetFiles"), request, "X-EntityToken", PlayFabSettings.EntityToken);
239241
task.run();
240242
Object httpResult = task.get();
241243
if (httpResult instanceof PlayFabError) {
@@ -295,7 +297,7 @@ public PlayFabResult<GetObjectsResponse> call() throws Exception {
295297
private static PlayFabResult<GetObjectsResponse> privateGetObjectsAsync(final GetObjectsRequest request) throws Exception {
296298
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
297299

298-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Object/GetObjects", request, "X-EntityToken", PlayFabSettings.EntityToken);
300+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Object/GetObjects"), request, "X-EntityToken", PlayFabSettings.EntityToken);
299301
task.run();
300302
Object httpResult = task.get();
301303
if (httpResult instanceof PlayFabError) {
@@ -355,7 +357,7 @@ public PlayFabResult<InitiateFileUploadsResponse> call() throws Exception {
355357
private static PlayFabResult<InitiateFileUploadsResponse> privateInitiateFileUploadsAsync(final InitiateFileUploadsRequest request) throws Exception {
356358
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
357359

358-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/File/InitiateFileUploads", request, "X-EntityToken", PlayFabSettings.EntityToken);
360+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/File/InitiateFileUploads"), request, "X-EntityToken", PlayFabSettings.EntityToken);
359361
task.run();
360362
Object httpResult = task.get();
361363
if (httpResult instanceof PlayFabError) {
@@ -415,7 +417,7 @@ public PlayFabResult<SetObjectsResponse> call() throws Exception {
415417
private static PlayFabResult<SetObjectsResponse> privateSetObjectsAsync(final SetObjectsRequest request) throws Exception {
416418
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
417419

418-
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Object/SetObjects", request, "X-EntityToken", PlayFabSettings.EntityToken);
420+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Object/SetObjects"), request, "X-EntityToken", PlayFabSettings.EntityToken);
419421
task.run();
420422
Object httpResult = task.get();
421423
if (httpResult instanceof PlayFabError) {

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

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,15 @@ public static class DeleteFilesResponse {
4747

4848
}
4949

50-
/** Entity identifier class that contains both the ID and type. */
50+
/** Combined entity type and ID structure which uniquely identifies a single entity. */
5151
public static class EntityKey {
52-
/** Entity profile ID. */
52+
/** Unique ID of the entity. */
5353
public String Id;
54-
/** Entity type. Optional to be used but one of EntityType or EntityTypeString must be set. */
55-
public EntityTypes Type;
56-
/** Entity type. Optional to be used but one of EntityType or EntityTypeString must be set. */
57-
public String TypeString;
54+
/** Entity type. See https://api.playfab.com/docs/tutorials/entities/entitytypes */
55+
public String Type;
5856

5957
}
6058

61-
public static enum EntityTypes {
62-
title,
63-
master_player_account,
64-
title_player_account,
65-
character,
66-
group,
67-
service
68-
}
69-
7059
public static class FinalizeFileUploadsRequest {
7160
/** The entity to perform this action on. */
7261
public EntityKey Entity;

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -380,16 +380,16 @@ public static enum PlayFabErrorCode {
380380
NoValidCertificateForAad(1376),
381381
InvalidCertificateForAad(1377),
382382
DuplicateDropTableId(1378),
383-
GameServerOk(1379),
384-
GameServerAccepted(1380),
385-
GameServerNoContent(1381),
386-
GameServerBadRequest(1382),
387-
GameServerUnauthorized(1383),
388-
GameServerForbidden(1384),
389-
GameServerNotFound(1385),
390-
GameServerConflict(1386),
391-
GameServerInternalServerError(1387),
392-
GameServerServiceUnavailable(1388),
383+
MultiplayerServerError(1379),
384+
MultiplayerServerTooManyRequests(1380),
385+
MultiplayerServerNoContent(1381),
386+
MultiplayerServerBadRequest(1382),
387+
MultiplayerServerUnauthorized(1383),
388+
MultiplayerServerForbidden(1384),
389+
MultiplayerServerNotFound(1385),
390+
MultiplayerServerConflict(1386),
391+
MultiplayerServerInternalServerError(1387),
392+
MultiplayerServerUnavailable(1388),
393393
ExplicitContentDetected(1389),
394394
PIIContentDetected(1390),
395395
InvalidScheduledTaskParameter(1391),

0 commit comments

Comments
 (0)