assignBotWithHttpInfo method

Future<Response> assignBotWithHttpInfo(
  1. String botUserId,
  2. String userId
)

Assign a bot to a user

Assign a bot to a specified user. ##### Permissions Must have manage_bots permission. Minimum server version: 5.10

Note: This method returns the HTTP Response.

Parameters:

  • String botUserId (required): Bot user ID

  • String userId (required): The user ID to assign the bot to.

Implementation

Future<Response> assignBotWithHttpInfo(
  String botUserId,
  String userId,
) async {
  // ignore: prefer_const_declarations
  final path =
      r'/bots/{bot_user_id}/assign/{user_id}'.replaceAll('{bot_user_id}', botUserId).replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody;

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

  const contentTypes = <String>[];

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