listCommandsWithHttpInfo method
List commands for a team
List commands for a team. ##### Permissions manage_slash_commands
if need list custom commands.
Note: This method returns the HTTP Response
.
Parameters:
Implementation
Future<Response> listCommandsWithHttpInfo({
String? teamId,
bool? customOnly,
}) async {
// ignore: prefer_const_declarations
final path = r'/commands';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (teamId != null) {
queryParams.addAll(_queryParams('', 'team_id', teamId));
}
if (customOnly != null) {
queryParams.addAll(_queryParams('', 'custom_only', customOnly));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}