PostsApi class

Constructors

PostsApi(Dio _dio, Serializers _serializers)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createPost({required InlineObject58 inlineObject58, bool? setOnline, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<Post>>
Create a post Create a new post in a channel. To create the post as a comment on another post, provide `root_id`. ##### Permissions Must have `create_post` permission for the channel the post is being created in.
createPostEphemeral({required InlineObject59 inlineObject59, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<Post>>
Create a ephemeral post Create a new ephemeral post in a channel. ##### Permissions Must have `create_post_ephemeral` permission (currently only given to system admin)
deletePost({required String postId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Delete a post Soft deletes a post, by marking the post as deleted in the database. Soft deleted posts will not be returned in post queries. ##### Permissions Must be logged in as the user or have `delete_others_posts` permission.
doPostAction({required String postId, required String actionId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Perform a post action Perform a post action, which allows users to interact with integrations through posts. ##### Permissions Must be authenticated and have the `read_channel` permission to the channel the post is in.
getFileInfosForPost({required String postId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<FileInfo>>>
Get file info for post Gets a list of file information objects for the files attached to a post. ##### Permissions Must have `read_channel` permission for the channel the post is in.
getFlaggedPostsForUser({required String userId, String? teamId, String? channelId, int? page = 0, int? perPage = 60, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<PostList>>>
Get a list of flagged posts Get a page of flagged posts of a user provided user id string. Selects from a channel, team, or all flagged posts by a user. Will only return posts from channels in which the user is member. ##### Permissions Must be user or have `manage_system` permission.
getPost({required String postId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<Post>>
Get a post Get a single post. ##### Permissions Must have `read_channel` permission for the channel the post is in or if the channel is public, have the `read_public_channels` permission for the team.
getPostsAroundLastUnread({required String userId, required String channelId, int? limitBefore = 60, int? limitAfter = 60, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<PostList>>
Get posts around oldest unread Get the oldest unread post in the channel for the given user as well as the posts around it. The returned list is sorted in descending order (most recent post first). ##### Permissions Must be logged in as the user or have `edit_other_users` permission, and must have `read_channel` permission for the channel. Minimum server version: 5.14
getPostsByIds({required BuiltList<String> requestBody, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<Post>>>
Get posts by a list of ids Fetch a list of posts based on the provided postIDs ##### Permissions Must have `read_channel` permission for the channel the post is in or if the channel is public, have the `read_public_channels` permission for the team.
getPostsForChannel({required String channelId, int? page = 0, int? perPage = 60, int? since, String? before, String? after, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<PostList>>
Get posts for a channel Get a page of posts in a channel. Use the query parameters to modify the behaviour of this endpoint. The parameter `since` must not be used with any of `before`, `after`, `page`, and `per_page` parameters. If `since` is used, it will always return all posts modified since that time, ordered by their create time limited till 1000. A caveat with this parameter is that there is no guarantee that the returned posts will be consecutive. It is left to the clients to maintain state and fill any missing holes in the post order. ##### Permissions Must have `read_channel` permission for the channel.
getPostThread({required String postId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<PostList>>
Get a thread Get a post and the rest of the posts in the same thread. ##### Permissions Must have `read_channel` permission for the channel the post is in or if the channel is public, have the `read_public_channels` permission for the team.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patchPost({required String postId, required InlineObject61 inlineObject61, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<Post>>
Patch a post Partially update a post by providing only the fields you want to update. Omitted fields will not be updated. The fields that can be updated are defined in the request body, all other provided fields will be ignored. ##### Permissions Must have the `edit_post` permission.
pinPost({required String postId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Pin a post to the channel Pin a post to a channel it is in based from the provided post id string. ##### Permissions Must be authenticated and have the `read_channel` permission to the channel the post is in.
searchPosts({required String teamId, required InlineObject62 inlineObject62, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<PostListWithSearchMatches>>
Search for team posts Search posts in the team and from the provided terms string. ##### Permissions Must be authenticated and have the `view_team` permission.
setPostUnread({required String userId, required String postId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<ChannelUnreadAt>>
Mark as unread from a post. Mark a channel as being unread from a given post. ##### Permissions Must have `read_channel` permission for the channel the post is in or if the channel is public, have the `read_public_channels` permission for the team. Must have `edit_other_users` permission if the user is not the one marking the post for himself. Minimum server version: 5.18
toString() String
A string representation of this object.
inherited
unpinPost({required String postId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Unpin a post to the channel Unpin a post to a channel it is in based from the provided post id string. ##### Permissions Must be authenticated and have the `read_channel` permission to the channel the post is in.
updatePost({required String postId, required InlineObject60 inlineObject60, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<Post>>
Update a post Update a post. Only the fields listed below are updatable, omitted fields will be treated as blank. ##### Permissions Must have `edit_post` permission for the channel the post is in.

Operators

operator ==(Object other) bool
The equality operator.
inherited