Skip to content

Commit

Permalink
modify general-usage.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
bithernet committed Jul 28, 2016
1 parent ac61ef8 commit 6829500
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions source/api/general-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,27 @@ How to use ChainCloud API?
Access Method
================================================================================

API domain: **chaincloud-api.getcai.com** (in the future: api.chaincloud.com)
Domain: **chaincloud-api.getcai.com** (api.chaincloud.com in the future)

All API should be accessed with **token** (in HTTP header), and you can apply for your API token `here <https://bitcoin.org>`_.
All API should be accessed with ``token`` (in HTTP header), and you can apply for your API token `here <https://bitcoin.org>`_.

Samples
================================================================================

Python:

::

token = '3333bd0af3a28d0c18b32206627ac1af68dc63e304b9975f08917c53831a6666'
domain = 'chaincloud-api.getcai.com'
url = 'https://' + domain + '/api/v1/open/time'
request = urllib2.Request(url)
request.add_header('token', token)
response = urllib2.urlopen(request, timeout=global_timeout)

Curl:

::

curl -H "token:3333bd0af3a28d0c18b32206627ac1af68dc63e304b9975f08917c53831a6666" https://chaincloud-api.getcai.com/api/v1/open/time

0 comments on commit 6829500

Please sign in to comment.