Esempio n. 1
0
        public async Task <Conversation> OpenUserConversation(string userId)
        {
            var res = await Client.APIRequestWithTokenAsync <JoinDirectMessageChannelResponse>(
                new Tuple <string, string>("users", userId),
                new Tuple <string, string>("return_im", "true")
                );

            res.AssertOk();
            return(res.channel);
        }
Esempio n. 2
0
        public async Task <List <string> > ChannelMembers(string channelName)
        {
            var channel   = this.Channels.Single(c => c.name == channelName);
            var channelId = channel.id;
            var res       = await Client.APIRequestWithTokenAsync <ConversationMembers>(
                new Tuple <string, string>("channel", channelId),
                new Tuple <string, string>("limit", "800")
                );

            res.AssertOk();

            return(res.members.ToList());
        }