コード例 #1
0
ファイル: Client.cs プロジェクト: bitcoinbrisbane/Colu.net
        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
ファイル: Client.cs プロジェクト: bitcoinbrisbane/Colu.net
        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);
        }