openapi-generator-cli -g dart-dio. Генерируется, но коммитится: CI ловит дрейф openapi/openapi.json, а приложение собирается без запуска генератора. Пересобирается через just gen-client после любого изменения роутов.
3.2 KiB
3.2 KiB
fintracker_api.api.SyncApi
Load the API package
import 'package:fintracker_api/api.dart';
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| syncRuns | GET /api/v1/sync/runs | Runs |
| syncStatus | GET /api/v1/sync/status | Status |
| syncTrigger | POST /api/v1/sync/{source} | Trigger |
syncRuns
List syncRuns(source_, limit)
Runs
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getSyncApi();
final String source_ = source__example; // String |
final int limit = 56; // int |
try {
final response = api.syncRuns(source_, limit);
print(response);
} on DioException catch (e) {
print('Exception when calling SyncApi->syncRuns: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| source_ | String | [optional] | |
| limit | int | [optional] [default to 20] |
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]
syncStatus
List syncStatus()
Status
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getSyncApi();
try {
final response = api.syncStatus();
print(response);
} on DioException catch (e) {
print('Exception when calling SyncApi->syncStatus: $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]
syncTrigger
SyncJobOut syncTrigger(source_)
Trigger
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getSyncApi();
final String source_ = source__example; // String |
try {
final response = api.syncTrigger(source_);
print(response);
} on DioException catch (e) {
print('Exception when calling SyncApi->syncTrigger: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| source_ | String |
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]