mirror of
https://github.com/gosticks/open-project-flutter-api.git
synced 2025-10-16 11:55:34 +00:00
3.0 KiB
3.0 KiB
openapi.api.UserPreferencesApi
Load the API package
import 'package:openapi/api.dart';
All URIs are relative to https://community.openproject.org
| Method | HTTP request | Description |
|---|---|---|
| showMyPreferences | GET /api/v3/my_preferences | Show my preferences |
| updateUserPreferences | PATCH /api/v3/my_preferences | Update my preferences |
showMyPreferences
Object showMyPreferences()
Show my preferences
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: BasicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').password = 'YOUR_PASSWORD';
final api_instance = UserPreferencesApi();
try {
final result = api_instance.showMyPreferences();
print(result);
} catch (e) {
print('Exception when calling UserPreferencesApi->showMyPreferences: $e\n');
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateUserPreferences
Object updateUserPreferences(updateUserPreferencesRequest)
Update my preferences
When calling this endpoint the client provides a single object, containing the properties that it wants to change, in the body.
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: BasicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').password = 'YOUR_PASSWORD';
final api_instance = UserPreferencesApi();
final updateUserPreferencesRequest = UpdateUserPreferencesRequest(); // UpdateUserPreferencesRequest |
try {
final result = api_instance.updateUserPreferences(updateUserPreferencesRequest);
print(result);
} catch (e) {
print('Exception when calling UserPreferencesApi->updateUserPreferences: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| updateUserPreferencesRequest | UpdateUserPreferencesRequest | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/hal+json, text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]