Opigno API provides an endpoint to get the list of all posts available for the current API user (created by the user themselves or by the users who are in the current user’s network). To get this data, getPostsFeed query should be called. Results will be returned with pagination, but without possibility to change the order. Posts will be sorted by the creation time, descending (the newest first).
Note: In the future will be added the possibility to change the sorting key to get the pinned posts first.
The following arguments can be used in the query:
ArgumentTypeDescriptionDefault
afterCursorReturns results that come after the specified cursor. Should be used together with first parameter. Cannot be used if before is set.
beforeCursorReturns results that come before the specified cursor. Should be used together with last parameter. Cannot be used if after is set.
firstIntegerReturns up to the first N elements from the list. Required if after parameter is set. Cannot be used together with last.
lastIntegerReturns up to the first N elements from the list. Required if before parameter is set. Cannot be used together with first.
  query getPostsFeed {
    getPostsFeed(first: 2) {
      edges {
        node {
          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
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
        endCursor
      },
      totalItems
    }
  }
The query returns the list of the Post objects. Detailed description and the full list of available properties can be found here.