C# Class Foretagsplatsen.Api.Resources.DocumentResource

Document archive REST resource: https://web.foretagsplatsen.se/Api/Company/{businessIdentityCode}/Document/{path} Notes: * A path that ends with a forward slash '/' denotes a folder, otherwise it is a file
Mostrar archivo Open project: foretagsplatsen/Foretagsplatsen-DotNet-API

Public Methods

Method Description
Create ( string path, byte file ) : void

Creates a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists an ApiException with ApiErrorType Exists will be thrown.

CreatePath ( string path ) : void

Create a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash. If the path already exists an ApiException with ApiErrorType Exists will be thrown.

Delete ( string path ) : void

Delete a file or folder. If the path is a folder all folder content will be deleted too.

DocumentResource ( ApiClient client, CompanyInfo company ) : System

Instantiates a new DocumentResource object.

DocumentResource ( ApiClient client, string businessIdentityCode ) : System

Instantiates a new DocumentResource object.

DownloadFile ( string path ) : byte[]

Download a file from the document archive. Be aware of the path convention that says a file path cannot end with a slash.

Get ( string path ) : Document

Get the file or folder info for the path.

GetUrl ( string path ) : string

Url for the document archive resource.

Update ( string path, byte file ) : void

Save a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists it will be replaced by the new one.

UpdatePath ( string path ) : void

Update a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash.

Method Details

Create() public method

Creates a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists an ApiException with ApiErrorType Exists will be thrown.
public Create ( string path, byte file ) : void
path string The path to the file to create
file byte The binary data to upload
return void

CreatePath() public method

Create a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash. If the path already exists an ApiException with ApiErrorType Exists will be thrown.
public CreatePath ( string path ) : void
path string The path to create.
return void

Delete() public method

Delete a file or folder. If the path is a folder all folder content will be deleted too.
public Delete ( string path ) : void
path string The path to the file or folder
return void

DocumentResource() public method

Instantiates a new DocumentResource object.
public DocumentResource ( ApiClient client, CompanyInfo company ) : System
client ApiClient REST client
company Foretagsplatsen.Api.Entities.CompanyInfo Company
return System

DocumentResource() public method

Instantiates a new DocumentResource object.
public DocumentResource ( ApiClient client, string businessIdentityCode ) : System
client ApiClient REST client
businessIdentityCode string Business identity code for company.
return System

DownloadFile() public method

Download a file from the document archive. Be aware of the path convention that says a file path cannot end with a slash.
public DownloadFile ( string path ) : byte[]
path string The path to the file.
return byte[]

Get() public method

Get the file or folder info for the path.
public Get ( string path ) : Document
path string The path to the file or folder
return Foretagsplatsen.Api.Entities.Document

GetUrl() public method

Url for the document archive resource.
public GetUrl ( string path ) : string
path string
return string

Update() public method

Save a file to the document archive. Be aware of the path convention that says a file path cannot end with a slash. If the file already exists it will be replaced by the new one.
public Update ( string path, byte file ) : void
path string The path to the file to create
file byte The binary data to upload
return void

UpdatePath() public method

Update a folder path. It is possible to supply a path with subfolders that will be created simultaneous. Be aware of the path convention that says if a paths ends with a slash it denotes a folder. Hence the path must end with a slash.
public UpdatePath ( string path ) : void
path string The path to create.
return void