C# Class NuxeoClient.Client

A client that provides all the methods required to perform Automation operations and REST CRUD operations on an instance of the Nuxeo Server.
Inheritance: IDisposable
Afficher le fichier Open project: nuxeo/nuxeo-dotnet-client Class Usage Examples

Méthodes publiques

Méthode Description
AddDefaultSchema ( string schema ) : Client

Adds a default document schema to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Batch ( ) : Task

Requests a new Batch from the server.

ClearDefaultSchemas ( ) : Client

Removes all default schemas to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Client ( string serverURL = "http://localhost:8080/nuxeo/", Authorization authorization = null, string automationPath = "api/v1/automation/", string restPath = "api/v1/", string schemas = null, int timeout = 30 ) : Newtonsoft.Json

Initializes a new instance of the Nuxeo Client.

Dispose ( ) : void

Releases the unmanaged resources used by the Client and optionally disposes of the managed resources.

DocumentFromPath ( string path ) : Document

Creates a new instance of a Nuxeo Document.

DocumentFromUid ( string uid ) : Document

Creates a new instance of a Nuxeo Document.

Operation ( string id ) : Operation

Creates a new instance of an Automation Operation.

RemoveDefaultSchema ( string schema ) : Client

Removes a default schema to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

Request ( RequestType type, string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task

Performs a RESTful request to the Nuxeo Server.

SetAuthomationPath ( string path ) : Client

Sets the path to the Automation endpoint.

SetAuthorization ( Authorization auth ) : Client

Sets the authorization information to be sent in all requests.

SetDefaultSchemas ( string schemas ) : Client

Sets the default document schemas to be sent in all requests.

For more details about schemas, check Nuxeo Documentation Center.

SetMarshaller ( IMarshaller marshaller ) : Client

Sets the object marshaller for this client.

SetRestPath ( string path ) : Client

Sets the path to the REST API endpoint.

SetServerURL ( string url ) : Client

Sets the URL of the Nuxeo server.

SetTimemout ( int timeout ) : Client

Sets the default reques timeout.

Uploader ( ) : Uploader

Returns a new instance of Uploader.

Private Methods

Méthode Description
AddBlobToMultipartContent ( MultipartContent content, Blob blob ) : void
BuildMultipartContent ( JToken data ) : MultipartContent
Delete ( string endpoint, QueryParams parameters = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
Get ( string endpoint, QueryParams parameters = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
Post ( string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
PostBin ( string endpoint, QueryParams parameters = null, byte data = null, string>.Dictionary additionalHeaders = null ) : Task
ProcessRequest ( HttpRequestMessage request, string>.Dictionary additionalHeaders = null ) : Task
ProcessResponse ( HttpResponseMessage response ) : Task
Put ( string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
RequestBin ( string endpoint, QueryParams parameters = null, byte data = null, HttpMethod httpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.OCTETSTREAM ) : Task
RequestJson ( string endpoint, QueryParams parameters = null, JToken data = null, HttpMethod httpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
RequestMultipart ( string endpoint, JToken data, Blob input, HttpMethod htttpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.NXREQUEST ) : Task
RequestMultipart ( string endpoint, JToken data, BlobList input, HttpMethod htttpMethod = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.NXREQUEST ) : Task

Method Details

AddDefaultSchema() public méthode

Adds a default document schema to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public AddDefaultSchema ( string schema ) : Client
schema string A string containing the schema's name.
Résultat Client

Batch() public méthode

Requests a new Batch from the server.
public Batch ( ) : Task
Résultat Task

ClearDefaultSchemas() public méthode

Removes all default schemas to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public ClearDefaultSchemas ( ) : Client
Résultat Client

Client() public méthode

Initializes a new instance of the Nuxeo Client.
public Client ( string serverURL = "http://localhost:8080/nuxeo/", Authorization authorization = null, string automationPath = "api/v1/automation/", string restPath = "api/v1/", string schemas = null, int timeout = 30 ) : Newtonsoft.Json
serverURL string The URL of the Nuxeo server.
authorization Authorization The authorization credentials.
automationPath string The Automation API path.
restPath string The REST API path.
schemas string The default schemas to be used in the requests.
timeout int The default request timeout.
Résultat Newtonsoft.Json

Dispose() public méthode

Releases the unmanaged resources used by the Client and optionally disposes of the managed resources.
public Dispose ( ) : void
Résultat void

DocumentFromPath() public méthode

Creates a new instance of a Nuxeo Document.
public DocumentFromPath ( string path ) : Document
path string The remote path to the document.
Résultat Document

DocumentFromUid() public méthode

Creates a new instance of a Nuxeo Document.
public DocumentFromUid ( string uid ) : Document
uid string The remote document's UID.
Résultat Document

Operation() public méthode

Creates a new instance of an Automation Operation.
public Operation ( string id ) : Operation
id string The operation's id.
Résultat Operation

RemoveDefaultSchema() public méthode

Removes a default schema to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public RemoveDefaultSchema ( string schema ) : Client
schema string A string containing the schema's name.
Résultat Client

Request() public méthode

Performs a RESTful request to the Nuxeo Server.
public Request ( RequestType type, string endpoint, QueryParams parameters = null, JToken data = null, string>.Dictionary additionalHeaders = null, string contentType = ContentType.JSON ) : Task
type RequestType The type of the request.
endpoint string The end point, following "api/v1/".
parameters QueryParams The query parameters to follow the url.
data JToken The JSON data to be send.
additionalHeaders string>.Dictionary The additional request headers, besides those already specified in the client.
contentType string The type of the content to be sent.
Résultat Task

SetAuthomationPath() public méthode

Sets the path to the Automation endpoint.
public SetAuthomationPath ( string path ) : Client
path string The path to the Automation endpoint.
Résultat Client

SetAuthorization() public méthode

Sets the authorization information to be sent in all requests.
public SetAuthorization ( Authorization auth ) : Client
auth Authorization The authorization data.
Résultat Client

SetDefaultSchemas() public méthode

Sets the default document schemas to be sent in all requests.
For more details about schemas, check Nuxeo Documentation Center.
public SetDefaultSchemas ( string schemas ) : Client
schemas string One or more strings representing schema names.
Résultat Client

SetMarshaller() public méthode

Sets the object marshaller for this client.
public SetMarshaller ( IMarshaller marshaller ) : Client
marshaller IMarshaller The object marshaller implementing the interface.
Résultat Client

SetRestPath() public méthode

Sets the path to the REST API endpoint.
public SetRestPath ( string path ) : Client
path string The path to the REST API endpoint.
Résultat Client

SetServerURL() public méthode

Sets the URL of the Nuxeo server.
public SetServerURL ( string url ) : Client
url string The Nuxeo server's URL.
Résultat Client

SetTimemout() public méthode

Sets the default reques timeout.
public SetTimemout ( int timeout ) : Client
timeout int The timeout.
Résultat Client

Uploader() public méthode

Returns a new instance of Uploader.
public Uploader ( ) : Uploader
Résultat Uploader