Exemplo n.º 1
0
        public static void GetPlayerAssetNotification(Action <LootLockerPlayerAssetNotificationsResponse> onComplete)
        {
            EndPointClass endPoint = LootLockerEndPoints.playerAssetNotifications;

            string getVariable = endPoint.endPoint;

            LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, (serverResponse) =>
            {
                LootLockerPlayerAssetNotificationsResponse response = new LootLockerPlayerAssetNotificationsResponse();
                if (string.IsNullOrEmpty(serverResponse.Error))
                {
                    response = JsonConvert.DeserializeObject <LootLockerPlayerAssetNotificationsResponse>(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);
        }
Exemplo n.º 2
0
        public static void GetPlayerAssetNotification(Action <LootLockerPlayerAssetNotificationsResponse> onComplete)
        {
            EndPointClass endPoint = LootLockerEndPoints.current.playerAssetNotifications;

            string getVariable = endPoint.endPoint;

            LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, null, (serverResponse) =>
            {
                LootLockerPlayerAssetNotificationsResponse response = new LootLockerPlayerAssetNotificationsResponse();
                if (string.IsNullOrEmpty(serverResponse.Error))
                {
                    response      = JsonConvert.DeserializeObject <LootLockerPlayerAssetNotificationsResponse>(serverResponse.text);
                    response.text = serverResponse.text;
                    onComplete?.Invoke(response);
                }
                else
                {
                    response.message = serverResponse.message;
                    response.Error   = serverResponse.Error;
                    onComplete?.Invoke(response);
                }
            }, true);
        }