REST API and users
- 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