Forum Discussion

catherine_OTX's avatar
14 years ago

REST API and users

How do I find the rest call that lists how many posts are new to a user once they login? Thanks! Catherine
  • AdamT's avatar
    14 years ago

    Hi, Catherine.

     

    Getting the number of posts that are new is actually done by getting the total number of posts for a given node (board, category, etc.), then subtracting the number of posts the user has read. It's a bit round-about, but it gets the job done. Hopefully in the future, we'll have a method that merges both operations into a single REST call. The two calls might look like this:

     

    http://community.company.com/company/restapi/vc/boards/id/myboard/posts/count
    http://community.company.com/company/restapi/vc/boards/id/myboard/messages/read/count

    One thing to note about this method for getting unread posts, however, is that it will not work at the community level. While you can get the number of posts at the community level, you cannot get the number of posts the user has read. That call is restricted to categories, and any leaf nodes (boards, blogs, idea exchanges, etc.). I've run into this issue in the past, but my development team assures me it is not an insignificant addition, unfortunately.

     

    Hope that helps,

    Adam