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 | 获取/设置 | 获取项目设置 |