passbase python
1.0.0
此Python軟件包將由Swagger Codegen Project自動生成:
Python 2.7和3.4+
如果Python軟件包是在GitHub上託管的,則可以直接從GitHub安裝
pip install git+https://github.com/passbase/passbase-python.git (您可能需要使用root權限運行pip : sudo pip install git+https://github.com/passbase/passbase-python.git )
然後導入包:
import passbase 通過setuptools安裝。
python setup.py install --user (或sudo python setup.py install以安裝所有用戶的軟件包)
然後導入包:
import passbase 請遵循安裝步驟,然後運行以下內容:
from __future__ import print_function
import time
import passbase
from passbase . rest import ApiException
from pprint import pprint
# Configure API key authorization: SecretApiKey
configuration = passbase . Configuration ()
configuration . api_key [ 'X-API-KEY' ] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = passbase . IdentityApi ( passbase . ApiClient ( configuration ))
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | Unique ID of the identity to return
try :
# Get identity
api_response = api_instance . get_identity_by_id ( id )
pprint ( api_response )
except ApiException as e :
print ( "Exception when calling IdentityApi->get_identity_by_id: %s n " % e )
# Configure API key authorization: SecretApiKey
configuration = passbase . Configuration ()
configuration . api_key [ 'X-API-KEY' ] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = passbase . IdentityApi ( passbase . ApiClient ( configuration ))
id = 'id_example' # str | Identity id
resource_id = 'resource_id_example' # str | Resource id
try :
# Get resource
api_response = api_instance . get_identity_resource_by_id ( id , resource_id )
pprint ( api_response )
except ApiException as e :
print ( "Exception when calling IdentityApi->get_identity_resource_by_id: %s n " % e )
# Configure API key authorization: SecretApiKey
configuration = passbase . Configuration ()
configuration . api_key [ 'X-API-KEY' ] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = passbase . IdentityApi ( passbase . ApiClient ( configuration ))
id = 'id_example' # str | Identity id
resource_id = 'resource_id_example' # str | Resource id
resource_file_id = 'resource_file_id_example' # str | Resource file id
try :
# Get resource file
api_response = api_instance . get_identity_resource_file_by_id ( id , resource_id , resource_file_id )
pprint ( api_response )
except ApiException as e :
print ( "Exception when calling IdentityApi->get_identity_resource_file_by_id: %s n " % e )
# Configure API key authorization: SecretApiKey
configuration = passbase . Configuration ()
configuration . api_key [ 'X-API-KEY' ] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = passbase . IdentityApi ( passbase . ApiClient ( configuration ))
limit = 56 # int | (optional)
cursor = 'cursor_example' # str | (optional)
try :
# List identities
api_response = api_instance . list_identities ( limit = limit , cursor = cursor )
pprint ( api_response )
except ApiException as e :
print ( "Exception when calling IdentityApi->list_identities: %s n " % e )
# Configure API key authorization: SecretApiKey
configuration = passbase . Configuration ()
configuration . api_key [ 'X-API-KEY' ] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = passbase . IdentityApi ( passbase . ApiClient ( configuration ))
id = 'id_example' # str | Identity id
limit = 56 # int | (optional)
cursor = 'cursor_example' # str | (optional)
try :
# List resources
api_response = api_instance . list_identity_resources ( id , limit = limit , cursor = cursor )
pprint ( api_response )
except ApiException as e :
print ( "Exception when calling IdentityApi->list_identity_resources: %s n " % e )所有uris均相對於https://api.passbase.com/verification/v2
| 班級 | 方法 | HTTP請求 | 描述 |
|---|---|---|---|
| Identityapi | get_identity_by_id | 獲取/身份 /{id} | 獲得身份 |
| Identityapi | get_identity_resource_by_id | get /endentity/{id}/resources/{resource_id} | 獲取資源 |
| Identityapi | get_identity_resource_file_by_id | get /endentity/{id}/resources/{resource_id}/resource_files/{resource_file_id} | 獲取資源文件 |
| Identityapi | List_Identities | 獲得/身份 | 列表身份 |
| Identityapi | list_identity_resources | 獲取/身份/{id}/資源 | 列出資源 |
| Projectapi | get_settings | 獲取/設置 | 獲取項目設置 |