createPost
To open the Predis.ai post creation and editing flow.
Usage
predis.createPost({
onPostPublish: function (err, data) {
console.log(err, data);
},
post_idea: "This is some brief for your post", // optional
business_details: { //optional
description: "Your business description goes here",
products: ["product 1 details", "product 2 details"],
audience: "Audience description goes here",
benefits: "Business's benefits for your audience go here"
},
hide_post_types: ["meme", "quote", "special_day"] // to hide any specific post types
}
);
tip
Call the createPost
method inside the on("ready")
callback which ensures that the SDK is ready.
Parameters
Name | Description | Type | Required |
---|---|---|---|
onPostPublish | Function to receive data when a post is published from the editor. See onPostPublish for more details. | Function | no |
post_idea | Use this to populate the Post idea in the Create New flow | String | No |
business_details.description | Use this to populate the Brand's Business description. Used in making posts in Business to Post type | String | No |
business_details.products | Use this to pass the Brand's products. Multiple products can be passed in an array. Used in making posts in Business to Post type | Array | No |
business_details.audience | Use this to pass the Brand's Audience description. Used in making posts in Business to Post type | String | No |
business_details.benefits | Use this to pass the Brand's Benefits description. Used in making posts in Business to Post type | String | No |
hide_post_types | This will make sure only specific post types are shown in the create post flow in detialed mode. Possible values are "meme", "quote", "special_day", "manual", "business", "blog", "script", "social_post_maker", "voiceover_videos", "social_media_ad_videos", "ad_creatives", "business_carousels", "presentation". Multiple values can be passed to hide more than one options. This is defaulted to none. | Array | No |