Пример #1
0
        /// <summary>
        /// Edit current bot info.
        /// </summary>
        public async Task <IApiResponse <BotInfo> > EditCurrentBotInfoAsync(BotPatch botPatch, CancellationToken cancellationToken = default)
        {
            IApiResponse <BotInfo> result = null;

            result = await SenderApi.PatchAsync <BotInfo>(_connectorClient, GetApiUri($"me?access_token={_accessToken}"), botPatch, cancellationToken);

            return(result);
        }
Пример #2
0
        /// <summary>
        /// Edit chat info.
        /// </summary>
        public async Task <IApiResponse <Chat> > EditChatInfoAsync(long chatId, ChatPatch chatPatch, CancellationToken cancellationToken = default)
        {
            IApiResponse <Chat> result = null;

            result = await SenderApi.PatchAsync <Chat>(_connectorClient, GetApiUri($"chats/{chatId}?access_token={_accessToken}"), chatPatch, cancellationToken);

            return(result);
        }