/// <summary> /// Gets a block by id /// path: /api/blocks/get /// </summary> /// <param name="req">BlockRequest</param> /// <returns>BlockResponse with block details</returns> public async Task<BlockResponse> GetBlockAsync(BlockRequest req) { _url.Path = Constants.ApiGetBlocksBlock; _url.Query = req.ToQuery(); var response = await _client.GetJsonAsync<BlockResponse>(_url.ToString()); ResetPath(); return response; }
/// <summary> /// Gets a block by id synchronously /// path: /api/blocks/get /// </summary> /// <param name="req">BlockRequest</param> /// <returns>BlockResponse with block details</returns> public BlockResponse GetBlock(BlockRequest req) { var response = GetBlockAsync(req).GetAwaiter().GetResult(); return response; }