Yammer REST API - Message Comments and Message History

自古美人都是妖i 提交于 2019-12-19 11:31:27

问题


My goal is to gather the count of likes on every non-private message and comment in a Yammer instance (across all networks). I can currently pull all messages for a Yammer instance with the data export API, but unfortunately it does not contain the like count for the messages. I can also successfully page through messages via the REST API, however the only options for pulling messages appears to be only the original message with no comments, or the original messages, and the first 2 comments on each message. Furthermore, after about 2.5 months of messages, no additional messages are returned once you hit a message ID around the 2.5 month mark.

So my questions are as follows:

  1. Is there a way to pull all the non-private original messages and ALL their comments via the REST API in order to get the count of likes and content type?
  2. Is there a way to pull messages and comments via the REST API that are older than 2.5 months (or 3 months)? I would like to get all messages and comments from the beginning of time for a Yammer instance.

Thank you! Nick


回答1:


For (1), use the /api/v1/messages/in_thread/{thread id}.json endpoint. You will get something like the last 20 messages (I forget if it includes the original message or not). Then, play with the older_than query parameter to get older messages within the thread, where you provide it the oldest message id you got from the previous response. – mleroy Jul 28 at 21:08

Thanks mleroy for your answer!



来源:https://stackoverflow.com/questions/25003722/yammer-rest-api-message-comments-and-message-history

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!