예제 #1
0
        public async Task <Models.GetAddressInfo.Response> GetAddressInfoAsync(String bitcoinAddress)
        {
            Models.GetAddressInfo.Request request = new Models.GetAddressInfo.Request()
            {
                Id = Guid.NewGuid().ToString()
            };
            request.Params.Address = bitcoinAddress;

            String        json           = JsonConvert.SerializeObject(request);
            StringContent requestContent = new StringContent(json, Encoding.UTF8, MEDIA_TYPE);
            String        url            = String.Format("{0}", _host);

            String content = await Post(requestContent, url);

            return(JsonConvert.DeserializeObject <Models.GetAddressInfo.Response> (content));
        }
예제 #2
0
        public async Task<Models.GetAddressInfo.Response> GetAddressInfoAsync(String bitcoinAddress)
        {
            Models.GetAddressInfo.Request request = new Models.GetAddressInfo.Request() { Id = Guid.NewGuid().ToString() };
            request.Params.Address = bitcoinAddress;

            String json = JsonConvert.SerializeObject(request);
            StringContent requestContent = new StringContent(json, Encoding.UTF8, MEDIA_TYPE);
            String url = String.Format("{0}", _host);

            String content = await Post(requestContent, url);
            return JsonConvert.DeserializeObject<Models.GetAddressInfo.Response> (content);
        }