com.taptap.sdk.leaderboard 4.7.1 → 4.8.1-beta.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.
@@ -4,6 +4,6 @@
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.7.0"/>
7
+ <androidPackage spec="com.taptap.sdk:tap-leaderboard-unity:4.8.1-beta.1"/>
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
  {
@@ -40,13 +41,13 @@ namespace TapSDK.Leaderboard.Mobile
40
41
  {
41
42
  if (string.IsNullOrEmpty(openId))
42
43
  {
43
- Debug.LogError("OpenUserProfile failed: openId is null or empty.");
44
+ TapLog.Error("OpenUserProfile failed: openId is null or empty.");
44
45
  return;
45
46
  }
46
47
 
47
48
  if (!string.IsNullOrEmpty(unionId))
48
49
  {
49
- Debug.LogWarning("OpenUserProfile: unionId is not used in mobile platform, it will be ignored.");
50
+ TapLog.Warning("OpenUserProfile: unionId is not used in mobile platform, it will be ignored.");
50
51
  }
51
52
  var command = new Command.Builder()
52
53
  .Service(SERVICE_NAME)
@@ -79,14 +80,14 @@ namespace TapSDK.Leaderboard.Mobile
79
80
  return;
80
81
  }
81
82
 
82
- Debug.Log("SubmitScores, result ==>>> " + JsonConvert.SerializeObject(result));
83
+ TapLog.Log("SubmitScores, result ==>>> " + JsonConvert.SerializeObject(result));
83
84
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
84
85
  var status = SafeDictionary.GetValue<string>(dic, "status");
85
86
  switch (status)
86
87
  {
87
88
  case "success":
88
89
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
89
- Debug.Log("submit scores success: " + jsonStr);
90
+ TapLog.Log("submit scores success: " + jsonStr);
90
91
  var data = JsonConvert.DeserializeObject<SubmitScoresResponse>(jsonStr);
91
92
  if (callback != null)
92
93
  {
@@ -96,7 +97,7 @@ namespace TapSDK.Leaderboard.Mobile
96
97
  case "failure":
97
98
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
98
99
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
99
- Debug.Log("failed to submit scores, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
100
+ TapLog.Log("failed to submit scores, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
100
101
  if (callback != null)
101
102
  {
102
103
  callback.OnFailure(errorCode, errorMsg);
@@ -134,14 +135,14 @@ namespace TapSDK.Leaderboard.Mobile
134
135
  return;
135
136
  }
136
137
 
137
- Debug.Log("LoadLeaderboardScores, result ==>>> " + JsonConvert.SerializeObject(result));
138
+ TapLog.Log("LoadLeaderboardScores, result ==>>> " + JsonConvert.SerializeObject(result));
138
139
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
139
140
  var status = SafeDictionary.GetValue<string>(dic, "status");
140
141
  switch (status)
141
142
  {
142
143
  case "success":
143
144
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
144
- Debug.Log("load leaderboard scores success: " + jsonStr);
145
+ TapLog.Log("load leaderboard scores success: " + jsonStr);
145
146
  var data = JsonConvert.DeserializeObject<LeaderboardScoreResponse>(jsonStr);
146
147
  if (callback != null)
147
148
  {
@@ -151,7 +152,7 @@ namespace TapSDK.Leaderboard.Mobile
151
152
  case "failure":
152
153
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
153
154
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
154
- Debug.Log("load leaderboard scores failed, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
155
+ TapLog.Log("load leaderboard scores failed, errorCode: " + errorCode + ", errorMsg: " + errorMsg);
155
156
  if (callback != null)
156
157
  {
157
158
  callback.OnFailure(errorCode, errorMsg);
@@ -186,14 +187,14 @@ namespace TapSDK.Leaderboard.Mobile
186
187
  return;
187
188
  }
188
189
 
189
- Debug.Log("LoadCurrentPlayerLeaderboardScore, result ==>>> " + JsonConvert.SerializeObject(result));
190
+ TapLog.Log("LoadCurrentPlayerLeaderboardScore, result ==>>> " + JsonConvert.SerializeObject(result));
190
191
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
191
192
  var status = SafeDictionary.GetValue<string>(dic, "status");
192
193
  switch (status)
193
194
  {
194
195
  case "success":
195
196
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
196
- Debug.Log("Load current player leaderboard score success: " + jsonStr);
197
+ TapLog.Log("Load current player leaderboard score success: " + jsonStr);
197
198
  var data = JsonConvert.DeserializeObject<UserScoreResponse>(jsonStr);
198
199
  if (callback != null)
199
200
  {
@@ -203,7 +204,7 @@ namespace TapSDK.Leaderboard.Mobile
203
204
  case "failure":
204
205
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
205
206
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
206
- Debug.Log("Load current player leaderboard score failed: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
207
+ TapLog.Log("Load current player leaderboard score failed: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
207
208
  if (callback != null)
208
209
  {
209
210
  callback.OnFailure(errorCode, errorMsg);
@@ -240,14 +241,14 @@ namespace TapSDK.Leaderboard.Mobile
240
241
  return;
241
242
  }
242
243
 
243
- Debug.Log("LoadPlayerCenteredScores, result ==>>> " + JsonConvert.SerializeObject(result));
244
+ TapLog.Log("LoadPlayerCenteredScores, result ==>>> " + JsonConvert.SerializeObject(result));
244
245
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
245
246
  var status = SafeDictionary.GetValue<string>(dic, "status");
246
247
  switch (status)
247
248
  {
248
249
  case "success":
249
250
  var jsonStr = SafeDictionary.GetValue<string>(dic, "data");
250
- Debug.Log("Load player centered scores success: " + jsonStr);
251
+ TapLog.Log("Load player centered scores success: " + jsonStr);
251
252
  var data = JsonConvert.DeserializeObject<LeaderboardScoreResponse>(jsonStr);
252
253
  if (callback != null)
253
254
  {
@@ -257,7 +258,7 @@ namespace TapSDK.Leaderboard.Mobile
257
258
  case "failure":
258
259
  var errorCode = SafeDictionary.GetValue<int>(dic, "errCode");
259
260
  var errorMsg = SafeDictionary.GetValue<string>(dic, "errMessage");
260
- Debug.Log("Load failed load player centered scores:: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
261
+ TapLog.Log("Load failed load player centered scores:: errorCode: " + errorCode + ", errorMsg: " + errorMsg);
261
262
  if (callback != null)
262
263
  {
263
264
  callback.OnFailure(errorCode, errorMsg);
@@ -287,14 +288,14 @@ namespace TapSDK.Leaderboard.Mobile
287
288
  return;
288
289
  }
289
290
 
290
- Debug.Log("SetShareCallback, result ==>>> " + JsonConvert.SerializeObject(result));
291
+ TapLog.Log("SetShareCallback, result ==>>> " + JsonConvert.SerializeObject(result));
291
292
  var dic = Json.Deserialize(result.content) as Dictionary<string, object>;
292
293
  var status = SafeDictionary.GetValue<string>(dic, "status");
293
294
  switch (status)
294
295
  {
295
296
  case "success":
296
297
  var localPath = SafeDictionary.GetValue<string>(dic, "data");
297
- Debug.Log("share success: " + localPath);
298
+ TapLog.Log("share success: " + localPath);
298
299
  callback.OnShareSuccess(localPath);
299
300
  break;
300
301
  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.7.1";
16
+ public static readonly string Version = "4.8.1-beta.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.7.1",
6
- "unity": "2019.4",
7
- "license": "MIT",
8
- "dependencies": {
9
- "com.taptap.sdk.core": "4.7.1",
10
- "com.taptap.sdk.login": "4.7.1"
11
- }
2
+ "name": "com.taptap.sdk.leaderboard",
3
+ "displayName": "TapTapSDK Leaderboard",
4
+ "description": "TapTapSDK Leaderboard",
5
+ "version": "4.8.1-beta.1",
6
+ "unity": "2019.4",
7
+ "license": "MIT",
8
+ "dependencies": {
9
+ "com.taptap.sdk.core": "4.8.1-beta.1",
10
+ "com.taptap.sdk.login": "4.8.1-beta.1"
11
+ }
12
12
  }