Create and update Posts
This section covers how to create and update posts on the Subsocial blockchain.
#
Create A PostParams | Description |
---|---|
spaceIdOpt | The space where a post will be published. |
extension | A kind of post. It can be a regular post, a shared post or a comment. |
content | IpfsContent is a function that returns a substrate like implementation for enum { IPFS: "CID of your content"}. |
๐ PostExtensionEnum: RegularPost | Comment | SharedPost
Examples:
#
A Regular Post#
A Shared Post#
Update A PostParams | Description |
---|---|
postId | The ID of the current space. |
update | The fields available to be updated. |
Update properties
Properties | Description |
---|---|
spaceId? | If a new spaceId is provided, it will move this post to the new space. |
content? | IpfsContent is a function that returns a substrate like implementation for enum { IPFS: "CID of your content"}. |
hidden? | boolean, if post is hidden from other users. |
Example: