# hep-rest-api
The REST API for HEP protocol

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install

If the python package is hosted on Github, you can install directly from Github

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import hep_rest_api 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import hep_rest_api
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import hep_rest_api
from hep_rest_api.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
dapp_id = 'dapp_id_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_dapps_read(api_version, dapp_id, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_dapps_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 

try:
    api_instance.rest_health_list(api_version)
except ApiException as e:
    print("Exception when calling RestApi->rest_health_list: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
txid = 'txid_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_newchain_tx_read(api_version, txid, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_newchain_tx_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
_date = '_date_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_newforce_read(api_version, _date, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_newforce_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
newid = 'newid_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_newids_read(api_version, newid, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_newids_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
body = hep_rest_api.AuthCacheRequest() # AuthCacheRequest | 
api_version = 'api_version_example' # str | 

try:
    api_response = api_instance.rest_newnet_caches_auth_create(body, api_version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_newnet_caches_auth_create: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
auth_hash = 'auth_hash_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_newnet_caches_auth_read(api_version, auth_hash, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_newnet_caches_auth_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
body = hep_rest_api.PayCacheRequest() # PayCacheRequest | 
api_version = 'api_version_example' # str | 

try:
    api_response = api_instance.rest_newnet_caches_pay_create(body, api_version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_newnet_caches_pay_create: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
pay_hash = 'pay_hash_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_newnet_caches_pay_read(api_version, pay_hash, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_newnet_caches_pay_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
oracle_id = 'oracle_id_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_oracles_read(api_version, oracle_id, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_oracles_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
body = hep_rest_api.CreateProofRequest() # CreateProofRequest | 
api_version = 'api_version_example' # str | 

try:
    api_response = api_instance.rest_proofs_create(body, api_version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_proofs_create: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
body = hep_rest_api.CancelProofRequest() # CancelProofRequest | 
api_version = 'api_version_example' # str | 
proof_hash = 'proof_hash_example' # str | 

try:
    api_response = api_instance.rest_proofs_delete(body, api_version, proof_hash)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_proofs_delete: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
api_version = 'api_version_example' # str | 
proof_hash = 'proof_hash_example' # str | 
dapp_key = 'dapp_key_example' # str | The decentralized application access key
protocol = 'protocol_example' # str | The protocol name. default is 'HEP'.
version = 'version_example' # str | The protocol version such as '1.0'
ts = 56 # int | The current timestamp
nonce = 'nonce_example' # str | The random string or auto-increment sequence
os = 'os_example' # str | The operating system of client such as ios, android, dweb,etc.
language = 'language_example' # str | The i18n language code such as zh, en, etc.
dapp_signature_method = 'dapp_signature_method_example' # str | The signature method used by dapp.
dapp_signature = 'dapp_signature_example' # str | The signature generated by dapp.

try:
    api_response = api_instance.rest_proofs_read(api_version, proof_hash, dapp_key, protocol, version, ts, nonce, os, language, dapp_signature_method, dapp_signature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_proofs_read: %s\n" % e)

# create an instance of the API class
api_instance = hep_rest_api.RestApi(hep_rest_api.ApiClient(configuration))
body = hep_rest_api.RetrieveProofReceiptsRequest() # RetrieveProofReceiptsRequest | 
api_version = 'api_version_example' # str | 

try:
    api_response = api_instance.rest_proofs_receipts_create(body, api_version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RestApi->rest_proofs_receipts_create: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to */*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*RestApi* | [**rest_dapps_read**](docs/RestApi.md#rest_dapps_read) | **GET** /rest/v{api_version}/dapps/{dapp_id}/ | 
*RestApi* | [**rest_health_list**](docs/RestApi.md#rest_health_list) | **GET** /rest/v{api_version}/health/ | 
*RestApi* | [**rest_newchain_tx_read**](docs/RestApi.md#rest_newchain_tx_read) | **GET** /rest/v{api_version}/newchain/tx/{txid}/ | 
*RestApi* | [**rest_newforce_read**](docs/RestApi.md#rest_newforce_read) | **GET** /rest/v{api_version}/newforce/{date}/ | 
*RestApi* | [**rest_newids_read**](docs/RestApi.md#rest_newids_read) | **GET** /rest/v{api_version}/newids/{newid}/ | 
*RestApi* | [**rest_newnet_caches_auth_create**](docs/RestApi.md#rest_newnet_caches_auth_create) | **POST** /rest/v{api_version}/newnet/caches/auth/ | 
*RestApi* | [**rest_newnet_caches_auth_read**](docs/RestApi.md#rest_newnet_caches_auth_read) | **GET** /rest/v{api_version}/newnet/caches/auth/{auth_hash}/ | 
*RestApi* | [**rest_newnet_caches_pay_create**](docs/RestApi.md#rest_newnet_caches_pay_create) | **POST** /rest/v{api_version}/newnet/caches/pay/ | 
*RestApi* | [**rest_newnet_caches_pay_read**](docs/RestApi.md#rest_newnet_caches_pay_read) | **GET** /rest/v{api_version}/newnet/caches/pay/{pay_hash}/ | 
*RestApi* | [**rest_oracles_read**](docs/RestApi.md#rest_oracles_read) | **GET** /rest/v{api_version}/oracles/{oracle_id}/ | 
*RestApi* | [**rest_proofs_create**](docs/RestApi.md#rest_proofs_create) | **POST** /rest/v{api_version}/proofs/ | 
*RestApi* | [**rest_proofs_delete**](docs/RestApi.md#rest_proofs_delete) | **DELETE** /rest/v{api_version}/proofs/{proof_hash}/ | 
*RestApi* | [**rest_proofs_read**](docs/RestApi.md#rest_proofs_read) | **GET** /rest/v{api_version}/proofs/{proof_hash}/ | 
*RestApi* | [**rest_proofs_receipts_create**](docs/RestApi.md#rest_proofs_receipts_create) | **POST** /rest/v{api_version}/proofs/receipts/ | 

## Documentation For Models

 - [AuthCacheRequest](docs/AuthCacheRequest.md)
 - [AuthCacheResponse](docs/AuthCacheResponse.md)
 - [CancelProofRequest](docs/CancelProofRequest.md)
 - [CancelProofResponse](docs/CancelProofResponse.md)
 - [CreateAuthCacheResponse](docs/CreateAuthCacheResponse.md)
 - [CreatePayCacheResponse](docs/CreatePayCacheResponse.md)
 - [CreateProofRequest](docs/CreateProofRequest.md)
 - [CreateProofResponse](docs/CreateProofResponse.md)
 - [Dapp](docs/Dapp.md)
 - [NewchainTransactionResponse](docs/NewchainTransactionResponse.md)
 - [NewforceDailyStatsResponse](docs/NewforceDailyStatsResponse.md)
 - [NewidResponse](docs/NewidResponse.md)
 - [Order](docs/Order.md)
 - [OrderItem](docs/OrderItem.md)
 - [PayCacheRequest](docs/PayCacheRequest.md)
 - [PayCacheResponse](docs/PayCacheResponse.md)
 - [Proof](docs/Proof.md)
 - [ProofResponse](docs/ProofResponse.md)
 - [ReceiptField](docs/ReceiptField.md)
 - [RetrieveOracleResponse](docs/RetrieveOracleResponse.md)
 - [RetrieveProofReceiptsRequest](docs/RetrieveProofReceiptsRequest.md)
 - [RetrieveProofReceiptsResponse](docs/RetrieveProofReceiptsResponse.md)
 - [Thing](docs/Thing.md)

## Documentation For Authorization

 All endpoints do not require authorization.


## Author

xiawu@zeuux.org
