mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
749 B
749 B
sidebar_position
sidebar_position |
---|
4 |
Get post data
Retrieves the data of a post.
```js async function PostModel.post(payload) ```
[Object] Payload
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
post_id | string | false | Defines the ID of the post to retrieve. |
Success Response
Parameter | Type | Content |
---|---|---|
data | object | post_obj |
Examples
Basic usage
const post = await PostModel.post({
post_id: "0000",
})
console.log(post)
// result: {
// _id: "0000",
// user_id: "0000",
// message: "example text",
// ...
// }