Adapter
Request adapter performing actual API calls towards FIO endpoints
FIOAdapter
FIO Adapater
Initializes the FIO adapter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
Config
|
Wrapper configuration. |
required |
header |
Dict[str, str]
|
FIO Header. |
required |
Source code in fio_wrapper/fio_adapter.py
get
Performs a GET request towards endpoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
endpoint |
str
|
URL |
required |
params |
Dict
|
GET parameters. Defaults to None. |
None
|
err_codes |
List[int]
|
List of error codes to handle in calling function. Defaults to None. |
None
|
timeout |
float
|
Request timeout in seconds. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
Tuple[int, any]
|
Tuple[int, any]: Request status code and request data |
Source code in fio_wrapper/fio_adapter.py
post
Performs a POST request towards endpoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
endpoint |
str
|
URL |
required |
params |
Dict
|
POST parameters. Defaults to None. |
None
|
data |
Dict
|
POST data. Defaults to None. |
None
|
err_codes |
List[int]
|
List of error codes to handle in calling function. Defaults to None. |
None
|
timeout |
float
|
Request timeout in seconds. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
Tuple[int, any]
|
Tuple[int, any]: Request status code and request data |