just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
243 lines
6.4 KiB
Markdown
243 lines
6.4 KiB
Markdown
# fintracker_api.api.ImportsApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**importsCommit**](ImportsApi.md#importscommit) | **POST** /api/v1/imports/{import_id}/commit | Commit
|
|
[**importsCreate**](ImportsApi.md#importscreate) | **POST** /api/v1/imports | Create
|
|
[**importsDelete**](ImportsApi.md#importsdelete) | **DELETE** /api/v1/imports/{import_id} | Delete
|
|
[**importsGet**](ImportsApi.md#importsget) | **GET** /api/v1/imports/{import_id} | Get
|
|
[**importsList**](ImportsApi.md#importslist) | **GET** /api/v1/imports | List
|
|
|
|
|
|
# **importsCommit**
|
|
> ImportResult importsCommit(importId, commitRequest)
|
|
|
|
Commit
|
|
|
|
Write the file's events into the ledger and rebuild every metric.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getImportsApi();
|
|
final int importId = 56; // int |
|
|
final CommitRequest commitRequest = ; // CommitRequest |
|
|
|
|
try {
|
|
final response = api.importsCommit(importId, commitRequest);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling ImportsApi->importsCommit: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**importId** | **int**| |
|
|
**commitRequest** | [**CommitRequest**](CommitRequest.md)| |
|
|
|
|
### Return type
|
|
|
|
[**ImportResult**](ImportResult.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)
|
|
|
|
# **importsCreate**
|
|
> ImportPreview importsCreate(file, accountId, parser)
|
|
|
|
Create
|
|
|
|
Upload a report, parse it and show what committing it would do. Writes no event.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getImportsApi();
|
|
final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | the report itself
|
|
final int accountId = 56; // int | target account, if known
|
|
final String parser = parser_example; // String | force a parser from registry.names()
|
|
|
|
try {
|
|
final response = api.importsCreate(file, accountId, parser);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling ImportsApi->importsCreate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**file** | **MultipartFile**| the report itself |
|
|
**accountId** | **int**| target account, if known | [optional]
|
|
**parser** | **String**| force a parser from registry.names() | [optional]
|
|
|
|
### Return type
|
|
|
|
[**ImportPreview**](ImportPreview.md)
|
|
|
|
### Authorization
|
|
|
|
[HTTPBearer](../README.md#HTTPBearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: multipart/form-data
|
|
- **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)
|
|
|
|
# **importsDelete**
|
|
> importsDelete(importId)
|
|
|
|
Delete
|
|
|
|
Drop an uncommitted import. A committed one stays: `raw_*` is append-only.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getImportsApi();
|
|
final int importId = 56; // int |
|
|
|
|
try {
|
|
api.importsDelete(importId);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling ImportsApi->importsDelete: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**importId** | **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)
|
|
|
|
# **importsGet**
|
|
> ImportPreview importsGet(importId)
|
|
|
|
Get
|
|
|
|
The preview again — recomputed for an uncommitted import, replayed for a committed one.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getImportsApi();
|
|
final int importId = 56; // int |
|
|
|
|
try {
|
|
final response = api.importsGet(importId);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling ImportsApi->importsGet: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**importId** | **int**| |
|
|
|
|
### Return type
|
|
|
|
[**ImportPreview**](ImportPreview.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)
|
|
|
|
# **importsList**
|
|
> List<ImportSummary> importsList(status, limit, offset)
|
|
|
|
List
|
|
|
|
Newest imports first, with the counters each was committed with.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getImportsApi();
|
|
final String status = status_example; // String | uploaded | parsed | committed | failed
|
|
final int limit = 56; // int |
|
|
final int offset = 56; // int |
|
|
|
|
try {
|
|
final response = api.importsList(status, limit, offset);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling ImportsApi->importsList: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**status** | **String**| uploaded | parsed | committed | failed | [optional]
|
|
**limit** | **int**| | [optional] [default to 50]
|
|
**offset** | **int**| | [optional] [default to 0]
|
|
|
|
### Return type
|
|
|
|
[**List<ImportSummary>**](ImportSummary.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)
|
|
|