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 6829500 commit 20dc6ab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/api/general-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ 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>`_.

Samples
Access Samples
================================================================================

Python:

::

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

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

API call rate limit
================================================================================

We will set limits in the future.

0 comments on commit 20dc6ab

Please sign in to comment.