Skip to content

Commit 31cdba6

Browse files
https://api.playfab.com/releaseNotes/#180906
2 parents fe08b5d + 79c8936 commit 31cdba6

24 files changed

+233
-27
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ private static PlayFabResult<SetGlobalPolicyResponse> privateSetGlobalPolicyAsyn
257257
}
258258

259259
/**
260-
* Updates the entity's language
260+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
261+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
261262
* @param request SetProfileLanguageRequest
262263
* @return Async Task will return SetProfileLanguageResponse
263264
*/
@@ -271,7 +272,8 @@ public PlayFabResult<SetProfileLanguageResponse> call() throws Exception {
271272
}
272273

273274
/**
274-
* Updates the entity's language
275+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
276+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
275277
* @param request SetProfileLanguageRequest
276278
* @return SetProfileLanguageResponse
277279
*/
@@ -290,7 +292,10 @@ public PlayFabResult<SetProfileLanguageResponse> call() throws Exception {
290292
}
291293
}
292294

293-
/** Updates the entity's language */
295+
/**
296+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
297+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
298+
*/
294299
@SuppressWarnings("unchecked")
295300
private static PlayFabResult<SetProfileLanguageResponse> privateSetProfileLanguageAsync(final SetProfileLanguageRequest request) throws Exception {
296301
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

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.74.180829";
13-
public static String BuildIdentifier = "jbuild_javasdk_0";
14-
public static String SdkVersionString = "JavaSDK-0.74.180829";
12+
public static String SdkVersion = "0.75.180906";
13+
public static String BuildIdentifier = "jbuild_javasdk__sdk-slave2016-3_0";
14+
public static String SdkVersionString = "JavaSDK-0.75.180906";
1515

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

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.74.180829</version>
17+
<version>0.75.180906</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/PlayFabProfilesAPI.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ private static PlayFabResult<SetGlobalPolicyResponse> privateSetGlobalPolicyAsyn
257257
}
258258

259259
/**
260-
* Updates the entity's language
260+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
261+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
261262
* @param request SetProfileLanguageRequest
262263
* @return Async Task will return SetProfileLanguageResponse
263264
*/
@@ -271,7 +272,8 @@ public PlayFabResult<SetProfileLanguageResponse> call() throws Exception {
271272
}
272273

273274
/**
274-
* Updates the entity's language
275+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
276+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
275277
* @param request SetProfileLanguageRequest
276278
* @return SetProfileLanguageResponse
277279
*/
@@ -290,7 +292,10 @@ public PlayFabResult<SetProfileLanguageResponse> call() throws Exception {
290292
}
291293
}
292294

