YammerClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnNewMessagesFollowingV2': {'operation_id': 'OnNewMessagesFollowingV2', 'path': '/{connectionId}/v2/trigger/messages/following.json', 'method': 'get', 'required_parameters': [], 'callback_payload_type': 'MessageList'}, 'OnNewMessagesInGroupV2': {'operation_id': 'OnNewMessagesInGroupV2', 'path': '/{connectionId}/v2/trigger/in_group/{group_id}.json', 'method': 'get', 'required_parameters': ['group_id'], 'callback_payload_type': 'MessageList'}}
Classes
Network
dataclass
Response for Get my networks
Attributes
YammerEntity
dataclass
YammerEntity(type_: Optional[str] = None, id: Optional[int] = None, full_name: Optional[str] = None)
Response for Get groups
Attributes
type_
class-attribute
instance-attribute
Details of the Viva Engage entity.
User
dataclass
User(name: Optional[str] = None, job_title: Optional[str] = None, location: Optional[str] = None, full_name: Optional[str] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, web_url: Optional[str] = None, email: Optional[str] = None, birth_date: Optional[str] = None, mugshot_url: Optional[str] = None)
Response for Get user details
Attributes
PageableMessageList
dataclass
Response for Get all messages
MessageList
dataclass
Message
dataclass
Message(id: Optional[int] = None, content_excerpt: Optional[str] = None, sender_id: Optional[int] = None, replied_to_id: Optional[int] = None, created_at: Optional[str] = None, network_id: Optional[int] = None, message_type: Optional[str] = None, sender_type: Optional[str] = None, url: Optional[str] = None, web_url: Optional[str] = None, group_id: Optional[int] = None, body: Optional[MessageBody] = None, thread_id: Optional[int] = None, direct_message: Optional[bool] = None, client_type: Optional[str] = None, client_url: Optional[str] = None, language: Optional[str] = None, notified_user_ids: Optional[List[int]] = None, privacy: Optional[str] = None, liked_by: Optional[LikedBy] = None, system_message: Optional[bool] = None)
Definition: Message
Attributes
content_excerpt
class-attribute
instance-attribute
Text Content of the post.
sender_id
class-attribute
instance-attribute
Unique ID of user who posted the message.
replied_to_id
class-attribute
instance-attribute
ID of the message to which this message is a reply.
created_at
class-attribute
instance-attribute
Time at which the message was created.
network_id
class-attribute
instance-attribute
Id of the network message is associated with.
message_type
class-attribute
instance-attribute
Description of the message type.
sender_type
class-attribute
instance-attribute
Description of the type of sender.
group_id
class-attribute
instance-attribute
Unique ID of group who posted the message.
direct_message
class-attribute
instance-attribute
Flag to specify if the post is a a direct message.
client_type
class-attribute
instance-attribute
Type of the client.
client_url
class-attribute
instance-attribute
Web link of the client.
language
class-attribute
instance-attribute
Language used in the message.
notified_user_ids
class-attribute
instance-attribute
Details of users notified.
privacy
class-attribute
instance-attribute
Details of the privacy associated with the message.
Topic
dataclass
PostOperationRequest
dataclass
PostOperationRequest(group_id: Optional[int] = None, body: Optional[str] = None, replied_to_id: Optional[int] = None, direct_to_id: Optional[int] = None, broadcast: Optional[bool] = None, title: Optional[str] = None)
Definition: PostOperationRequest
Attributes
group_id
class-attribute
instance-attribute
The group to post a message to (0 = All Company/Network).
body
class-attribute
instance-attribute
Your message to be posted into your network.
replied_to_id
class-attribute
instance-attribute
The message ID this message is in reply to.
direct_to_id
class-attribute
instance-attribute
If set, a private message will be sent directly to the user with the indicated ID.
broadcast
class-attribute
instance-attribute
Post message as an announcement to all users in a group.
MessageBody
dataclass
LikedBy
dataclass
YammerClient
YammerClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for yammer connector.
Initialize a YammerClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
get_networks_async
async
Get my networks
Gets all the networks that the user belongs to.
get_groups_async
async
get_groups_async(network_id: Optional[str] = None, mine: Optional[int] = None, show_all_company_group: Optional[int] = None) -> dict[str, Any] | None
Get groups
Gets all groups. If mine = 1, get only groups to which the user belongs
get_user_details_by_id_async
async
Get user details
This operation returns user profile details.
like_message_async
async
Like message
This operation is used to like the specified message.
get_all_messages_async
async
get_all_messages_async(network_id: Optional[str] = None, older_than: Optional[int] = None, newer_than: Optional[int] = None, threaded: Optional[str] = None, limit: Optional[int] = None) -> dict[str, Any] | None
Get all messages
This operation returns all public messages in the logged in user's Viva Engage network. Corresponds to "All" conversations in the Viva Engage web interface.
get_messages_following_async
async
get_messages_following_async(network_id: Optional[str] = None, older_than: Optional[int] = None, newer_than: Optional[int] = None, threaded: Optional[str] = None, limit: Optional[int] = None) -> dict[str, Any] | None
Get the messages from my Following feed
This operation returns the messages from Following feed which is conversations involving people, groups and topics that the user is following.
get_messages_in_group_async
async
get_messages_in_group_async(group_id: int, network_id: Optional[str] = None, older_than: Optional[int] = None, newer_than: Optional[int] = None, threaded: Optional[str] = None, limit: Optional[int] = None) -> dict[str, Any] | None
Get messages in a group
This operation returns the messages posted in a group.
get_messages_in_thread_async
async
Get messages in a thread
This operation returns the messages posted in a thread.
post_message_async
async
post_message_async(input: PostOperationRequest, network_id: Optional[str] = None) -> dict[str, Any] | None
Post message
This operation is used to post a Message to a Group or All Company Feed. If group ID is provided, message will be posted to the specified group else it will be posted in All Company Feed.