Skip to content

Commit

Permalink
Merge pull request #3 from zarbanio/fix/update-examples
Browse files Browse the repository at this point in the history
fix(examples): update examples phase 1
  • Loading branch information
arashalaei authored Dec 16, 2024
2 parents 7df1403 + 9622e48 commit 551b981
Show file tree
Hide file tree
Showing 219 changed files with 4,699 additions and 124 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ print(response)

## Usage Examples

For detailed usage examples, see our [Examples Documentation](docs).
For detailed usage examples, see our [Examples Documentation](docs/examples).

### Advanced Usage

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions docs/service/Account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Account

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**points** | **int** | The number of points the account has. |
**address** | **str** | Ethereum address of the account |
**wallet_balance** | [**WalletBalance**](WalletBalance.md) | |
**net_worth** | **dict(str, str)** | |
**total_debt** | **dict(str, str)** | |
**total_deposits** | **dict(str, str)** | |
**lendingpool_summary** | [**AccountLendingpoolSummary**](AccountLendingpoolSummary.md) | |
**stabelcoin_system_summary** | [**AccountStablecoinSystemSummary**](AccountStablecoinSystemSummary.md) | |
**staking_summary** | [**AccountStakingSummary**](AccountStakingSummary.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


20 changes: 20 additions & 0 deletions docs/service/AccountLendingpoolSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# AccountLendingpoolSummary

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total_debt** | **dict(str, str)** | |
**total_deposits** | **dict(str, str)** | |
**total_collateral** | **dict(str, str)** | |
**health_factor** | **str** | Health factor in lending pool |
**net_apy** | **str** | Net annual percentage yield in lending pool |
**total_supply_apy** | **str** | Total supply rate in lending pool for account |
**total_borrow_apy** | **str** | Total borrow rate in lending pool for account |
**available_to_borrow** | **dict(str, str)** | |
**borrow_power_used** | **str** | Borrow power used in lending pool |
**current_liquidation_threshold** | **str** | Current liquidation threshold in lending pool |
**loan_to_value** | **str** | Loan to value in lending pool |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions docs/service/AccountStablecoinSystemSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AccountStablecoinSystemSummary

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total_debt** | **dict(str, str)** | |
**total_deposits** | **dict(str, str)** | |
**net_apy** | **str** | Net annual percentage yield in stablecoin system |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions docs/service/AccountStakingSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AccountStakingSummary

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total_stake** | **dict(str, str)** | |
**unclaimed_reward** | **dict(str, str)** | |
**net_apy** | **str** | Net annual percentage yield in staking contract |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


74 changes: 74 additions & 0 deletions docs/service/AccountsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# zarban.service.openapi_client.AccountsApi

All URIs are relative to *https://api.zarban.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_account_by_address**](AccountsApi.md#get_account_by_address) | **GET** /v2/accounts/{address} | Get account by address


# **get_account_by_address**
> Account get_account_by_address(address)
Get account by address

Get account by address

### Example

```python
from __future__ import print_function
import time
import zarban.service.openapi_client
from zarban.service.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.zarban.io
# See configuration.py for a list of all supported configuration parameters.
configuration = zarban.service.openapi_client.Configuration(
host = "https://api.zarban.io"
)


# Enter a context with an instance of the API client
with zarban.service.openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = zarban.service.openapi_client.AccountsApi(api_client)
address = '0x1234567890123456789012345678901234567890' # str | Ethereum address of the account

try:
# Get account by address
api_response = api_instance.get_account_by_address(address)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountsApi->get_account_by_address: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**address** | **str**| Ethereum address of the account |

### Return type

[**Account**](Account.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Account details | - |
**400** | Bad request | - |
**404** | Not found | - |
**500** | Internal server error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

11 changes: 11 additions & 0 deletions docs/service/Address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Address

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **str** | The label of the address. |
**address** | **str** | The Ethereum address. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


10 changes: 10 additions & 0 deletions docs/service/AddressResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# AddressResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**list[Address]**](Address.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


71 changes: 71 additions & 0 deletions docs/service/AddressesApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# zarban.service.openapi_client.AddressesApi

All URIs are relative to *https://api.zarban.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_all_addresses**](AddressesApi.md#get_all_addresses) | **GET** /v2/addresses | Get all addresses


# **get_all_addresses**
> AddressResponse get_all_addresses(format=format)
Get all addresses

All addresses knows to Zarban.

### Example

```python
from __future__ import print_function
import time
import zarban.service.openapi_client
from zarban.service.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.zarban.io
# See configuration.py for a list of all supported configuration parameters.
configuration = zarban.service.openapi_client.Configuration(
host = "https://api.zarban.io"
)


# Enter a context with an instance of the API client
with zarban.service.openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = zarban.service.openapi_client.AddressesApi(api_client)
format = 'format_example' # str | The type of addresses to return (optional)

try:
# Get all addresses
api_response = api_instance.get_all_addresses(format=format)
pprint(api_response)
except ApiException as e:
print("Exception when calling AddressesApi->get_all_addresses: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**format** | **str**| The type of addresses to return | [optional]

### Return type

[**AddressResponse**](AddressResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A JSON object with addresses | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

11 changes: 11 additions & 0 deletions docs/service/Balance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Balance

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | [**Token**](Token.md) | |
**balance** | **dict(str, str)** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


14 changes: 14 additions & 0 deletions docs/service/BasicEvent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# BasicEvent

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | Identifier for the event. |
**name** | [**EventName**](EventName.md) | |
**type** | [**EventType**](EventType.md) | |
**domain** | [**EventDomain**](EventDomain.md) | |
**raw** | [**Log**](Log.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


79 changes: 79 additions & 0 deletions docs/service/BorrowsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# zarban.service.openapi_client.BorrowsApi

All URIs are relative to *https://api.zarban.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_user_borrows**](BorrowsApi.md#get_user_borrows) | **GET** /v2/lendingpool/borrows | Get user borrows of lendingpool


# **get_user_borrows**
> UserBorrowsResponse get_user_borrows(user=user, reserve=reserve, cursor=cursor, limit=limit)
Get user borrows of lendingpool

Get user borrows of lendingpool

### Example

```python
from __future__ import print_function
import time
import zarban.service.openapi_client
from zarban.service.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.zarban.io
# See configuration.py for a list of all supported configuration parameters.
configuration = zarban.service.openapi_client.Configuration(
host = "https://api.zarban.io"
)


# Enter a context with an instance of the API client
with zarban.service.openapi_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = zarban.service.openapi_client.BorrowsApi(api_client)
user = 'user_example' # str | Ethereum address of the user (optional)
reserve = 'reserve_example' # str | Ethereum address of the reserve (optional)
cursor = 56 # int | Cursor for pagination (optional)
limit = 50 # int | Limit the number of deposits returned (default is 50) (optional) (default to 50)

try:
# Get user borrows of lendingpool
api_response = api_instance.get_user_borrows(user=user, reserve=reserve, cursor=cursor, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling BorrowsApi->get_user_borrows: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | **str**| Ethereum address of the user | [optional]
**reserve** | **str**| Ethereum address of the reserve | [optional]
**cursor** | **int**| Cursor for pagination | [optional]
**limit** | **int**| Limit the number of deposits returned (default is 50) | [optional] [default to 50]

### Return type

[**UserBorrowsResponse**](UserBorrowsResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | List of user borrows | - |
**400** | Bad request | - |
**500** | Internal server error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

12 changes: 12 additions & 0 deletions docs/service/ChainActivity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ChainActivity

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**step_number** | **int** | |
**number_of_steps** | **int** | |
**steps** | [**list[ChainActivityStep]**](ChainActivityStep.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions docs/service/ChainActivityStep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ChainActivityStep

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | |
**data** | [**ChainActivityStepData**](ChainActivityStepData.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


18 changes: 18 additions & 0 deletions docs/service/ChainActivityStepData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ChainActivityStepData

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | |
**label** | **dict(str, str)** | |
**gas_use_estimate** | **int** | |
**gas_fee_estimate** | **dict(str, str)** | |
**method_parameters** | [**MethodParameters**](MethodParameters.md) | |
**name** | **str** | The name of the EIP712 signature |
**typed_data** | [**TypedData**](TypedData.md) | |
**hash** | **str** | The hash of the EIP712 signature that needs to be signed |
**message** | **str** | The message that needs to be signed |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit 551b981

Please sign in to comment.