public static void GettingCollectables(Action <LootLockerGettingCollectablesResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.gettingCollectables; LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, "", (serverResponse) => { LootLockerGettingCollectablesResponse response = new LootLockerGettingCollectablesResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerGettingCollectablesResponse>(serverResponse.text); } //LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error)); response.text = serverResponse.text; response.success = serverResponse.success; response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode; onComplete?.Invoke(response); }, true); }
public static void GettingCollectables(Action <LootLockerGettingCollectablesResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.gettingCollectables; LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, "", (serverResponse) => { LootLockerGettingCollectablesResponse response = new LootLockerGettingCollectablesResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerGettingCollectablesResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.text = serverResponse.text; response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }