Below URL can give me all groups associated with me only.
https://www.yammer.com/api/v1/groups.json?mine=1
Also below URLs will give me all groups and user list..but how to find which user belongs to which group?
https://www.yammer.com/api/v1/groups.json?model_type=Group&page=3
https://www.yammer.com/api/v1/users.json?model_type=User&page=67
So can i get all members associated with group id?
Thanks in advance.
The endpoint:
https://www.yammer.com/api/v1/users/in_group/[:Group_Id].json
will give you a list of users in a group
More info here:
https://developer.yammer.com/docs/usersin_groupidjson
Related
I want to return the list of chosen groups for a particular user. We can get all groups, we can get all user permissions by group, but not the group names themselves.
e.g.
> Group.objects.all() //list of ALL group names
> Group.objects.all().values_list('id', flat=True) //list of ALL groups' IDs
> request.resource_owner.get_group_permissions() //all group based permissions
just posting answer. fyi!
request.resource_owner.groups.all()
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]
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!
I know we can show content based on a users access level using Joomla ACL, but is it possible to show content to all users except for one specific group? If so, how?
I've tried creating an access level called news that includes all groups except no_news group then assigned my module access level of news.
Unfortunately users belonging to the no_news group were able to see the content. Any suggestions?
The no_news class is inherited from registered.
Is your no_news group inherited from Public? If so, exclude Public group from NEWS access level. Basically the idea is that if the parent group has access, then all child groups will also have.
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.