<a id=“SuperOffice_WebApi_Agents_AssociateAgent”></a> Class AssociateAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Associate utilities, notes, not user admininstration
Inheritance
object ← AgentBase ← AssociateAgentImplements
IAssociateAgent, 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 (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 admininstrationParameters
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 admininstrationParameters
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> 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> 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[]> 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 ResourceHeadingsParameters
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[]> 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> 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[]> 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 clientParameters
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.