static async public Task <PostList> SearchPosts(Api api, string team_id, PostSearchQuery search) { JObject j = await api.GetAsync(Api.Combine("teams", team_id, "posts", "search"), search); PostList result = j.ConvertToObject <PostList>(); result.Request = search ?? new PostSearchQuery(); result.List = result.Convert(j).List; return(result); }
static async public Task <PostList> GetPosts(Api api, string channel_id, PostQuery range = null) { JObject j = await api.GetAsync(Api.Combine("channels", channel_id, "posts"), range); PostList result = j.ConvertToObject <PostList>(); result.Request = range ?? new PostQuery(); result.List = result.Convert(j).List; return(result); }