getPrefs method

Future<Preferences> getPrefs()

Get account preferences

Get the preferences as a key-value object for the currently logged in user.

Implementation

Future<models.Preferences> getPrefs() async {
  const String apiPath = '/account/prefs';

  final Map<String, dynamic> apiParams = {};

  final Map<String, String> apiHeaders = {
    'content-type': 'application/json',
  };

  final res = await client.call(HttpMethod.get,
      path: apiPath, params: apiParams, headers: apiHeaders);

  return models.Preferences.fromMap(res.data);
}