Group ID for "All Company" Group in Yammer - yammer

I'm using the Yammer REST API to fetch data about messages posted in our Yammer network.
I can get messages from any group by passing the group ID.
But I don't know the group ID for the All Company group.
How can I find the group ID for the All Company group?

Use https://www.yammer.com/api/v1/messages/general.json.
You can see the other built-in feed type endpoints such as my_feed and private here: http://developer.yammer.com/restapi/#rest-messages

Yammer API POST call with parameter group_id allows posting message to a group, but not to AllCompany.
Same POST call with parameter feed_id allows posting message to a group and to AllCompany group (feed).
Use feed_id instead of group_id and all as id.

first get all the groups
using this API
https://www.yammer.com/api/v1/groups.json
in that group array check out the group full name. and you can use id of that array item. that will be your group id.

Use https://www.yammer.com/api/v1/messages.json.
This will give All public messages in the user’s (whose access token is being used to make the API call henceforth referred to as current user) Yammer network. Corresponds to “All” conversations in the Yammer web interface.
also refer answer from by #mleroy in earlier message.

use "all" as feed id for All company group.
I know this post is a bit old but it might help someone.
On every group page of Yammer, there is a section called Access Options on the right had side.
Click on the link "Embed this group in your side". It will give you JS code for the group which will include Feed ID as well.

Using this api you can able access all messages
https://www.yammer.com/api/v1/messages.json
from the response json you can see the group id of all message groups.You can notice that 'group_created_id' is null for all company group.
I dont think that group id for all company is 'All',because that parameter is an integer,So just pass null.

Its a bit weird, but I found out that the group_created_id field is null when the message belongs to "All Company"
So you can use messages.json as mentioned before to get all public messages,
or if you want to search for messages by groups, you can get a list of groups ids and use :
https://www.yammer.com/api/v1/messages/in_group/{group-id}.json
and after that use messages.json, and go over the messages and search for those who has the field group_created_id set as null
Hope it will help someone someday :P

I had a similar requirement of embedding Yammer All company feed for which I needed the Feed ID and this worked for me-
feedType: "general",
feedId: "all"
Hope this helps!

Related

Assigned to field in Case Table- Servicenow

In Case Form,Based on the group selected in Assignment group field ,the assigned to field is listing some users which belongs to it in CRM UI.
Now I want to retrieve the same users using normal REST API. Please suggest REST API to list the users based on a group.
Users linked to groups is stored in table sys_user_grmember. In the example I search for all Users in Group named "Application Development".
GET https://YOURINSTANCE.service-now.com/api/now/table/sys_user_grmember?sysparm_query=%22groupSTARTSWITHApplication%20Development%22&sysparm_limit=10
You can easily test the REST Api with the rest api explorer from SNOW: https://YOURINSTANCE.service-now.com/nav_to.do?uri=%2F$restapi.do
Can you give more info on the exact requirement, so i can be more precise?
As far as I know, you can create a rest message to get the users inside a group and show the list wherever you want.
This would require three things from your side.
a) Creating a rest message in Snow.
b) Creating a script includes calling the rest message.
c) A client script or trigger which initiates the rest call using client script.
Hope this helps.
Regards.

Mailchimp 3.0 - Create campaign with interests - wrong number of selected members

I created a new campaign using interests. Creation is ok but when checking the campaign on Mailchimp, the number of selected members is 0 (but this is wrong). If I open the recipients tab and go back to the confirm tab (without modifying anything in recipients), then the number of selected members is correct and campaign can be sent.
Is there something special to be done to get the right number of selected members?
Thx in advance!
Edit: I am using 2 different interests group for this campaign. If I only use one, it's working.
Is the number of selected members only wrong via API call result? Or is it also incorrect on the Mailchimp dashboard?

how do I get calendar_id from Google Calendar API

I know you can get it on the settings page.
I have multiple calendars on a single account.
I can get the names back with
service.list_calendar_lists(page_token: page_token)
but how do I can the calendar ids associated with the names of the calendars
The structure that's returned from service.list_calendar_lists is a JSON that has an entry items
items is an array of calendar list items, and each array element includes id which is what you're asking for.
So something like
array_of_ids = service.list_calendar_lists(page_token: page_token)['items']map{|i| i['id']}
You can use CalendarList() with a GET request as shown in the Google Calendar API here. I tested this by retrieving my own calendar id by passing in the "primary" keyword as described in the documentation linked above.

Yammer API - List of groups for each user

I would like to get the list of groups that every user in the yammer instance belongs to. Currently it looks like the user object from both the data export API and the REST API do not contain a section with which groups each user belongs to. I know that there is a way to see what groups I belong to in the REST API, but that does not seem to give the groups for every user in the yammer instance.
Does anybody know if there is a way to get the list of all groups that each and every user in the yammer instance belongs to using either of the APIs?
Thanks!
A fairly easy way to do this would be to get the list of groups:
https://www.yammer.com/api/v1/groups.json
And then iterate over the group IDs returned to get the list of members of each group:
https://www.yammer.com/api/v1/groups/{group id}/members.json
Bear in mind, unless you have proper access you may not be able to see into private groups to get the list of members.
I found that if you have the full list of group IDs (either from the data export api or the rest api), you can use those group IDs to individually query, and page through the following endpoint on the REST API.
https://www.yammer.com/api/v1/users/in_group/[group_id].json?page=[page_number]

Allot customer group according to their email id

In a magento project I need to allot customer group to customer according to their email id.
Like I have customer group in admin "xxx" and "yyy"
NOw I want at time of signup if user have id abc#xxx.com, group named xxx allot to him or if he has abc#yyy.in, group "yyy" allot to him.
Please suggest me ..how can I accomplish this task or please refer any document.
Thanks!
The most likely way to succeed is to override Mage_Customer_Model_Customer and provide your own getGroupId() method. This method should check the domain of the email address ($this->getEmail()) and then both set and return the ID of the group. If it doesn't recognise the domain then pass it back to the parent to be processed as normal.

Resources