Create a post
Call the .submit() function to create a Post
Returns
The post object that was just created.
Tips Pass a ref in the optional object parameter and/or tags in your content to take full advantage of the filtering abilities later on.
Usage
Required parameters
Parameter | Description |
---|---|
address - string | Address the Post should be associated with or the address that submitted the Post. |
post_type - string | A lowercase string of your choice for the |
content - object | The content object to save to the If |
Optional parameters
In addition to the required parameters above, an object of optional parameters can be passed following the content like so:
posts.submit(address, post_type, content,
{api_server: "https://api2.aleph.im"}
)
api_server - string
Default: "https://api1.aleph.im"
Target API server
ref - string
Default: null
A searchable reference string of your choice to save to the
item_content.ref
. Can be the reference to another post, an address, transaction hash, etc.chain - string
Default: null
The chain used by the sender's account. Value can be
NULS2
,ETH
,DOT
,CSDK
,SOL
,AVAX
channel - string
Default: null
Channel of the message. Ideally, an application would decide and use one channel.
inline - boolean
Default: true
Should the message be stored as a separate file or inserted inline?
âšī¸ Set it to false for data that could fall under GDPR.
storage_engine - string either
"ipfs"
or"storage"
Default: "storage"
Storage engine to use. Possible values:
storage
,ipfs
account - Account
Default: null
Account to use for signing.
âšī¸ Needed if you want to send the message. Without it, it is a dry run.
Example: Create post
Last updated