List the "blocks" endpoint in response to HTTP info requests (#2545)

* Problem: HTTP info endpoints don't include "blocks"

Solution: Add "blocks" to the response to the HTTP info endpoints

* Removed "blocks" endpoints from "Advanced Usage"
because they are really not that advanced
This commit is contained in:
Troy McConaghy 2018-09-17 14:06:48 +02:00 committed by vrde
parent e6893632dc
commit 8e5f770707
3 changed files with 4 additions and 7 deletions

View File

@ -47,6 +47,7 @@ def get_api_v1_info(api_prefix):
return {
'docs': ''.join(docs_url),
'transactions': '{}transactions/'.format(api_prefix),
'blocks': '{}blocks/'.format(api_prefix),
'assets': '{}assets/'.format(api_prefix),
'outputs': '{}outputs/'.format(api_prefix),
'streams': websocket_root,

View File

@ -616,14 +616,8 @@ Validators
:statuscode 200: The query was executed successfully and validators set was returned.
Advanced Usage
--------------------------------
The following endpoints are more advanced
and meant for debugging and transparency purposes.
Blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------
.. http:get:: /api/v1/blocks/{block_height}

View File

@ -16,6 +16,7 @@ def test_api_root_endpoint(client, wsserver_base_url):
'v1': {
'docs': ''.join(docs_url),
'transactions': '/api/v1/transactions/',
'blocks': '/api/v1/blocks/',
'assets': '/api/v1/assets/',
'outputs': '/api/v1/outputs/',
'streams': '{}/api/v1/streams/valid_transactions'.format(
@ -38,6 +39,7 @@ def test_api_v1_endpoint(client, wsserver_base_url):
api_v1_info = {
'docs': ''.join(docs_url),
'transactions': '/transactions/',
'blocks': '/blocks/',
'assets': '/assets/',
'outputs': '/outputs/',
'streams': '{}/api/v1/streams/valid_transactions'.format(