<a id=“SuperOffice_WebApi_Agents_ReportAgent”></a> Class ReportAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Run reports, set favourites, labels
Inheritance
object ← AgentBase ← ReportAgentImplements
IReportAgent, 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 (ReportAgent agent = new ReportAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
<a id=“SuperOffice_WebApi_Agents_ReportAgent__ctor_System_Net_Http_HttpClient_”></a> ReportAgent(HttpClient)
Constructor: Run reports, set favourites, labelsParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
<a id=“SuperOffice_WebApi_Agents_ReportAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> ReportAgent(WebApiOptions, HttpClient)
Constructor: Run reports, set favourites, labelsParameters
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_ReportAgent_CreateDefaultReportLabelLayoutEntityAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultReportLabelLayoutEntityAsync(RequestOptions)
Set default values into a new ReportLabelLayoutEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ReportLabelLayoutEntity> A blank ReportLabelLayoutEntity<a id=“SuperOffice_WebApi_Agents_ReportAgent_DeleteReportLabelLayoutEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteReportLabelLayoutEntityAsync(int, RequestOptions)
Deletes the ReportLabelLayoutEntityParameters
reportLabelLayoutEntityId int
The identity of the ReportLabelLayoutEntity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_ReportAgent_GetReportLabelLayoutEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetReportLabelLayoutEntityAsync(int, RequestOptions)
Gets a specific ReportLabelLayoutEntity object.Parameters
reportLabelLayoutEntityId int
The identifier of the ReportLabelLayoutEntity object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ReportLabelLayoutEntity> ReportLabelLayoutEntity<a id=“SuperOffice_WebApi_Agents_ReportAgent_SaveReportLabelLayoutEntityAsync_SuperOffice_WebApi_Data_ReportLabelLayoutEntity_SuperOffice_WebApi_RequestOptions_”></a> SaveReportLabelLayoutEntityAsync(ReportLabelLayoutEntity, RequestOptions)
Updates the existing ReportLabelLayoutEntity or creates a new ReportLabelLayoutEntity if the id parameter is 0.Parameters
reportLabelLayoutEntity ReportLabelLayoutEntity
The ReportLabelLayoutEntity that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.