Skip to content

Latest commit

 

History

History
229 lines (164 loc) · 7.56 KB

AaveApi.md

File metadata and controls

229 lines (164 loc) · 7.56 KB

moonsdk.api.AaveApi

Load the API package

import 'package:moonsdk/api.dart';

All URIs are relative to https://beta.usemoon.ai

Method HTTP request Description
borrow POST /aave/{name}/borrow
lend POST /aave/{name}/lend
repay POST /aave/{name}/repay
userReserveData POST /aave/{name}/user-reserve-data

borrow

TransactionAPIResponse borrow(authorization, name, aaveInput)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getAaveApi();
final String authorization = authorization_example; // String | 
final String name = name_example; // String | 
final AaveInput aaveInput = ; // AaveInput | 

try {
    final response = api.borrow(authorization, name, aaveInput);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AaveApi->borrow: $e\n');
}

Parameters

Name Type Description Notes
authorization String
name String
aaveInput AaveInput

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

lend

TransactionAPIResponse lend(authorization, name, aaveInput)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getAaveApi();
final String authorization = authorization_example; // String | 
final String name = name_example; // String | 
final AaveInput aaveInput = ; // AaveInput | 

try {
    final response = api.lend(authorization, name, aaveInput);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AaveApi->lend: $e\n');
}

Parameters

Name Type Description Notes
authorization String
name String
aaveInput AaveInput

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

repay

TransactionAPIResponse repay(authorization, name, aaveInput)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getAaveApi();
final String authorization = authorization_example; // String | 
final String name = name_example; // String | 
final AaveInput aaveInput = ; // AaveInput | 

try {
    final response = api.repay(authorization, name, aaveInput);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AaveApi->repay: $e\n');
}

Parameters

Name Type Description Notes
authorization String
name String
aaveInput AaveInput

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

userReserveData

AaveReservesAPIResponse userReserveData(authorization, name, aaveInput)

Example

import 'package:moonsdk/api.dart';
// TODO Configure API key authorization: ApiKeyAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('ApiKeyAuth').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: BearerAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('BearerAuth').apiKeyPrefix = 'Bearer';

final api = Moonsdk().getAaveApi();
final String authorization = authorization_example; // String | 
final String name = name_example; // String | 
final AaveInput aaveInput = ; // AaveInput | 

try {
    final response = api.userReserveData(authorization, name, aaveInput);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AaveApi->userReserveData: $e\n');
}

Parameters

Name Type Description Notes
authorization String
name String
aaveInput AaveInput

Return type

AaveReservesAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]