chore(app): сгенерированный Dart-клиент
just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
This commit is contained in:
@@ -0,0 +1,226 @@
|
||||
# fintracker_api.api.BenchmarksApi
|
||||
|
||||
## Load the API package
|
||||
```dart
|
||||
import 'package:fintracker_api/api.dart';
|
||||
```
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**benchmarksBenchmarks**](BenchmarksApi.md#benchmarksbenchmarks) | **GET** /api/v1/analytics/benchmarks | Benchmarks
|
||||
[**benchmarksCreate**](BenchmarksApi.md#benchmarkscreate) | **POST** /api/v1/benchmarks | Create
|
||||
[**benchmarksDelete**](BenchmarksApi.md#benchmarksdelete) | **DELETE** /api/v1/benchmarks/{benchmark_id} | Delete
|
||||
[**benchmarksList**](BenchmarksApi.md#benchmarkslist) | **GET** /api/v1/benchmarks | List
|
||||
[**benchmarksPatch**](BenchmarksApi.md#benchmarkspatch) | **PATCH** /api/v1/benchmarks/{benchmark_id} | Patch
|
||||
|
||||
|
||||
# **benchmarksBenchmarks**
|
||||
> BenchmarkComparison benchmarksBenchmarks(scope, period)
|
||||
|
||||
Benchmarks
|
||||
|
||||
The portfolio's TWR beside each benchmark's, on the same grid of days. `days_skipped` is returned on both sides and is not cosmetic: a non-zero value on either means the two chains did not cover the same days, and the difference is then an approximation of an excess return rather than one.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:fintracker_api/api.dart';
|
||||
|
||||
final api = FintrackerApi().getBenchmarksApi();
|
||||
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
|
||||
final List<String?> period = ; // List<String?> | repeatable: 1m 3m 6m ytd 1y 3y all
|
||||
|
||||
try {
|
||||
final response = api.benchmarksBenchmarks(scope, period);
|
||||
print(response);
|
||||
} on DioException catch (e) {
|
||||
print('Exception when calling BenchmarksApi->benchmarksBenchmarks: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**scope** | **String**| all | account:<id> | portfolio:<id> | [optional] [default to 'all']
|
||||
**period** | [**List<String?>**](String.md)| repeatable: 1m 3m 6m ytd 1y 3y all | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**BenchmarkComparison**](BenchmarkComparison.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[HTTPBearer](../README.md#HTTPBearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
[[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)
|
||||
|
||||
# **benchmarksCreate**
|
||||
> BenchmarkOut benchmarksCreate(benchmarkCreate)
|
||||
|
||||
Create
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:fintracker_api/api.dart';
|
||||
|
||||
final api = FintrackerApi().getBenchmarksApi();
|
||||
final BenchmarkCreate benchmarkCreate = ; // BenchmarkCreate |
|
||||
|
||||
try {
|
||||
final response = api.benchmarksCreate(benchmarkCreate);
|
||||
print(response);
|
||||
} on DioException catch (e) {
|
||||
print('Exception when calling BenchmarksApi->benchmarksCreate: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**benchmarkCreate** | [**BenchmarkCreate**](BenchmarkCreate.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**BenchmarkOut**](BenchmarkOut.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[HTTPBearer](../README.md#HTTPBearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
[[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)
|
||||
|
||||
# **benchmarksDelete**
|
||||
> benchmarksDelete(benchmarkId)
|
||||
|
||||
Delete
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:fintracker_api/api.dart';
|
||||
|
||||
final api = FintrackerApi().getBenchmarksApi();
|
||||
final int benchmarkId = 56; // int |
|
||||
|
||||
try {
|
||||
api.benchmarksDelete(benchmarkId);
|
||||
} on DioException catch (e) {
|
||||
print('Exception when calling BenchmarksApi->benchmarksDelete: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**benchmarkId** | **int**| |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[HTTPBearer](../README.md#HTTPBearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/problem+json
|
||||
|
||||
[[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)
|
||||
|
||||
# **benchmarksList**
|
||||
> List<BenchmarkOut> benchmarksList()
|
||||
|
||||
List
|
||||
|
||||
Every benchmark, defaults first — the order the comparison block shows them in.
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:fintracker_api/api.dart';
|
||||
|
||||
final api = FintrackerApi().getBenchmarksApi();
|
||||
|
||||
try {
|
||||
final response = api.benchmarksList();
|
||||
print(response);
|
||||
} on DioException catch (e) {
|
||||
print('Exception when calling BenchmarksApi->benchmarksList: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<BenchmarkOut>**](BenchmarkOut.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[HTTPBearer](../README.md#HTTPBearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
[[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)
|
||||
|
||||
# **benchmarksPatch**
|
||||
> BenchmarkOut benchmarksPatch(benchmarkId, benchmarkPatch)
|
||||
|
||||
Patch
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:fintracker_api/api.dart';
|
||||
|
||||
final api = FintrackerApi().getBenchmarksApi();
|
||||
final int benchmarkId = 56; // int |
|
||||
final BenchmarkPatch benchmarkPatch = ; // BenchmarkPatch |
|
||||
|
||||
try {
|
||||
final response = api.benchmarksPatch(benchmarkId, benchmarkPatch);
|
||||
print(response);
|
||||
} on DioException catch (e) {
|
||||
print('Exception when calling BenchmarksApi->benchmarksPatch: $e\n');
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**benchmarkId** | **int**| |
|
||||
**benchmarkPatch** | [**BenchmarkPatch**](BenchmarkPatch.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**BenchmarkOut**](BenchmarkOut.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[HTTPBearer](../README.md#HTTPBearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
[[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)
|
||||
|
||||
Reference in New Issue
Block a user