updateChannelRolesWithHttpInfo method
Future<Response>
updateChannelRolesWithHttpInfo(
- String channelId,
- String userId,
- MmUpdateUserRolesRequest mmUpdateUserRolesRequest
Update channel roles
Update a user's roles for a channel. ##### Permissions Must have manage_channel_roles
permission for the channel.
Note: This method returns the HTTP Response
.
Parameters:
-
String channelId (required): Channel GUID
-
String userId (required): User GUID
-
MmUpdateUserRolesRequest mmUpdateUserRolesRequest (required): Space-delimited channel roles to assign to the user
Implementation
Future<Response> updateChannelRolesWithHttpInfo(
String channelId,
String userId,
MmUpdateUserRolesRequest mmUpdateUserRolesRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/channels/{channel_id}/members/{user_id}/roles'
.replaceAll('{channel_id}', channelId)
.replaceAll('{user_id}', userId);
// ignore: prefer_final_locals
Object? postBody = mmUpdateUserRolesRequest;
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,
);
}