-
Notifications
You must be signed in to change notification settings - Fork 62
Post Sharing
corsacca edited this page May 29, 2019
·
1 revision
Get
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/shares
Requires permission: view_any_{post_type}
or post is shared with user.
(array) An array of shares
Example format:
[
{
"id":"10", // the id of the share
"user_id":"1", // user the post is shared with
"post_id":"27", // the id of the post
"meta":null, // meta related to the share
"display_name":"Me" // display name of the user
},
{
...share2...
}
]
POST
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/shares
- user_id (int): the id of the user to share the post with
1
if successful
DELETE
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/shares
- user_id (int): the id of the user to unshare the post with
1
if successful