open-project-flutter-api/doc/UserPreferencesApi.md
2023-11-05 19:54:17 +01:00

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

Object

Authorization

BasicAuth

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

Object

Authorization

BasicAuth

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]