ExecutionContext

ExecutionContext

Represents the execution context of an Operation. An execution context typically consists of the desired authentication credentials and client configurations such as timeouts.

For each set of credentials, a ExecutionContext instance can be reused across operations.

Sample Usage:


const executionContext = DCServicesSdk.ExecutionContext.createFromFile('dc-services-sdk-credentials.json'),
       createPDFOperation = DCServicesSdk.CreatePDF.Operation.createNew(),
       input = DCServicesSdk.FileRef.createFromLocalFile('files/resources/createPDFInput.docx');

 createPDFOperation.setInput(input);

 createPDFOperation.execute(executionContext)
     .then(result => result.saveAsFile('output/createPDFFromZip.pdf'))
     .catch(err => console.log(err));