Note. A post can consist of either a list of images or a list of files but not both.
Create a Custom Post
If text, image, and file types post are not enough for you. You can create your own type with whatever data you need for rendering. To do this, you need to call PostRepository.createPost and pass dataType, a string that defines the type of the post so you can distinguish your new post from others, and data, an object containing whatever data you need for your post.
You can use the postForId() method in order to get a single post:
constpost=FeedRepository.postForId('post123');
Delete Post
constpost=FeedRepository.deletePost('post123');
Note. Only the post owner or an admin are able to update and/or delete a post.
Post Repository
As well as the general creation of posts, users are also able to interact with posts using the PostRepository. This repository's main purpose is to manage posts, reactions, and flags on a post.