public void Simple()
 {
     var service = new GetFeedService
                       {
                           RequestBuilder = ServerRequestBuilder.Instance
                       };
     var request = new GetFeedRequest
                       {
                           FeedId = "feedId"
                       };
     service.Execute(request, Callback, ExceptionHandler.Handle);
 }
Esempio n. 2
0
        public void Execute(GetFeedRequest request, Action<GetFeedResponse> responseCallback, Action<Exception> exceptionCallback)
        {
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/feeds/" + request.FeedId);
            webRequest.Method = "Get";
            webRequest.ContentType = "application/json";

            var asyncRequest = new AsyncRequest
            {
                ReadFromResponse = stream => responseCallback(GetFeedResponseDeSerializer.DeSerialize(stream)),
                Request = webRequest,
                ExceptionCallback = exceptionCallback,
            };
            asyncRequest.Execute();
        }
Esempio n. 3
0
        public void Execute(GetFeedRequest request, Action <GetFeedResponse> responseCallback, Action <Exception> exceptionCallback)
        {
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/feeds/" + request.FeedId);

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

            var asyncRequest = new AsyncRequest
            {
                ReadFromResponse  = stream => responseCallback(GetFeedResponseDeSerializer.DeSerialize(stream)),
                Request           = webRequest,
                ExceptionCallback = exceptionCallback,
            };

            asyncRequest.Execute();
        }