Constructor
new ContributeService(requestService, provider, configServer)
Creates a contribute service.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
requestService | RequestService | The request service. | |||||||||
provider | DocumentProvider | The document provider. | |||||||||
configServer | object | The server configuration. Properties
|
Classes
Members
configServer :Object
The UD-Viz configuration.
Type:
- Object
documentUrl :string
The base URL for documents.
Type:
- string
provider :DocumentProvider
The document provider.
Type:
requestService :RequestService
The request service.
Type:
- RequestService
Methods
(async) createDocument(creationData) → {Document}
Sends the request to create the document.
Parameters:
Name | Type | Description |
---|---|---|
creationData | FormData | The document data. |
Returns:
The created document.
- Type:
- Document
(async) deleteDocument()
Sends the request to delete the current document.
(async) updateDocument(updatedData) → {Document}
Sends the request to update the document.
Parameters:
Name | Type | Description |
---|---|---|
updatedData | FormData | The updated document data. |
Returns:
The updated document.
- Type:
- Document