Skip to main content

<a id=“SuperOffice_WebApi_Agents_AssociateAgent”></a> Class AssociateAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
Associate utilities, notes, not user admininstration

Inheritance

objectAgentBaseAssociateAgent

Implements

IAssociateAgent, 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 (AssociateAgent agent = new AssociateAgent(mySession)) { // call methods on agent here… }</code></pre>

Constructors

<a id=“SuperOffice_WebApi_Agents_AssociateAgent__ctor_System_Net_Http_HttpClient_”></a> AssociateAgent(HttpClient)

Constructor: Associate utilities, notes, not user admininstration

Parameters

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

<a id=“SuperOffice_WebApi_Agents_AssociateAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> AssociateAgent(WebApiOptions, HttpClient)

Constructor: Associate utilities, notes, not user admininstration

Parameters

options WebApiOptions Base URL and authentication values. httpClient HttpClient Optional: Use this HTTP client instead of making a new one.

Methods

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_GetAssociateAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetAssociateAsync(int, RequestOptions)

Gets a specific Associate object.

Parameters

associateId int The identifier of the Associate object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Associate&gt; Associate

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_GetAssociateByPersonIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetAssociateByPersonIdAsync(int, RequestOptions)

Returns the associate that belongs to this person if the person is an associate.

Parameters

personId int The person id requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Associate&gt; Associate if person is associate

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_GetAssociateListAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> GetAssociateListAsync(int[], RequestOptions)

Gets an array of specific Associate objects.

Parameters

associateIds int[] The identifiers of the Associate object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Associate[]&gt; Array of Associate objects

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_GetAssociatesByGroupAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetAssociatesByGroupAsync(int, int, RequestOptions)

Method that returns a array of associate , based on DiaryGroupType and groupId. The differernt types are, Userdefined, Usergroup and ResourceHeadings

Parameters

groupId int Id of the group type int The type of group. See DiaryGroupType requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Associate[]&gt; Array of associate

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_GetEncryptionKeyAsync_SuperOffice_WebApi_RequestOptions_”></a> GetEncryptionKeyAsync(RequestOptions)

Get unique key made from AssociateId and dbTag used for local storage encryption operations.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; encryptionKey

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_GetNoteAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetNoteAsync(int, RequestOptions)

Returns an array of strings(notepad pages).

Parameters

associateId int The associate id requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt; Returns an array of strings(notepad pages).

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_LogOffWindowsUsersAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> LogOffWindowsUsersAsync(int[], RequestOptions)

Method that logs off associates that are logged on to the win client

Parameters

associateIds int[] The ids of the associates that shall be logged off requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task A void return

<a id=“SuperOffice_WebApi_Agents_AssociateAgent_SaveNoteAsync_System_Int32_System_String___SuperOffice_WebApi_RequestOptions_”></a> SaveNoteAsync(int, string[], RequestOptions)

Saves an array of strings(notepad pages).

Parameters

associateId int The associate id note string[] The array of strings(notepad pages). requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task