addChannelMemberWithHttpInfo method

Future<Response> addChannelMemberWithHttpInfo(
  1. String channelId,
  2. MmAddChannelMemberRequest mmAddChannelMemberRequest
)

Add user to channel

Add a user to a channel by creating a channel member object.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> addChannelMemberWithHttpInfo(
  String channelId,
  MmAddChannelMemberRequest mmAddChannelMemberRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/channels/{channel_id}/members'.replaceAll('{channel_id}', channelId);

  // ignore: prefer_final_locals
  Object? postBody = mmAddChannelMemberRequest;

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

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

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