just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
5.0 KiB
fintracker_api.api.IncomeApi
Load the API package
import 'package:fintracker_api/api.dart';
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| incomeCalendar | GET /api/v1/income/calendar | Calendar |
| incomeForecast | GET /api/v1/income/forecast | Forecast |
| incomeHistory | GET /api/v1/income/history | History |
incomeCalendar
CalendarOut incomeCalendar(scope, dateFrom, dateTo, includePaid)
Calendar
Payments in a window, one row each; defaults to the next 12 months, forecast only.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getIncomeApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
final DateTime dateFrom = 2013-10-20; // DateTime |
final DateTime dateTo = 2013-10-20; // DateTime |
final bool includePaid = true; // bool |
try {
final response = api.incomeCalendar(scope, dateFrom, dateTo, includePaid);
print(response);
} on DioException catch (e) {
print('Exception when calling IncomeApi->incomeCalendar: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
| dateFrom | DateTime | [optional] | |
| dateTo | DateTime | [optional] | |
| includePaid | bool | [optional] [default to false] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
incomeForecast
ForecastOut incomeForecast(scope, months)
Forecast
Expected income per month, split by basis, plus the yield it implies.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getIncomeApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
final int months = 56; // int |
try {
final response = api.incomeForecast(scope, months);
print(response);
} on DioException catch (e) {
print('Exception when calling IncomeApi->incomeForecast: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
| months | int | [optional] [default to 12] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
incomeHistory
HistoryOut incomeHistory(scope, group, dateFrom, dateTo, kind)
History
Income actually received, grouped by month, kind and currency. group exists for the contract's sake and accepts only month: the table is stored monthly, and a finer grouping would have to re-read the ledger, which is what the calendar's paid rows already do per payment.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getIncomeApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
final String group = group_example; // String | month
final DateTime dateFrom = 2013-10-20; // DateTime |
final DateTime dateTo = 2013-10-20; // DateTime |
final String kind = kind_example; // String | dividend | coupon | …
try {
final response = api.incomeHistory(scope, group, dateFrom, dateTo, kind);
print(response);
} on DioException catch (e) {
print('Exception when calling IncomeApi->incomeHistory: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
| group | String | month | [optional] [default to 'month'] |
| dateFrom | DateTime | [optional] | |
| dateTo | DateTime | [optional] | |
| kind | String | dividend | coupon |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]