public void Simple()
 {
     var service = new DeleteFeedService
                       {
                           RequestBuilder = ServerRequestBuilder.Instance
                       };
     var request = new DeleteFeedRequest
                       {
                           FeedId = "feedId"
                       };
     service.Execute(request, response => Debug.WriteLine("Deleted"), ExceptionHandler.Handle);
 }
Exemplo n.º 2
0
        public void Execute(DeleteFeedRequest request, Action<DeleteFeedResponse> responseCallback, Action<Exception> exceptionCallback)
        {
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/feeds/" + request.FeedId);
            webRequest.Method = "DELETE";
            webRequest.ContentType = "application/json";

            var asyncRequest = new AsyncRequest
            {
                Request = webRequest,
                ReadFromResponse = o => responseCallback(new DeleteFeedResponse()),
                ExceptionCallback = exceptionCallback,
            };
            asyncRequest.Execute();
        }
Exemplo n.º 3
0
        public void Execute(DeleteFeedRequest request, Action <DeleteFeedResponse> responseCallback, Action <Exception> exceptionCallback)
        {
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/feeds/" + request.FeedId);

            webRequest.Method      = "DELETE";
            webRequest.ContentType = "application/json";

            var asyncRequest = new AsyncRequest
            {
                Request           = webRequest,
                ReadFromResponse  = o => responseCallback(new DeleteFeedResponse()),
                ExceptionCallback = exceptionCallback,
            };

            asyncRequest.Execute();
        }