getPreferencesByCategoryByNameWithHttpInfo method

Future<Response> getPreferencesByCategoryByNameWithHttpInfo(
  1. String userId,
  2. String category,
  3. String preferenceName
)

Get a specific user preference

Gets a single preference for the current user with the given category and name. ##### Permissions Must be logged in as the user being updated or have the edit_other_users permission.

Note: This method returns the HTTP Response.

Parameters:

  • String userId (required): User GUID

  • String category (required): The category of a group of preferences

  • String preferenceName (required): The name of the preference

Implementation

Future<Response> getPreferencesByCategoryByNameWithHttpInfo(
  String userId,
  String category,
  String preferenceName,
) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}/preferences/{category}/name/{preference_name}'
      .replaceAll('{user_id}', userId)
      .replaceAll('{category}', category)
      .replaceAll('{preference_name}', preferenceName);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}