Create a post
Call the create_post() function to create a Post Message.
Returns
The post object that was just created.
Usage
Required Arguments
account - Account | Address the Post should be associated with or the address that submitted the Post. |
post_content - Any | The content to save to the To take full advantage of the search abilities, make the post_content an object with a |
post_type - string | A lowercase string of your choice for the
ex: |
post_content has a limit size of just under 16Mb, the biggest document size on MongoDB.
To save a document above 16Mb, the content should be stored in a Store Item and then make a reference for the item in a Post.
[Next Release] Right now there is a limit of about 1Mb on the post_content.
Optional Arguments
4. ref - Any
Default: None
A searchable reference string of your choice to save to theitem_content.ref
. Can be the reference to another post, an address, transaction hash, etc.5. address - string
Default: None
Address the Post should be associated with or the address that submitted the Post. To post on behalf of an address that is not the account signing see the aggregate section on security key6. channel - string
Default: "TEST"
Channel of the message. Ideally, an application would decide and use one channel.7. session
Default: None
8. api_server - string
Default: "https://api2.aleph.im"
Target API server9. 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.
10. storage_engine - string
Default: "storage"
Storage engine to use. Possible values:"storage"
, "ipfs"
Example
Last updated