Skip to main content

Class MentionAgent

Namespace: SuperOffice.WebApi.Agents Assembly: SuperOffice.WebApi.dll Agent used for getting, marking read, and deleting @-mentions

Inheritance

object ← AgentBase ← MentionAgent

Implements

IMentionAgent, IAgentBase, IDisposable

Inherited 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&gt;(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 @-mentions

Parameters

httpClient HttpClient Use this HTTP client instead of making own HttpClient instance.

MentionAgent(WebApiOptions, HttpClient)

Constructor: Agent used for getting, marking read, and deleting @-mentions

Parameters

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 id

Parameters

mentionIds int[] Ids of mention rows to delete requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

GetMentionsCreatedByMeAsync(RequestOptions)

Get the @-mentions the current associate created (tagged someone else)

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Mention[]&gt; The current associate’s created mentions, most-recent-first

GetMyMentionsAsync(bool, RequestOptions)

Get the current associate’s @-mentions

Parameters

unreadOnly bool When true, only unread mentions are returned requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Mention[]&gt; The current associate’s mentions, most-recent-first

GetMyMentionsUnreadCountAsync(RequestOptions)

Get the current associate’s unread @-mention count

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; The current associate’s unread mention count

MarkMentionsAsReadAsync(int[], RequestOptions)

Mark mentions as read

Parameters

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 value

UpdateMentionSnippetsAsync(int, int[], RequestOptions)

Insert-missing and refresh-existing mention rows for a saved message

Parameters

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.

Returns

Task This method has no return value