Beispiel #1
0
        /// <summary>
        /// Add members
        /// Adds members to chat. Additional permissions may require.
        /// </summary>
        /// <param name="userIdsList">(required)</param>
        /// <param name="chatId">Chat identifier (required)</param>
        /// <returns>SimpleQueryResult</returns>
        public AddMembersQuery AddMembers(UserIdsList userIdsList, long chatId)
        {
            if (userIdsList == null)
            {
                throw new RequiredParameterMissingException("Missing the required request body when calling addMembers");
            }

            return(new AddMembersQuery(_client, userIdsList, chatId));
        }
Beispiel #2
0
 public AddMembersQuery(TamTamClient client, UserIdsList userIdsList, long chatId)
     : base(client, $"/chats/{chatId}/members", userIdsList, Method.POST)
 {
 }
Beispiel #3
0
        /// <summary>
        /// Add members.
        /// </summary>
        public async Task <IApiResponse <SimpleQueryResult> > AddMembersAsync(long chatId, UserIdsList userIds, CancellationToken cancellationToken = default)
        {
            IApiResponse <SimpleQueryResult> result = null;

            result = await SenderApi.PostAsync <SimpleQueryResult>(_connectorClient, GetApiUri($"chats/{chatId}/members?access_token={_accessToken}"), userIds, cancellationToken);

            return(result);
        }