Esempio n. 1
0
        public static ListRelayWebhookResponse CreateFromResponse(Response response)
        {
            var result = new ListRelayWebhookResponse();

            LeftRight.SetValuesToMatch(result, response);

            result.RelayWebhooks = BuildTheRelayWebhooksFrom(response);

            return(result);
        }
        public static ListRelayWebhookResponse CreateFromResponse(Response response)
        {
            var result = new ListRelayWebhookResponse();

            LeftRight.SetValuesToMatch(result, response);

            result.RelayWebhooks = BuildTheRelayWebhooksFrom(response);

            return result;
        }
Esempio n. 3
0
        public static RetrieveRelayWebhookResponse CreateFromResponse(Response response)
        {
            var result = new RetrieveRelayWebhookResponse();

            LeftRight.SetValuesToMatch(result, response);

            var results = Jsonification.DeserializeObject <dynamic>(response.Content).results;

            result.RelayWebhook = ListRelayWebhookResponse.ConvertToARelayWebhook(results);

            return(result);
        }
        public async Task <ListRelayWebhookResponse> List(object query = null)
        {
            if (query == null)
            {
                query = new {}
            }
            ;
            var request = new Request
            {
                Url    = $"/api/{client.Version}/relay-webhooks",
                Method = "GET",
                Data   = query
            };

            var response = await requestSender.Send(request);

            if (response.StatusCode != HttpStatusCode.OK)
            {
                throw new ResponseException(response);
            }

            return(ListRelayWebhookResponse.CreateFromResponse(response));
        }