Пример #1
0
        /// <inheritdoc />
        public async Task <IChats> GetChatsAsync(IReadOnlyList <int> ids, CancellationToken cancellationToken = default(CancellationToken))
        {
            ClientSettings.EnsureUserAuthorized();

            var request = new RequestGetChats {
                Id = new TVector <int>(ids.ToArray())
            };

            return(await RequestSender.SendRequestAsync(request, cancellationToken).ConfigureAwait(false));
        }
Пример #2
0
        /// <summary>
        /// Returns chat basic info on their IDs.
        /// </summary>
        /// <param name="ids">Identifiers of chats</param>
        /// <returns>
        /// Object contains list of chats with auxiliary data.
        /// </returns>
        public async Task <IChats> GetChatsAsync(TVector <int> ids)
        {
            EnsureUserAuthorized();

            var request = new RequestGetChats {
                Id = ids
            };

            return(await SenderService.SendRequestAsync(request).ConfigureAwait(false));
        }
Пример #3
0
        /// <summary>Returns chat basic info on their IDs.</summary>
        /// <param name="ids">Identifiers of chats</param>
        /// <returns>Object contains list of chats with auxiliary data.</returns>
        public async Task <IChats> GetChatsAsync(TVector <int> ids, CancellationToken cancellationToken = default(CancellationToken))
        {
            AuthApiService.EnsureUserAuthorized();

            var request = new RequestGetChats {
                Id = ids
            };

            return(await SenderService.SendRequestAsync(request, cancellationToken).ConfigureAwait(false));
        }