Exemple #1
0
        public async Task <Models.GetAssetData.Response> GetAssetDataAsync(String assetId, Int32 numberOfConfirmations = 0)
        {
            Models.GetAssetData.Request request = new Models.GetAssetData.Request()
            {
                Id = Guid.NewGuid().ToString()
            };
            request.Params.AssetId = assetId;

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

            String response = await Post(requestContent, url);

            return(JsonConvert.DeserializeObject <Models.GetAssetData.Response>(response));
        }
Exemple #2
0
        public async Task<Models.GetAssetData.Response> GetAssetDataAsync(String assetId, Int32 numberOfConfirmations = 0)
        {
            Models.GetAssetData.Request request = new Models.GetAssetData.Request()
            {
                Id = Guid.NewGuid().ToString()
            };
            request.Params.AssetId = assetId;

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

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