From 79194d4d34db8699347050e6cfafce44596900d4 Mon Sep 17 00:00:00 2001 From: troymc Date: Tue, 8 Mar 2016 14:03:04 +0100 Subject: [PATCH] Restrutured docs for HTTP and Python driver APIs --- README.md | 1 + docs/source/http-client-server-api.md | 5 +++++ docs/source/index.rst | 3 ++- docs/source/python-driver-api-examples.md | 24 +++-------------------- 4 files changed, 11 insertions(+), 22 deletions(-) create mode 100644 docs/source/http-client-server-api.md diff --git a/README.md b/README.md index a3d8f52c..e72a55a8 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A scalable blockchain database. [The whitepaper](https://www.bigchaindb.com/whit ### [Install and Run BigchainDB Server](http://bigchaindb.readthedocs.org/en/develop/installing-server.html) ### [Run BigchainDB with Docker](http://bigchaindb.readthedocs.org/en/develop/installing-server.html#run-bigchaindb-with-docker) ### [The Python Server API by Example](http://bigchaindb.readthedocs.org/en/develop/python-server-api-examples.html) +### [The Python Driver API by Example](http://bigchaindb.readthedocs.org/en/develop/python-driver-api-examples.html) ## Links for Everyone * [BigchainDB.com](https://www.bigchaindb.com/) - the main BigchainDB website, including newsletter signup diff --git a/docs/source/http-client-server-api.md b/docs/source/http-client-server-api.md new file mode 100644 index 00000000..367fd440 --- /dev/null +++ b/docs/source/http-client-server-api.md @@ -0,0 +1,5 @@ +# The HTTP Client-Server API + +The preferred way to communicate with a node in a BigchainDB cluster is via HTTP requests. Each node exposes a simple HTTP API (the HTTP Client-Server API) that provides, right now, two endpoints, one to get information about a specific transaction id, and one to push a transaction to the BigchainDB cluster. + +The endpoints are documented using [Apiary](http://docs.bigchaindb.apiary.io/). diff --git a/docs/source/index.rst b/docs/source/index.rst index 0ccb6c1b..c065b61c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,7 +16,8 @@ Table of Contents installing-server python-server-api-examples bigchaindb-cli - python-api-tutorial + http-client-server-api + python-driver-api-examples admin cryptography models diff --git a/docs/source/python-driver-api-examples.md b/docs/source/python-driver-api-examples.md index 84c64650..f1e57110 100644 --- a/docs/source/python-driver-api-examples.md +++ b/docs/source/python-driver-api-examples.md @@ -1,14 +1,8 @@ -# Getting started with the HTTP API +# The Python Driver API by Example -The preferred way to communicate with a Node in the BigchainDB Federation is via HTTP requests. -Each Node exposes a simple HTTP API that provides, right now, two endpoints, one to get information about a specific -transaction id, one to push transactions to the BigchainDB network. - -The endpoints are documented in [Apiary](http://docs.bigchaindb.apiary.io/). - - -## Usage example using the Python client +The Python driver API is used by app developers to develop client apps which can communicate with one or more BigchainDB clusters. Under the hood, the Python driver API communicates with the BigchainDB cluster using the BigchainDB HTTP client-server API. +Here's an example of how to use the Python driver API. First, launch an interactive Python session, then: ```python In [1]: from bigchaindb.client import temp_client In [2]: c1 = temp_client() @@ -39,15 +33,3 @@ Out[7]: 'operation': 'TRANSFER', 'timestamp': '1456763549.446138'}} ``` - - -# Roadmap - -The development of the API is still at the beginning and you can follow it on -[GitHub](https://github.com/bigchaindb/bigchaindb/issues?q=is%3Aissue+is%3Aopen+label%3Arest-api) - -There are several key features still missing like: - - validating the structure of the transaction - - returns the correct error codes if something goes wrong - - add an endpoint to query unspents for a given public key -