293-
/** Updates the entity's language */
295+
/**
296+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
297+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
298+
*/
294299
@SuppressWarnings("unchecked")
295300
private static PlayFabResult<SetProfileLanguageResponse> privateSetProfileLanguageAsync(final SetProfileLanguageRequest request) throws Exception {
296301
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

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.74.180829";
12-
public static String BuildIdentifier = "jbuild_javasdk_0";
13-
public static String SdkVersionString = "JavaSDK-0.74.180829";
11+
public static String SdkVersion = "0.75.180906";
12+
public static String BuildIdentifier = "jbuild_javasdk__sdk-slave2016-3_0";
13+
public static String SdkVersionString = "JavaSDK-0.75.180906";
1414

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

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.74.180829</version>
17+
<version>0.75.180906</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>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package com.playfab;
2+
3+
import com.playfab.internal.*;
4+
import com.playfab.PlayFabLocalizationModels.*;
5+
import com.playfab.PlayFabErrors.*;
6+
import com.playfab.PlayFabSettings;
7+
import java.util.concurrent.*;
8+
import java.util.*;
9+
import com.google.gson.*;
10+
import com.google.gson.reflect.*;
11+
12+
/** The Localization APIs give you the tools needed to manage language setup in your title. */
13+
public class PlayFabLocalizationAPI {
14+
private static Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").create();
15+
16+
/**
17+
* Retrieves the list of allowed languages, only accessible by title entities
18+
* @param request GetLanguageListRequest
19+
* @return Async Task will return GetLanguageListResponse
20+
*/
21+
@SuppressWarnings("unchecked")
22+
public static FutureTask<PlayFabResult<GetLanguageListResponse>> GetLanguageListAsync(final GetLanguageListRequest request) {
23+
return new FutureTask(new Callable<PlayFabResult<GetLanguageListResponse>>() {
24+
public PlayFabResult<GetLanguageListResponse> call() throws Exception {
25+
return privateGetLanguageListAsync(request);
26+
}
27+
});
28+
}
29+
30+
/**
31+
* Retrieves the list of allowed languages, only accessible by title entities
32+
* @param request GetLanguageListRequest
33+
* @return GetLanguageListResponse
34+
*/
35+
@SuppressWarnings("unchecked")
36+
public static PlayFabResult<GetLanguageListResponse> GetLanguageList(final GetLanguageListRequest request) {
37+
FutureTask<PlayFabResult<GetLanguageListResponse>> task = new FutureTask(new Callable<PlayFabResult<GetLanguageListResponse>>() {
38+
public PlayFabResult<GetLanguageListResponse> call() throws Exception {
39+
return privateGetLanguageListAsync(request);
40+
}
41+
});
42+
try {
43+
task.run();
44+
return task.get();
45+
} catch(Exception e) {
46+
return null;
47+
}
48+
}
49+
50+
/** Retrieves the list of allowed languages, only accessible by title entities */
51+
@SuppressWarnings("unchecked")
52+
private static PlayFabResult<GetLanguageListResponse> privateGetLanguageListAsync(final GetLanguageListRequest request) throws Exception {
53+
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");
54+
55+
FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL("/Locale/GetLanguageList"), request, "X-EntityToken", PlayFabSettings.EntityToken);
56+
task.run();
57+
Object httpResult = task.get();
58+
if (httpResult instanceof PlayFabError) {
59+
PlayFabError error = (PlayFabError)httpResult;
60+
if (PlayFabSettings.GlobalErrorHandler != null)
61+
PlayFabSettings.GlobalErrorHandler.callback(error);
62+
PlayFabResult result = new PlayFabResult<GetLanguageListResponse>();
63+
result.Error = error;
64+
return result;
65+
}
66+
String resultRawJson = (String) httpResult;
67+
68+
PlayFabJsonSuccess<GetLanguageListResponse> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<GetLanguageListResponse>>(){}.getType());
69+
GetLanguageListResponse result = resultData.data;
70+
71+
PlayFabResult<GetLanguageListResponse> pfResult = new PlayFabResult<GetLanguageListResponse>();
72+
pfResult.Result = result;
73+
return pfResult;
74+
}
75+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.playfab;
2+
3+
import java.util.*;
4+
import com.playfab.PlayFabUtil.*;
5+
6+
public class PlayFabLocalizationModels {
7+
8+
public static class GetLanguageListRequest {
9+
10+
}
11+
12+
public static class GetLanguageListResponse {
13+
/** The list of allowed languages, in BCP47 two-letter format */
14+
public ArrayList<String> LanguageList;
15+
16+
}
17+
18+
}

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ private static PlayFabResult<SetGlobalPolicyResponse> privateSetGlobalPolicyAsyn
257257
}
258258

259259
/**
260-
* Updates the entity's language
260+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
261+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
261262
* @param request SetProfileLanguageRequest
262263
* @return Async Task will return SetProfileLanguageResponse
263264
*/
@@ -271,7 +272,8 @@ public PlayFabResult<SetProfileLanguageResponse> call() throws Exception {
271272
}
272273

273274
/**
274-
* Updates the entity's language
275+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
276+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
275277
* @param request SetProfileLanguageRequest
276278
* @return SetProfileLanguageResponse
277279
*/
@@ -290,7 +292,10 @@ public PlayFabResult<SetProfileLanguageResponse> call() throws Exception {
290292
}
291293
}
292294

293-
/** Updates the entity's language */
295+
/**
296+
* Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account
297+
* language, Master Player Account language, and then title default language if the first two aren't set or supported.
298+
*/
294299
@SuppressWarnings("unchecked")
295300
private static PlayFabResult<SetProfileLanguageResponse> privateSetProfileLanguageAsync(final SetProfileLanguageRequest request) throws Exception {
296301
if (PlayFabSettings.EntityToken == null) throw new Exception ("Must call GetEntityToken before you can use the Entity API");

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.74.180829";
12-
public static String BuildIdentifier = "jbuild_javasdk_0";
13-
public static String SdkVersionString = "JavaSDK-0.74.180829";
11+
public static String SdkVersion = "0.75.180906";
12+
public static String BuildIdentifier = "jbuild_javasdk__sdk-slave2016-3_0";
13+
public static String SdkVersionString = "JavaSDK-0.75.180906";
1414

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

0 commit comments

Comments
 (0)