public async Task <IEnumerable <string> > ListChannelMemberIds(string token, string channelId)
        {
            try
            {
                var response = await _httpService.Send <SlackChannelResponse>(HttpMethod.Post, $"/conversations.members?channel={channelId}", token);

                return(response.Members);
            }
            catch
            {
                return(Enumerable.Empty <string>());
            }
        }
Example #2
0
        public async Task <IEnumerable <SlackChannel> > GetAll(string token)
        {
            try
            {
                var response = await _httpService.Send <ListSlackChannelResponse>(HttpMethod.Get, "/conversations.list", token);

                return(response.Channels);
            }
            catch
            {
                return(Enumerable.Empty <SlackChannel>());
            }
        }
Example #3
0
        public async Task <IEnumerable <SlackMember> > GetAll(string token)
        {
            try
            {
                var response = await _httpService.Send <SlackUserResponse>(HttpMethod.Get, "/users.list", token);

                return(response.Members.Where(u => !u.Is_Bot && u.Is_Owner));
            }
            catch
            {
                return(Enumerable.Empty <SlackMember>());
            }
        }