getPost
query.
It will return the Post
object that represents both - post and comment:
Parameter | Type | Description |
---|---|---|
id | ID | Required. The post entity ID. |
text | String | Required. The post text. Will be returned as a markup with all included available tags (<a> , <p> , <br> ). |
authorUserContext | UserContext | Contains the post author user context data. |
created | Int | Required. Timestamp when the post was created. |
parentPost | Post | Contain the parent post for a comment. Will be empty if a post is returned. |
cta | [CTA] | Contains the list of Call To Action objects available for the given post. |
commentsNumber | Int | Contains the number of related comments for the post. Will return NULL for a comment. |
isLiked | Boolean | Required. Represents the like flag. If TRUE, the post is liked by the current API user. |
isPinned | Boolean | Required. Represents the pin flag. If TRUE, the post is pinned by the current API user. Only posts can be pinned, not comments. |
likesNumber | Int | Required. Contains the number of “like” reactions for the given post. |
sharedContent | PostSharedContent | Represents the data of the content that was shared in the post (learning path or certificate). Available only for posts and empty for a comment. |
PostSharedContent
object
Parameter | Type | Description |
---|---|---|
id | ID | Required. ID of the shared content (a learning path or a certificate). |
type | PostSharedContentType | Required. Available options: LEARNING_PATH or CERTIFICATE . |
title | String | Required. The content title. |
description | String | The content description (available only for a learning path). |
image | MediaImage | Represents an image associated with the shared content. |
earnedOn | Int | A timestamp of the date when the award was earned (available only for the certificates). |
COMMENT_POST
- allows executing createPostComment
mutation to add a comment to a post.PIN_POST
- allows executing of pinPost
mutation to mark the given post as pinned for the current API user.UNPIN_POST
- unpins the previously pinned post; corresponding mutation - unpinPost
.EDIT_POST
- allows to update the post/comment text and available only for the author; corresponding mutation - editPost
.DELETE_POST
- available for the author or the user associated with a context with ADMINISTRATOR
scope; corresponding mutation - deletePost
.HIDE_POST
- hides the post for the current API user; corresponding mutation - hidePost
.TOGGLE_LIKE
- allows executing of the toggleLike
mutation to add/remove “like” reaction on the post.REMOVE_CONNECTION
- removes the post author from the current user network; corresponding mutation - removeUserConnection
.