Documentation Index
Fetch the complete documentation index at: https://docs.opigno.com/llms.txt
Use this file to discover all available pages before exploring further.
You can retrieve an information about any post the current user has access to by calling 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/certificate/badge). Available only for posts and empty for a comment. |
images | [MediaImage] | Images shared in the post. It is possible to share up to 10 images in one post, max image size is 20 Mb. Allowed extensions: png, jpg, jpeg, gif. |
files | [MediaFile] | Files shared in the post. It is possible to share up to 10 files in one post, max file size is 20 Mb. Allowed extensions: txt, pdf, doc, docx, xls, xlsx, ppt, pptx, svg. |
community | Community | Represents the community the post relates to. Optional, will remain empty for the regular social posts. |
PostSharedContent object
| Parameter | Type | Description |
|---|
id | ID | Required. ID of the shared content (learning path/certificate/badge). |
type | PostSharedContentType | Required. Available options: LEARNING_PATH, CERTIFICATE, BADGE. |
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 or badges). |
Post CTA
| Action ID | Description | Corresponding mutation/query |
|---|
COMMENT_POST | Allows to add a comment to the given post. | createPostComment |
PIN_POST | Allows to mark the given post as pinned for the current API user. | pinPost |
UNPIN_POST | Unpins the previously pinned post. | unpinPost |
PIN_POST_FOR_COMMUNITY | Available only for community posts and can be executed by the community owner. Marks the post as pinned for all community members. | pinPostForCommunity |
UNPIN_POST_FOR_COMMUNITY | Available only for community posts and can be executed by the community owner. Unpins the previously pinned post for all community members. | unpinPostForCommunity |
EDIT_POST | Allows to update the post/comment text and available only for the author. | editPost |
DELETE_POST | Allows to delete the post. Available for the author or the user associated with a context with ADMINISTRATOR scope. | deletePost |
HIDE_POST | Hides the post for the current API user. | hidePost |
TOGGLE_LIKE | Allows to add/remove “like” reaction on the post. | toggleLike |
REMOVE_CONNECTION | Removes the post author from the current user network. | removeUserConnection |
REPORT_ABUSE | Allows to report a post or a comment as an abusive. | reportAbuse |
query getPost {
getPost(postId: 175) {
id
text
created
commentsNumber
isLiked
likesNumber
authorUserContext {
id
uuid
}
sharedContent {
id
type
title
description
earnedOn
image {
alt
title
url
}
}
cta {
actionId
title
arguments {
key
value
}
}
}
}