From 0189672f4e6acf97017f0996375a6cfe9f60d9ad Mon Sep 17 00:00:00 2001 From: Caner Candan <candan@info.univ-angers.fr> Date: Tue, 14 Jan 2014 16:06:41 +0100 Subject: [PATCH] * README.md: minor --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fa54dd49..1083f6f6 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,26 @@ $ export PYTHONPATH="$HOME/ucoin-python-api:$PYTHONPATH" Thus you are ready to use it with your own python program. Here is an example illustrating how to use it thanks to the python shell: ```python -import ucoin -ucoin.ucg.Peering().get() +In [1]: import ucoin + +In [2]: ucoin.ucg.Peering().get() +Out[2]: +{'contract': {'currentNumber': '5', + 'hash': 'FB710AE30F843BF505ABF9DE8CF404B7F35D238A'}, + 'currency': 'mycurrency', + 'key': '6282C3F765E560992113137AD149AFF1B07FF751', + 'merkles': {'hdc/amendments/current/votes': {'depth': 1, + 'leavesCount': 2, + 'nodesCount': 1, + 'root': '2CEC90DEBBB89C10B6AB5EAEF17FF1D0BA8B4346'}, + 'pks/all': {'depth': 2, + 'leavesCount': 4, + 'nodesCount': 3, + 'root': '944D0A3A0593C4B627BA41F0454BB4A705918CE9'}}, + 'remote': {'host': 'mycurrency.candan.fr', + 'ipv4': '62.210.131.202', + 'ipv6': '', + 'port': 8081}} ``` Please take a look at the document [HTTP API](https://github.com/c-geek/ucoin/blob/master/doc/HTTP_API.md) to learn about the API. -- GitLab