Портфели, создание счетов, ручные события, PATCH инструмента, ScopeCardOut, MetricsStatusOut, логотипы в HoldingOut.
163 lines
4.7 KiB
Markdown
163 lines
4.7 KiB
Markdown
# fintracker_api.api.EventsApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**eventsCreate**](EventsApi.md#eventscreate) | **POST** /api/v1/events | Create
|
|
[**eventsDelete**](EventsApi.md#eventsdelete) | **DELETE** /api/v1/events/{event_id} | Delete
|
|
[**eventsList**](EventsApi.md#eventslist) | **GET** /api/v1/events | List
|
|
|
|
|
|
# **eventsCreate**
|
|
> EventOut eventsCreate(manualEventCreate)
|
|
|
|
Create
|
|
|
|
Enter an event by hand. It is `confirmed` at once: it is the user's own statement, so it is never shadowed by the account's primary feed.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getEventsApi();
|
|
final ManualEventCreate manualEventCreate = ; // ManualEventCreate |
|
|
|
|
try {
|
|
final response = api.eventsCreate(manualEventCreate);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling EventsApi->eventsCreate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**manualEventCreate** | [**ManualEventCreate**](ManualEventCreate.md)| |
|
|
|
|
### Return type
|
|
|
|
[**EventOut**](EventOut.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)
|
|
|
|
# **eventsDelete**
|
|
> eventsDelete(eventId)
|
|
|
|
Delete
|
|
|
|
Delete an event that was entered by hand. Broker events are evidence, not ours to erase: the next sync or import would bring them straight back.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getEventsApi();
|
|
final int eventId = 56; // int |
|
|
|
|
try {
|
|
api.eventsDelete(eventId);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling EventsApi->eventsDelete: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**eventId** | **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)
|
|
|
|
# **eventsList**
|
|
> EventPage eventsList(from, to, accountId, instrumentId, kind, status, externalFlow, q, page, pageSize)
|
|
|
|
List
|
|
|
|
One page of ledger events, newest first, with RUB amounts at each own date's rate.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getEventsApi();
|
|
final DateTime from = 2013-10-20; // DateTime |
|
|
final DateTime to = 2013-10-20; // DateTime |
|
|
final int accountId = 56; // int |
|
|
final int instrumentId = 56; // int |
|
|
final EventKind kind = ; // EventKind |
|
|
final EventStatus status = ; // EventStatus |
|
|
final bool externalFlow = true; // bool | only the events XIRR reads as boundary flows
|
|
final String q = q_example; // String | substring of description or ticker
|
|
final int page = 56; // int |
|
|
final int pageSize = 56; // int |
|
|
|
|
try {
|
|
final response = api.eventsList(from, to, accountId, instrumentId, kind, status, externalFlow, q, page, pageSize);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling EventsApi->eventsList: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**from** | **DateTime**| | [optional]
|
|
**to** | **DateTime**| | [optional]
|
|
**accountId** | **int**| | [optional]
|
|
**instrumentId** | **int**| | [optional]
|
|
**kind** | [**EventKind**](.md)| | [optional]
|
|
**status** | [**EventStatus**](.md)| | [optional]
|
|
**externalFlow** | **bool**| only the events XIRR reads as boundary flows | [optional]
|
|
**q** | **String**| substring of description or ticker | [optional]
|
|
**page** | **int**| | [optional] [default to 1]
|
|
**pageSize** | **int**| | [optional] [default to 50]
|
|
|
|
### Return type
|
|
|
|
[**EventPage**](EventPage.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)
|
|
|