Introduce a GetPosts method to the base plugin API. This should serve as the basis for all bulk queries of Posts.
type GetPostsOptions struct {
// PostTypes optionally limits the types of posts to return.
// See model.POST*JOIN_CHANNEL, model.POST_JOIN*TEAM...
PostTypes []string
// UserIds optionally limits the posts to those created by the given users.
UserIds []string
// ChannelIds optionally limits the posts to those created in the given channels.
ChannelIds []string
// Since optionally limits posts to those created after a specified time as Unix time in milliseconds
Since int64
// IncludeDeleted includes deleted posts if set.
IncludeDeleted bool
// Page limits to the requested page of results.
Page int
// PerPage limits the number of results to fetch per page.
PerPage int
}
GetPosts(options model.GetPostsOptions) (*model.PostList, *model.AppError)
We may later build plugin helpers upon this RPC method to streamline certain kinds of queries, e.g. get all posts by a user, get all posts in a channel and so on.
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
hey guys, I'd love to work on this one.
Hey @letsila, touching base to see if you're still working on this one. If you have questions, let us know :)
Hi @jasonblais, I am still on this one, sorry for the delay.
@letsila Sounds good, thanks so much for the quick response 馃憤
I like to work on this @letsila
@tharun208 go ahead. I didn't make a lot of progress on this one so far.
Thanks all, reassigned to @tharun208 :)
Hi @jasonblais, can the GetPostsOptions type
can go very well go inside post_list
model right ?
I'm not sure actually - @iomodo or @hanzei would you be open to help with the above?
@tharun208 Yes, that works :+1:
@hanzei I could take this one if @tharun208 is okay with that
@tharun208 Are you still working on this issue?
@hanzei, I am almost there, some doubts there, is there any slack group to contact you?
There is a Mattermost Server :wink: Please ask your Question in the ~Toolkit channel on the Mattermost Community Server).
@tharun208 Did you receive guidance on the Mattermost community server linked above? We'd be happy to help :)
i am almost there ! will raise a PR soon
But, I see already there is a GetPosts
method in the store
.But that won't fit in our case, so we need to create a new store function for the GetPosts
method right ?. Am I correct?
@iomodo would you be open to helping with the above? (cc @hanzei)
@tharun208 That is correct. Please let me know if you have any other questions.
@tharun208 Are you still working on this issue?
@hanzei no i am not
@hanzei can I work on this issue?
Most helpful comment
@hanzei can I work on this issue?