getPreference method

Future<String> getPreference(
  1. String key
)

Returns the value of a preference of the current user.

Note that these keys are deprecated:

  • jira.user.locale The locale of the user. By default this is not set and the user takes the locale of the instance.
  • jira.user.timezone The time zone of the user. By default this is not set and the user takes the timezone of the instance.

Use Update a user profile from the user management REST API to manage timezone and locale instead.

Permissions required: Permission to access Jira.

Implementation

Future<String> getPreference(String key) async {
  return await _client.send(
    'get',
    'rest/api/3/mypreferences',
    queryParameters: {
      'key': key,
    },
  ) as String;
}