Class MentionAgent
Namespace: SuperOffice.WebApi.Agents Assembly: SuperOffice.WebApi.dll Agent used for getting, marking read, and deleting @-mentionsInheritance
object ← AgentBase ← MentionAgentImplements
IMentionAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (MentionAgent agent = new MentionAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
MentionAgent(HttpClient)
Constructor: Agent used for getting, marking read, and deleting @-mentionsParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
MentionAgent(WebApiOptions, HttpClient)
Constructor: Agent used for getting, marking read, and deleting @-mentionsParameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
DeleteMentionsAsync(int[], RequestOptions)
Delete mentions by idParameters
mentionIds int[]
Ids of mention rows to delete
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueGetMentionsCreatedByMeAsync(RequestOptions)
Get the @-mentions the current associate created (tagged someone else)Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Mention[]> The current associate’s created mentions, most-recent-firstGetMyMentionsAsync(bool, RequestOptions)
Get the current associate’s @-mentionsParameters
unreadOnly bool
When true, only unread mentions are returned
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Mention[]> The current associate’s mentions, most-recent-firstGetMyMentionsUnreadCountAsync(RequestOptions)
Get the current associate’s unread @-mention countParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> The current associate’s unread mention countMarkMentionsAsReadAsync(int[], RequestOptions)
Mark mentions as readParameters
mentionIds int[]
Ids of the mentions to mark read
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueUpdateMentionSnippetsAsync(int, int[], RequestOptions)
Insert-missing and refresh-existing mention rows for a saved messageParameters
messageId int
The message the mentions belong to
mentionedAssociateIds int[]
The colleagues mentioned in the message’s current content
requestOptions RequestOptions
Override language/culture codes on this request.