问题
I am trying to do some analytics on our Yammer network to see the number of members and posts in each group, and when the group was created and last modified. Is there an easyish way of doing this?
I have tried the following which almost gets me there, but I think I need to use the API more effectively to begin with. This is the first time I have ever seen an API so sorry if my attempt doesn't make sense!
- Go to https://www.yammer.com/api/v1/groups.json?page=1 and copy the text to Microsoft word.
- Do the same with https://www.yammer.com/api/v1/groups.json?page=2
- Repeat for pages 3 and 4, until the file only contains []
- Do a search and replace on "description", swapping it for ^p"description" to get breaks.
- Paste it into Excel (fills column A with a long string of text)
- Use the left(), right() and find() formulas to get the information I need e.g. look for the text to the right of "last_message_at".
Using this method I get some data, but the format seems to change between pages. If I enter the same API url twice I get 2 completely different outputs so the place where I break the lines moves around. This causes me to sometimes have data for two different groups on a single line.
I hope you can give me some advice, I am open to all ideas.
Thanks,
Ger
回答1:
yes, you can
> yam.platform.request({
> // yam.request({
> url: "groups.json?mine=1",
> method: "GET",
> data: {},
> success: function (group) {
> //here is your result iterate it or display logic
>
> },
>
> error: function (group) {
> console.error("There was an error with the request.");
> }
> });
回答2:
You can use this free service to get your results.
https://www.axceler.io
来源:https://stackoverflow.com/questions/17111945/find-all-yammer-groups-on-the-network-perhaps-with-api