updateCommandWithHttpInfo method

Future<Response> updateCommandWithHttpInfo(
  1. String commandId,
  2. MmCommand mmCommand
)

Update a command

Update a single command based on command id string and Command struct. ##### Permissions Must have manage_slash_commands permission for the team the command is in.

Note: This method returns the HTTP Response.

Parameters:

  • String commandId (required): ID of the command to update

  • MmCommand mmCommand (required):

Implementation

Future<Response> updateCommandWithHttpInfo(
  String commandId,
  MmCommand mmCommand,
) async {
  // ignore: prefer_const_declarations
  final path = r'/commands/{command_id}'.replaceAll('{command_id}', commandId);

  // ignore: prefer_final_locals
  Object? postBody = mmCommand;

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

  const contentTypes = <String>['application/json'];

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