Skip to content

Commit

Permalink
https://api.playfab.com/releaseNotes/#180507
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFabJenkinsBot committed May 7, 2018
1 parent 51fc9d0 commit fc42e5d
Show file tree
Hide file tree
Showing 34 changed files with 342 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2843,6 +2843,11 @@ public static class RegisterPlayFabUserRequest {
}

public static class RegisterPlayFabUserResult {
/**
* If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and
* returned.
*/
public EntityTokenResponse EntityToken;
/** PlayFab unique identifier for this newly created account. */
public String PlayFabId;
/** Unique token identifying the user and game at the server level, for the current session. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,23 @@ public static class GetEntityProfileResponse {

}

public static class GetEntityProfilesRequest {
/**
* Determines whether the objects will be returned as an escaped JSON string or as a un-escaped JSON object. Default is
* JSON string.
*/
public Boolean DataAsObject;
/** Entity keys of the profiles to load. Must be between 1 and 25 */
public ArrayList<EntityKey> Entities;

}

public static class GetEntityProfilesResponse {
/** Entity profiles */
public ArrayList<EntityProfileBody> Profiles;

}

public static class GetEntityTokenRequest {
/** The entity to perform this action on. */
public EntityKey Entity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static enum PlayFabErrorCode {
Unknown(1),
ConnectionError(2),
JsonParseError(3),
UnkownError(500),
InvalidParams(1000),
AccountNotFound(1001),
AccountBanned(1002),
Expand Down Expand Up @@ -372,7 +373,13 @@ public static enum PlayFabErrorCode {
EmailReportAlreadySent(1369),
EmailReportRecipientBlacklisted(1370),
EventNamespaceNotAllowed(1371),
EventEntityNotAllowed(1372);
EventEntityNotAllowed(1372),
InvalidEntityType(1373),
NullTokenResultFromAad(1374),
InvalidTokenResultFromAad(1375),
NoValidCertificateForAad(1376),
InvalidCertificateForAad(1377),
DuplicateDropTableId(1378);

public int id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import com.playfab.PlayFabErrors.ErrorCallback;

public class PlayFabSettings {
public static String SdkVersion = "0.65.180409";
public static String BuildIdentifier = "jbuild_javasdk_0";
public static String SdkVersionString = "JavaSDK-0.65.180409";
public static String SdkVersion = "0.66.180507";
public static String BuildIdentifier = "jbuild_javasdk_1";
public static String SdkVersionString = "JavaSDK-0.66.180507";

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)
public static ErrorCallback GlobalErrorHandler;
Expand Down
2 changes: 1 addition & 1 deletion PlayFabClientSDK/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- GAV & Meta -->
<groupId>com.playfab</groupId>
<artifactId>client-sdk</artifactId>
<version>0.65.180409</version>
<version>0.66.180507</version>
<name>PlayFab Client API</name>
<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>
<url>http://api.playfab.com/</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2843,6 +2843,11 @@ public static class RegisterPlayFabUserRequest {
}

public static class RegisterPlayFabUserResult {
/**
* If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and
* returned.
*/
public EntityTokenResponse EntityToken;
/** PlayFab unique identifier for this newly created account. */
public String PlayFabId;
/** Unique token identifying the user and game at the server level, for the current session. */
Expand Down
60 changes: 60 additions & 0 deletions PlayFabClientSDK/src/main/java/com/playfab/PlayFabEntityAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,66 @@ private static PlayFabResult<GetEntityProfileResponse> privateGetProfileAsync(fi
return pfResult;
}

/**
* Retrieves the entity's profile.
* @param request GetEntityProfilesRequest
* @return Async Task will return GetEntityProfilesResponse
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<GetEntityProfilesResponse>> GetProfilesAsync(final GetEntityProfilesRequest request) {
return new FutureTask(new Callable<PlayFabResult<GetEntityProfilesResponse>>() {
public PlayFabResult<GetEntityProfilesResponse> call() throws Exception {
return privateGetProfilesAsync(request);
}
});
}

/**
* Retrieves the entity's profile.
* @param request GetEntityProfilesRequest
* @return GetEntityProfilesResponse
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<GetEntityProfilesResponse> GetProfiles(final GetEntityProfilesRequest request) {
FutureTask<PlayFabResult<GetEntityProfilesResponse>> task = new FutureTask(new Callable<PlayFabResult<GetEntityProfilesResponse>>() {
public PlayFabResult<GetEntityProfilesResponse> call() throws Exception {
return privateGetProfilesAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}

/** Retrieves the entity's profile. */
@SuppressWarnings("unchecked")
private static PlayFabResult<GetEntityProfilesResponse> privateGetProfilesAsync(final GetEntityProfilesRequest request) throws Exception {
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Profile/GetProfiles", request, "X-EntityToken", PlayFabSettings.EntityToken);
task.run();
Object httpResult = task.get();
if (httpResult instanceof PlayFabError) {
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler.callback(error);
PlayFabResult result = new PlayFabResult<GetEntityProfilesResponse>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

PlayFabJsonSuccess<GetEntityProfilesResponse> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetEntityProfilesResponse>>(){}.getType());
GetEntityProfilesResponse result = resultData.data;

PlayFabResult<GetEntityProfilesResponse> pfResult = new PlayFabResult<GetEntityProfilesResponse>();
pfResult.Result = result;
return pfResult;
}

/**
* Initiates file uploads to an entity's profile.
* @param request InitiateFileUploadsRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,23 @@ public static class GetEntityProfileResponse {

}

public static class GetEntityProfilesRequest {
/**
* Determines whether the objects will be returned as an escaped JSON string or as a un-escaped JSON object. Default is
* JSON string.
*/
public Boolean DataAsObject;
/** Entity keys of the profiles to load. Must be between 1 and 25 */
public ArrayList<EntityKey> Entities;

}

public static class GetEntityProfilesResponse {
/** Entity profiles */
public ArrayList<EntityProfileBody> Profiles;

}

public static class GetEntityTokenRequest {
/** The entity to perform this action on. */
public EntityKey Entity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static enum PlayFabErrorCode {
Unknown(1),
ConnectionError(2),
JsonParseError(3),
UnkownError(500),
InvalidParams(1000),
AccountNotFound(1001),
AccountBanned(1002),
Expand Down Expand Up @@ -372,7 +373,13 @@ public static enum PlayFabErrorCode {
EmailReportAlreadySent(1369),
EmailReportRecipientBlacklisted(1370),
EventNamespaceNotAllowed(1371),
EventEntityNotAllowed(1372);
EventEntityNotAllowed(1372),
InvalidEntityType(1373),
NullTokenResultFromAad(1374),
InvalidTokenResultFromAad(1375),
NoValidCertificateForAad(1376),
InvalidCertificateForAad(1377),
DuplicateDropTableId(1378);

public int id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import com.playfab.PlayFabErrors.ErrorCallback;

public class PlayFabSettings {
public static String SdkVersion = "0.65.180409";
public static String BuildIdentifier = "jbuild_javasdk_0";
public static String SdkVersionString = "JavaSDK-0.65.180409";
public static String SdkVersion = "0.66.180507";
public static String BuildIdentifier = "jbuild_javasdk_1";
public static String SdkVersionString = "JavaSDK-0.66.180507";

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)
public static ErrorCallback GlobalErrorHandler;
Expand Down
2 changes: 1 addition & 1 deletion PlayFabSDK/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- GAV & Meta -->
<groupId>com.playfab</groupId>
<artifactId>combo-sdk</artifactId>
<version>0.65.180409</version>
<version>0.66.180507</version>
<name>PlayFab Combo API</name>
<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>
<url>http://api.playfab.com/</url>
Expand Down
9 changes: 8 additions & 1 deletion PlayFabSDK/src/main/java/com/playfab/PlayFabAdminModels.java
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ public static class GameModeInfo {

public static enum GenericErrorCodes {
Success,
UnkownError,
InvalidParams,
AccountNotFound,
AccountBanned,
Expand Down Expand Up @@ -1465,7 +1466,13 @@ public static enum GenericErrorCodes {
EmailReportAlreadySent,
EmailReportRecipientBlacklisted,
EventNamespaceNotAllowed,
EventEntityNotAllowed
EventEntityNotAllowed,
InvalidEntityType,
NullTokenResultFromAad,
InvalidTokenResultFromAad,
NoValidCertificateForAad,
InvalidCertificateForAad,
DuplicateDropTableId
}

public static class GetActionsOnPlayersInSegmentTaskInstanceResult {
Expand Down
5 changes: 5 additions & 0 deletions PlayFabSDK/src/main/java/com/playfab/PlayFabClientModels.java
Original file line number Diff line number Diff line change
Expand Up @@ -2843,6 +2843,11 @@ public static class RegisterPlayFabUserRequest {
}

public static class RegisterPlayFabUserResult {
/**
* If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and
* returned.
*/
public EntityTokenResponse EntityToken;
/** PlayFab unique identifier for this newly created account. */
public String PlayFabId;
/** Unique token identifying the user and game at the server level, for the current session. */
Expand Down
60 changes: 60 additions & 0 deletions PlayFabSDK/src/main/java/com/playfab/PlayFabEntityAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,66 @@ private static PlayFabResult<GetEntityProfileResponse> privateGetProfileAsync(fi
return pfResult;
}

/**
* Retrieves the entity's profile.
* @param request GetEntityProfilesRequest
* @return Async Task will return GetEntityProfilesResponse
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<GetEntityProfilesResponse>> GetProfilesAsync(final GetEntityProfilesRequest request) {
return new FutureTask(new Callable<PlayFabResult<GetEntityProfilesResponse>>() {
public PlayFabResult<GetEntityProfilesResponse> call() throws Exception {
return privateGetProfilesAsync(request);
}
});
}

/**
* Retrieves the entity's profile.
* @param request GetEntityProfilesRequest
* @return GetEntityProfilesResponse
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<GetEntityProfilesResponse> GetProfiles(final GetEntityProfilesRequest request) {
FutureTask<PlayFabResult<GetEntityProfilesResponse>> task = new FutureTask(new Callable<PlayFabResult<GetEntityProfilesResponse>>() {
public PlayFabResult<GetEntityProfilesResponse> call() throws Exception {
return privateGetProfilesAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}

/** Retrieves the entity's profile. */
@SuppressWarnings("unchecked")
private static PlayFabResult<GetEntityProfilesResponse> privateGetProfilesAsync(final GetEntityProfilesRequest request) throws Exception {
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Profile/GetProfiles", request, "X-EntityToken", PlayFabSettings.EntityToken);
task.run();
Object httpResult = task.get();
if (httpResult instanceof PlayFabError) {
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler.callback(error);
PlayFabResult result = new PlayFabResult<GetEntityProfilesResponse>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

PlayFabJsonSuccess<GetEntityProfilesResponse> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetEntityProfilesResponse>>(){}.getType());
GetEntityProfilesResponse result = resultData.data;

PlayFabResult<GetEntityProfilesResponse> pfResult = new PlayFabResult<GetEntityProfilesResponse>();
pfResult.Result = result;
return pfResult;
}

/**
* Initiates file uploads to an entity's profile.
* @param request InitiateFileUploadsRequest
Expand Down
17 changes: 17 additions & 0 deletions PlayFabSDK/src/main/java/com/playfab/PlayFabEntityModels.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,23 @@ public static class GetEntityProfileResponse {

}

public static class GetEntityProfilesRequest {
/**
* Determines whether the objects will be returned as an escaped JSON string or as a un-escaped JSON object. Default is
* JSON string.
*/
public Boolean DataAsObject;
/** Entity keys of the profiles to load. Must be between 1 and 25 */
public ArrayList<EntityKey> Entities;

}

public static class GetEntityProfilesResponse {
/** Entity profiles */
public ArrayList<EntityProfileBody> Profiles;

}

public static class GetEntityTokenRequest {
/** The entity to perform this action on. */
public EntityKey Entity;
Expand Down
9 changes: 8 additions & 1 deletion PlayFabSDK/src/main/java/com/playfab/PlayFabErrors.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static enum PlayFabErrorCode {
Unknown(1),
ConnectionError(2),
JsonParseError(3),
UnkownError(500),
InvalidParams(1000),
AccountNotFound(1001),
AccountBanned(1002),
Expand Down Expand Up @@ -372,7 +373,13 @@ public static enum PlayFabErrorCode {
EmailReportAlreadySent(1369),
EmailReportRecipientBlacklisted(1370),
EventNamespaceNotAllowed(1371),
EventEntityNotAllowed(1372);
EventEntityNotAllowed(1372),
InvalidEntityType(1373),
NullTokenResultFromAad(1374),
InvalidTokenResultFromAad(1375),
NoValidCertificateForAad(1376),
InvalidCertificateForAad(1377),
DuplicateDropTableId(1378);

public int id;

Expand Down
Loading

0 comments on commit fc42e5d

Please sign in to comment.