Class YammerUtility
Holds yammer operation methods
Inheritance
Namespace: PnP.Framework.Utilities
Assembly: PnP.Framework.dll
Syntax
public static class YammerUtility : object
Methods
CreateYammerDiscussionPartXml(String, Int32, Boolean, Boolean, Boolean)
Constructs the webpart XML for yammer group needed to inject as Yammer web part to SharePoint page
Declaration
public static string CreateYammerDiscussionPartXml(string yammerNetworkName, int yammerGroupId, bool showHeader, bool showFooter, bool useSSO = true)
Parameters
System. Yammer network name |
System. Group ID |
System. Shows header based on value |
System. Shows footer based on value |
System. uses given Single Sign-on information to create webpart |
Returns
System. The constructed web part XML |
CreateYammerGroup(String, Boolean, String)
Can be used to create Yammer group to the Yammer network
Declaration
public static YammerGroup CreateYammerGroup(string groupName, bool isPrivate, string accessToken)
Parameters
System. Creates yammer group with given name |
System. Sets yammer groups as private if the value is true. Otherwise sets as public group |
System. accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user |
Returns
Yammer Returns YammerGroup created |
CreateYammerGroupDiscussionPartXml(String, Int32, Boolean, Boolean, Boolean)
Constructs the webpart XML for yammer group needed to inject as Yammer web part to SharePoint page
Declaration
public static string CreateYammerGroupDiscussionPartXml(string yammerNetworkName, int yammerGroupId, bool showHeader, bool showFooter, bool useSSO = true)
Parameters
System. Yammer network name |
System. Group ID |
System. Shows header based on value |
System. Shows footer based on value |
System. uses given Single Sign-on information to create webpart |
Returns
System. The constructed web part XML |
CreateYammerOpenGraphDiscussionPartXml(String, String, Boolean, Boolean, String, String, Boolean, String)
Constructs web part definition for Open Graph discussion web part definition
Declaration
public static string CreateYammerOpenGraphDiscussionPartXml(string yammerNetworkName, string url, bool showHeader, bool showFooter, string postTitle = "", string postImageUrl = "", bool useSso = true, string groupId = "")
Parameters
System. Yammer network name |
System. Yammer URL |
System. Shows header based on value |
System. Shows footer based on value |
System. creates webpart with given post title |
System. creates webpart with given post title |
System. uses given Single Sign-on information to create webpart |
System. yammer group id |
Returns
System. The constructed Open Graph Discussion Part XML |
GetYammerGroupById(Int32, String)
Returns Yammer Group if group exists. If the group does not exist, returns null.
Declaration
public static YammerGroup GetYammerGroupById(int groupId, string accessToken)
Parameters
System. Group Id to search for |
System. accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user |
Returns
Yammer Returns Yammer Group is group exists. If group does not exists, returns null. |
GetYammerGroupByName(String, String)
Returns Yammer Group if group exists. If the group does not exist, returns null.
Declaration
public static YammerGroup GetYammerGroupByName(string groupName, string accessToken)
Parameters
System. Group name to search for |
System. accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user |
Returns
Yammer Returns Yammer Group is group exists. If group does not exists, returns null. |
GetYammerGroupDiscussionPart(String, Int32, Boolean, Boolean)
Creates web part entity with the Yammer group structure on it
Declaration
public static WebPartEntity GetYammerGroupDiscussionPart(string yammerNetworkName, int yammerGroupId, bool showHeader, bool showFooter)
Parameters
System. Yammer group network name |
System. Yammer group id |
System. Shows header of webpart based on the value |
System. Shows footer of webpart based on value |
Returns
Web Returns created WebPartEntity |
GetYammerGroups(String)
Returns Yammer groups based on the access token. All groups are returned for registered apps.
Declaration
public static List<YammerGroup> GetYammerGroups(string accessToken)
Parameters
System. accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user |
Returns
List<Yammer All groups in the network |
GetYammerOpenGraphDiscussionPart(String, String, Boolean, Boolean, String, String, String)
Creates web part entity with the Yammer OpenGraph structure on it for specific URL
Declaration
public static WebPartEntity GetYammerOpenGraphDiscussionPart(string yammerNetworkName, string url, bool showHeader, bool showFooter, string postTitle = "", string postImageUrl = "", string defaultGroupId = "")
Parameters
System. Yammer network name |
System. yammer URL |
System. Shows header based on value |
System. Shows footer based on value |
System. creates webpart with given post title |
System. creates webpart with given post title |
System. creates webpart with givne group id |
Returns
Web Returns created WebPartEntity |
GetYammerUser(String)
Returns yammer user if user exists. If the user doesn't exist, returns null
Declaration
public static YammerUser GetYammerUser(string accessToken)
Parameters
System. accessToken will have all the required permissions to update or retrieve data to Yammer on behalf of the user |