public static void EquipGlobalAssetToCharacter(LootLockerGetRequest lootLockerGetRequest, LootLockerEquipByAssetRequest data, Action <EquipAssetToCharacterLoadoutResponse> onComplete) { string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } EndPointClass endPoint = LootLockerEndPoints.equipGlobalAssetToCharacter; string getVariable = string.Format(endPoint.endPoint, lootLockerGetRequest.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, json, (serverResponse) => { EquipAssetToCharacterLoadoutResponse response = new EquipAssetToCharacterLoadoutResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <EquipAssetToCharacterLoadoutResponse>(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 GetAssetListWithCount(LootLockerGetRequest data, Action <LootLockerAssetResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.gettingAssetListWithCount; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerAssetResponse response = new LootLockerAssetResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerAssetResponse>(serverResponse.text); response.text = serverResponse.text; if (response != null) { LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0; } onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }
public static void EndSession(LootLockerGetRequest data, Action <LootLockerSessionResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.endingSession; string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) => { LootLockerSessionResponse response = new LootLockerSessionResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerSessionResponse>(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 GuestSession(LootLockerGetRequest data, Action <LootLockerGuestSessionResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.guestSessionRequest; string json = ""; if (data == null) { return; } json = JsonConvert.SerializeObject(data); LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) => { LootLockerGuestSessionResponse response = new LootLockerGuestSessionResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerGuestSessionResponse>(serverResponse.text); LootLockerConfig.current.UpdateToken(response.session_token, (data as LootLockerSessionRequest)?.player_identifier); } response.text = serverResponse.text; response.success = serverResponse.success; response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode; onComplete?.Invoke(response); }, false); }
public static void GettingASingleEvent(LootLockerGetRequest data, Action <LootLockerSingleEventResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.gettingASingleEvent; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerSingleEventResponse response = new LootLockerSingleEventResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerSingleEventResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.text = serverResponse.text; response.success = serverResponse.success; response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode; onComplete?.Invoke(response); } }, true); }
public static void UpdateKeyValuePairById(LootLockerGetRequest lootLockerGetRequest, LootLockerCreateKeyValuePairRequest data, Action <LootLockerAssetDefaultResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.updateKeyValuePairById; string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } string getVariable = string.Format(endPoint.endPoint, lootLockerGetRequest.getRequests[0], lootLockerGetRequest.getRequests[1]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, json, onComplete: (serverResponse) => { LootLockerAssetDefaultResponse response = new LootLockerAssetDefaultResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerAssetDefaultResponse>(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 GetSingleKeyPersistentStorage(LootLockerGetRequest data, Action <LootLockerGetPersistentSingle> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.getSingleKeyFromPersitenctStorage; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerGetPersistentSingle response = new LootLockerGetPersistentSingle(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerGetPersistentSingle>(serverResponse.text); response.text = serverResponse.text; response.success = true; onComplete?.Invoke(response); } else { response.text = serverResponse.text; response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }
public static void ListTriggers(LootLockerGetRequest data, Action <LootLockerListTriggersResponse> onComplete) { string json = ""; EndPointClass endPoint = LootLockerEndPoints.current.listTriggers; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, json, (serverResponse) => { var response = new LootLockerListTriggersResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerListTriggersResponse>(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); } }, useAuthToken: true, callerRole: LootLocker.LootLockerEnums.LootLockerCallerRole.Admin); }
//public static void GetAssetListWithCount(LootLockerGetRequest data, Action<LootLockerAssetResponse> onComplete) //{ // EndPointClass endPoint = LootLockerEndPoints.gettingAssetListWithCount; // string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); // LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => // { // LootLockerAssetResponse response = new LootLockerAssetResponse(); // if (string.IsNullOrEmpty(serverResponse.Error)) // { // response = JsonConvert.DeserializeObject<LootLockerAssetResponse>(serverResponse.text); // if (response != null && response.assets.Length > 0) // LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0; // } // // LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error)); // response.text = serverResponse.text; // response.status = serverResponse.status; // response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode; // onComplete?.Invoke(response); // }, true); //} //public static void GetAssetListWithAfterCount(LootLockerAssetRequest data, Action<LootLockerAssetResponse> onComplete) //{ // EndPointClass endPoint = LootLockerEndPoints.gettingAssetListWithAfterAndCount; // string getVariable = string.Format(endPoint.endPoint, LootLockerAssetRequest.lastId, data.count); // LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => // { // LootLockerAssetResponse response = new LootLockerAssetResponse(); // if (string.IsNullOrEmpty(serverResponse.Error)) // { // response = JsonConvert.DeserializeObject<LootLockerAssetResponse>(serverResponse.text); // if (response != null && response.assets.Length > 0) // LootLockerAssetRequest.lastId = response.assets.Last()?.id != null ? response.assets.Last().id : 0; // } // // LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error)); // response.text = serverResponse.text; // response.status = serverResponse.status; // response.Error = serverResponse.Error; response.statusCode = serverResponse.statusCode; // onComplete?.Invoke(response); // }, true); //} public static void GetAssetsById(LootLockerGetRequest data, Action <LootLockerAssetResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.getAssetsById; string builtAssets = data.getRequests.First(); if (data.getRequests.Count > 0) { for (int i = 1; i < data.getRequests.Count; i++) { builtAssets += "," + data.getRequests[i]; } } string getVariable = string.Format(endPoint.endPoint, builtAssets); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerAssetResponse response = new LootLockerAssetResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerAssetResponse>(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 OpenALootBox(LootLockerGetRequest data, Action <LootLockerOpenLootBoxResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.deleteKeyValuePair; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerOpenLootBoxResponse response = new LootLockerOpenLootBoxResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerOpenLootBoxResponse>(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); }
public static void FinishingEvent(LootLockerGetRequest lootLockerGetRequest, FinishEventRequest data, Action <LootLockerFinishEventResponse> onComplete) { string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } EndPointClass endPoint = LootLockerEndPoints.current.finishingEvent; string getVariable = string.Format(endPoint.endPoint, lootLockerGetRequest.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, json, (serverResponse) => { LootLockerFinishEventResponse response = new LootLockerFinishEventResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerFinishEventResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, true); }
//Both this and the previous 2 calls share the same response public static void UpdatingInformationAboutAGame(LootLockerGetRequest lootLockerGetRequest, Dictionary <string, object> data, Action <LootLockerCreatingAGameResponse> onComplete) { string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } EndPointClass endPoint = LootLockerEndPointsAdmin.current.updatingInformationAboutAGame; string getVariable = string.Format(endPoint.endPoint, lootLockerGetRequest.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, json, (serverResponse) => { LootLockerCreatingAGameResponse response = new LootLockerCreatingAGameResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerCreatingAGameResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, useAuthToken: true, callerRole: LootLocker.LootLockerEnums.LootLockerCallerRole.Admin); }
public static void Session(LootLockerGetRequest data, Action <LootLockerSessionResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.current.authenticationRequest; string json = ""; if (data == null) { return; } else { json = JsonConvert.SerializeObject(data); } LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) => { LootLockerSessionResponse response = new LootLockerSessionResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerSessionResponse>(serverResponse.text); LootLockerConfig.current.UpdateToken(response.session_token, (data as LootLockerSessionRequest)?.player_identifier); onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, false); }
public static void GetDetailedInformationAboutAGame(string id, Action <LootLockerCreatingAGameResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest(); lootLockerGetRequest.getRequests.Add(id.ToString()); LootLockerAPIManagerAdmin.GetDetailedInformationAboutAGame(lootLockerGetRequest, onComplete); }
public static void GetUsersToAnOrganisation(int organisation_id, Action <LootLockerGetUsersToAnOrganisationResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest data = new LootLockerGetRequest(); data.getRequests.Add(organisation_id.ToString()); LootLockerAPIManagerAdmin.GetUsersToAnOrganisation(data, onComplete); }
public static void GettingAllEvents(int gameID, Action <LootLockerGettingAllEventsResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest(); lootLockerGetRequest.getRequests.Add(gameID.ToString()); LootLockerAPIManagerAdmin.GettingAllEvents(lootLockerGetRequest, onComplete); }
public static void CreateTriggers(LootLockerCreateTriggersRequest requestData, int game_id, Action <LootLockerListTriggersResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest data = new LootLockerGetRequest(); data.getRequests.Add(game_id.ToString()); LootLockerAPIManagerAdmin.CreateTriggers(requestData, data, onComplete); }
public static void UpdatingMaps(LootLockerCreatingMapsRequest request, int mapID, Action <LootLockerCreatingMapsResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest(); lootLockerGetRequest.getRequests.Add(mapID.ToString()); LootLockerAPIManagerAdmin.UpdatingMaps(lootLockerGetRequest, request, onComplete); }
public static void UpdatingEvent(int eventID, Dictionary <string, object> requestData, Action <LootLockerCreatingEventResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest(); lootLockerGetRequest.getRequests.Add(eventID.ToString()); LootLockerAPIManagerAdmin.UpdatingEvent(lootLockerGetRequest, requestData, onComplete); }
public static void SearchingForPlayers(int game_id, Action <LootLockerSearchingForPlayersResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest data = new LootLockerGetRequest(); data.getRequests.Add(game_id.ToString()); LootLockerAPIManagerAdmin.SearchingForPlayers(data, onComplete); }
public static void DeletingGames(int gameIDToDelete, Action <LootLockerDeletingGamesResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest(); lootLockerGetRequest.getRequests.Add(gameIDToDelete.ToString()); LootLockerAPIManagerAdmin.DeletingGames(lootLockerGetRequest, onComplete); }
public static void UpdatingInformationAboutAGame(int gameIDToUpdateInfo, Dictionary <string, object> requestData, Action <LootLockerCreatingAGameResponse> onComplete) { if (!CheckInitialized()) { return; } LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest(); lootLockerGetRequest.getRequests.Add(gameIDToUpdateInfo.ToString()); LootLockerAPIManagerAdmin.UpdatingInformationAboutAGame(lootLockerGetRequest, requestData, onComplete); }
public static void RemoveFavouriteAsset(LootLockerGetRequest data, Action <LootLockerAssetResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.removingFavouriteAssets; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, "", onComplete: (serverResponse) => { LootLockerAssetResponse response = new LootLockerAssetResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerAssetResponse>(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 GetOtherPlayersPublicKeyValuePairs(LootLockerGetRequest data, Action <LootLockerGetPersistentStoragResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.getOtherPlayersPublicKeyValuePairs; string getVariable = string.Format(endPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, onComplete: (serverResponse) => { LootLockerGetPersistentStoragResponse response = new LootLockerGetPersistentStoragResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerGetPersistentStoragResponse>(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 GettingASingleAssetCandidate(LootLockerGetRequest getRequests, Action <LootLockerUserGenerateContentResponse> onComplete) { EndPointClass requestEndPoint = LootLockerEndPoints.gettingASingleAssetCandidate; string endPoint = string.Format(requestEndPoint.endPoint, getRequests.getRequests[0]); LootLockerServerRequest.CallAPI(endPoint, requestEndPoint.httpMethod, null, (serverResponse) => { LootLockerUserGenerateContentResponse response = new LootLockerUserGenerateContentResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerUserGenerateContentResponse>(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, LootLocker.LootLockerEnums.LootLockerCallerRole.User); }
public static void RemovingFilesFromAssetCandidates(LootLockerGetRequest data, Action <LootLockerUserGenerateContentResponse> onComplete) { EndPointClass requestEndPoint = LootLockerEndPoints.removingFilesFromAssetCandidates; string endPoint = string.Format(requestEndPoint.endPoint, data.getRequests[0], data.getRequests[1]); LootLockerServerRequest.CallAPI(endPoint, requestEndPoint.httpMethod, onComplete: (serverResponse) => { LootLockerUserGenerateContentResponse response = new LootLockerUserGenerateContentResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerUserGenerateContentResponse>(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); }, useAuthToken: true, callerRole: LootLocker.LootLockerEnums.LootLockerCallerRole.User); }
public static void GetCurrentLoadOutToOtherCharacter(LootLockerGetRequest lootLockerGetRequest, Action <LootLockerGetCurrentLoadouttoDefaultCharacterResponse> onComplete) { EndPointClass endPoint = LootLockerEndPoints.getOtherPlayersCharacterLoadouts; string getVariable = string.Format(endPoint.endPoint, lootLockerGetRequest.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, (serverResponse) => { LootLockerGetCurrentLoadouttoDefaultCharacterResponse response = new LootLockerGetCurrentLoadouttoDefaultCharacterResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerGetCurrentLoadouttoDefaultCharacterResponse>(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 StartingAMission(LootLockerGetRequest data, Action <LootLockerStartingAMissionResponse> onComplete) { EndPointClass requestEndPoint = LootLockerEndPoints.startingMission; string endPoint = string.Format(requestEndPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(endPoint, requestEndPoint.httpMethod, onComplete: (serverResponse) => { LootLockerStartingAMissionResponse response = new LootLockerStartingAMissionResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerStartingAMissionResponse>(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); }, useAuthToken: false); }
public static void GettingAllEvents(LootLockerGetRequest lootLockerGetRequest, Action <LootLockerGettingAllEventsResponse> onComplete) { EndPointClass endPoint = LootLockerEndPointsAdmin.current.gettingAllEvents; string getVariable = string.Format(endPoint.endPoint, lootLockerGetRequest.getRequests[0]); LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, "", (serverResponse) => { LootLockerGettingAllEventsResponse response = new LootLockerGettingAllEventsResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { response = JsonConvert.DeserializeObject <LootLockerGettingAllEventsResponse>(serverResponse.text); response.text = serverResponse.text; onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, useAuthToken: true, callerRole: LootLocker.LootLockerEnums.LootLockerCallerRole.Admin); }
public static void DeletingAnAssetCandidate(LootLockerGetRequest data, Action <LootLockerUserGenerateContentResponse> onComplete) { EndPointClass requestEndPoint = LootLockerEndPoints.current.deletingAnAssetCandidate; string endPoint = string.Format(requestEndPoint.endPoint, data.getRequests[0]); LootLockerServerRequest.CallAPI(endPoint, requestEndPoint.httpMethod, onComplete: (serverResponse) => { LootLockerUserGenerateContentResponse response = new LootLockerUserGenerateContentResponse(); if (string.IsNullOrEmpty(serverResponse.Error)) { LootLockerSDKManager.DebugMessage(serverResponse.text); response = JsonConvert.DeserializeObject <LootLockerUserGenerateContentResponse>(serverResponse.text); onComplete?.Invoke(response); } else { response.message = serverResponse.message; response.Error = serverResponse.Error; onComplete?.Invoke(response); } }, useAuthToken: true, callerRole: LootLocker.LootLockerEnums.LootLockerCallerRole.User); }