com.taptap.sdk.leaderboard 4.8.0-beta.1 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- <?xml version="1.0" ?>
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
  <dependencies>
3
3
  <androidPackages>
4
4
  <repositories>
5
5
  <repository>https://repo.maven.apache.org/maven2</repository>
6
6
  </repositories>
7
- <androidPackage spec="com.taptap.sdk:tap-leaderboard-unity:4.8.0-beta.1"/>
7
+ <androidPackage spec="com.taptap.sdk:tap-leaderboard-unity:4.8.1-beta.7"/>
8
8
  </androidPackages>
9
9
  </dependencies>
@@ -6,6 +6,7 @@ using TapSDK.Core;
6
6
  using Newtonsoft.Json;
7
7
  using TapSDK.Leaderboard;
8
8
  using TapSDK.Core.Internal.Utils;
9
+ using TapSDK.Core.Internal.Log;
9
10
 
10
11
  namespace TapSDK.Leaderboard.Mobile
11
12
  {
@@ -38,16 +39,6 @@ namespace TapSDK.Leaderboard.Mobile
38
39
 
39
40
  public void OpenUserProfile(string openId, string unionId)
40
41
  {
41
- if (string.IsNullOrEmpty(openId))
42
- {
43
- Debug.LogError("OpenUserProfile failed: openId is null or empty.");
44
- return;
45
- }
46
-
47
- if (!string.IsNullOrEmpty(unionId))
48
- {
49
- Debug.LogWarning("OpenUserProfile: unionId is not used in mobile platform, it will be ignored.");
50
- }
51
42
  var command = new Command.Builder()
52
43
  .Service(SERVICE_NAME)
53
44
  .Method("openUserProfile")
@@ -79,14 +70,14 @@ namespace TapSDK.Leaderboard.Mobile
79
70
  return;
80
71
  }
81
72
 
82
- Debug.Log("SubmitScores, result ==>>> " + JsonConvert.SerializeObject(result));
73
+ TapLog.Log("SubmitScores, result ==>>> " + JsonConvert.SerializeObject(result));
83
74
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
84
75
  var status = SafeDictionary.GetValue<string>(dic, "status");
85
76
  switch (status)
86
77
  {
87
78
  case "success":
88
79
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
89
- Debug.Log("submit scores success: " + jsonStr);
80
+ TapLog.Log("submit scores success: " + jsonStr);
90
81
  var data = JsonConvert.DeserializeObject<SubmitScoresResponse>(jsonStr);
91
82
  if (callback != null)
92
83
  {
@@ -96,7 +87,7 @@ namespace TapSDK.Leaderboard.Mobile
96
87
  case "failure":
97
88
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
98
89
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
99
- Debug.Log("failed to submit scores, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
90
+ TapLog.Log("failed to submit scores, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
100
91
  if (callback != null)
101
92
  {
102
93
  callback.OnFailure(errorCode, errorMsg);
@@ -134,14 +125,14 @@ namespace TapSDK.Leaderboard.Mobile
134
125
  return;
135
126
  }
136
127
 
137
- Debug.Log("LoadLeaderboardScores, result ==>>> " + JsonConvert.SerializeObject(result));
128
+ TapLog.Log("LoadLeaderboardScores, result ==>>> " + JsonConvert.SerializeObject(result));
138
129
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
139
130
  var status = SafeDictionary.GetValue<string>(dic, "status");
140
131
  switch (status)
141
132
  {
142
133
  case "success":
143
134
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
144
- Debug.Log("load leaderboard scores success: " + jsonStr);
135
+ TapLog.Log("load leaderboard scores success: " + jsonStr);
145
136
  var data = JsonConvert.DeserializeObject<LeaderboardScoreResponse>(jsonStr);
146
137
  if (callback != null)
147
138
  {
@@ -151,7 +142,7 @@ namespace TapSDK.Leaderboard.Mobile
151
142
  case "failure":
152
143
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
153
144
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
154
- Debug.Log("load leaderboard scores failed, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
145
+ TapLog.Log("load leaderboard scores failed, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
155
146
  if (callback != null)
156
147
  {
157
148
  callback.OnFailure(errorCode, errorMsg);
@@ -186,14 +177,14 @@ namespace TapSDK.Leaderboard.Mobile
186
177
  return;
187
178
  }
188
179
 
189
- Debug.Log("LoadCurrentPlayerLeaderboardScore, result ==>>> " + JsonConvert.SerializeObject(result));
180
+ TapLog.Log("LoadCurrentPlayerLeaderboardScore, result ==>>> " + JsonConvert.SerializeObject(result));
190
181
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
191
182
  var status = SafeDictionary.GetValue<string>(dic, "status");
192
183
  switch (status)
193
184
  {
194
185
  case "success":
195
186
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
196
- Debug.Log("Load current player leaderboard score success: " + jsonStr);
187
+ TapLog.Log("Load current player leaderboard score success: " + jsonStr);
197
188
  var data = JsonConvert.DeserializeObject<UserScoreResponse>(jsonStr);
198
189
  if (callback != null)
199
190
  {
@@ -203,7 +194,7 @@ namespace TapSDK.Leaderboard.Mobile
203
194
  case "failure":
204
195
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
205
196
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
206
- Debug.Log("Load current player leaderboard score failed: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
197
+ TapLog.Log("Load current player leaderboard score failed: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
207
198
  if (callback != null)
208
199
  {
209
200
  callback.OnFailure(errorCode, errorMsg);
@@ -240,14 +231,14 @@ namespace TapSDK.Leaderboard.Mobile
240
231
  return;
241
232
  }
242
233
 
243
- Debug.Log("LoadPlayerCenteredScores, result ==>>> " + JsonConvert.SerializeObject(result));
234
+ TapLog.Log("LoadPlayerCenteredScores, result ==>>> " + JsonConvert.SerializeObject(result));
244
235
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
245
236
  var status = SafeDictionary.GetValue<string>(dic, "status");
246
237
  switch (status)
247
238
  {
248
239
  case "success":
249
240
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
250
- Debug.Log("Load player centered scores success: " + jsonStr);
241
+ TapLog.Log("Load player centered scores success: " + jsonStr);
251
242
  var data = JsonConvert.DeserializeObject<LeaderboardScoreResponse>(jsonStr);
252
243
  if (callback != null)
253
244
  {
@@ -257,7 +248,7 @@ namespace TapSDK.Leaderboard.Mobile
257
248
  case "failure":
258
249
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
259
250
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
260
- Debug.Log("Load failed load player centered scores:: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
251
+ TapLog.Log("Load failed load player centered scores:: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
261
252
  if (callback != null)
262
253
  {
263
254
  callback.OnFailure(errorCode, errorMsg);
@@ -287,14 +278,14 @@ namespace TapSDK.Leaderboard.Mobile
287
278
  return;
288
279
  }
289
280
 
290
- Debug.Log("SetShareCallback, result ==>>> " + JsonConvert.SerializeObject(result));
281
+ TapLog.Log("SetShareCallback, result ==>>> " + JsonConvert.SerializeObject(result));
291
282
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
292
283
  var status = SafeDictionary.GetValue<string>(dic, "status");
293
284
  switch (status)
294
285
  {
295
286
  case "success":
296
287
  var localPath = SafeDictionary.GetValue<string>(dic, "data");
297
- Debug.Log("share success: " + localPath);
288
+ TapLog.Log("share success: " + localPath);
298
289
  callback.OnShareSuccess(localPath);
299
290
  break;
300
291
  case "failure":
@@ -13,7 +13,7 @@ namespace TapSDK.Leaderboard
13
13
  /// <summary>
14
14
  /// SDK版本号
15
15
  /// </summary>
16
- public static readonly string Version = "4.8.0-beta.1";
16
+ public static readonly string Version = "4.8.1";
17
17
 
18
18
  /// <summary>
19
19
  /// 打开排行榜页面
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
- "name": "com.taptap.sdk.leaderboard",
3
- "displayName": "TapTapSDK Leaderboard",
4
- "description": "TapTapSDK Leaderboard",
5
- "version": "4.8.0-beta.1",
6
- "unity": "2019.4",
7
- "license": "MIT",
8
- "dependencies": {
9
- "com.taptap.sdk.core": "4.8.0-beta.1",
10
- "com.taptap.sdk.login": "4.8.0-beta.1"
11
- }
2
+ "name": "com.taptap.sdk.leaderboard",
3
+ "displayName": "TapTapSDK Leaderboard",
4
+ "description": "TapTapSDK Leaderboard",
5
+ "version": "4.8.1",
6
+ "unity": "2019.4",
7
+ "license": "MIT",
8
+ "dependencies": {
9
+ "com.taptap.sdk.core": "4.8.1",
10
+ "com.taptap.sdk.login": "4.8.1"
11
+ }
12
12
  }