Social
To get a list of social media posts use the following:
{
"action":"get_posts",
"limit":,
"offset":
}
A successful response will contain an array of posts in JSON format with each post item containing the following:
{
"media": ,
"post": {
"author":,
"commentCount":,
"created": ,
"edited":,
"id":,
"memberId":,
"message":,
"parentId":
},
"reactions":
}
Each media item will contain:
{
"id":,
"imageData": ,
"postId":
}
Each reaction item will contain:
{
"id":,
"memberId":,
"postId":,
"reaction":
}
Create
A member can use the following POST request to create a social media post:
{
"action":"create_post",
"memberId":,
"message":,
"images":
}
If this is a comment on a post, use the same data but add “parentId” with the id of the post that this is a comment for.
Update
A member can update their own post using the following request:
{
"action":"update_post",
"id":,
"memberId":,
"message":,
"images":
}
Delete
A member can delete their own post using the following POST request:
{
"action":"delete_post",
"postId":
}
Reactions
Create
You can create a reaction to a post using the following:
{
"action":"create_post_reaction",
"postId":,
"memberId":,
"reaction":
}
Get
{
"action": "get_post_reactions",
"postId":
}
Comments
Get
{
"action":"get_post_comments",
"postId":
}
Note: Use the create post action to create comments by specifying a parentId in the request body.

