openapi-generator-cli -g dart-dio. Генерируется, но коммитится: CI ловит дрейф openapi/openapi.json, а приложение собирается без запуска генератора. Пересобирается через just gen-client после любого изменения роутов.
3.5 KiB
3.5 KiB
fintracker_api.api.CashflowApi
Load the API package
import 'package:fintracker_api/api.dart';
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| cashflowMonthly | GET /api/v1/cashflow/monthly | Monthly |
| cashflowRunway | GET /api/v1/runway | Runway |
| cashflowSpending | GET /api/v1/spending/categories | Spending |
cashflowMonthly
List cashflowMonthly(months)
Monthly
The last months months, oldest first.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getCashflowApi();
final int months = 56; // int |
try {
final response = api.cashflowMonthly(months);
print(response);
} on DioException catch (e) {
print('Exception when calling CashflowApi->cashflowMonthly: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| 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]
cashflowRunway
RunwayOut cashflowRunway()
Runway
How many months the liquid reserve covers; null before the first refresh.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getCashflowApi();
try {
final response = api.cashflowRunway();
print(response);
} on DioException catch (e) {
print('Exception when calling CashflowApi->cashflowRunway: $e\n');
}
Parameters
This endpoint does not need any parameter.
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]
cashflowSpending
List cashflowSpending(month)
Spending
Expenses of one month by category, largest first.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getCashflowApi();
final String month = month_example; // String | YYYY-MM; defaults to the latest month
try {
final response = api.cashflowSpending(month);
print(response);
} on DioException catch (e) {
print('Exception when calling CashflowApi->cashflowSpending: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| month | String | YYYY-MM; defaults to the latest month | [optional] |
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]