Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OperationService

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

create

  • Parameters

    Returns Promise<IResult<IOperation>>

    Response wrapped in IResult

    Example

    
     const mandantoryObject: IOperation = {
       com_cumulocity_model_WebCamDevice: {
         name: 'take picture',
         parameters: {
            duration: '5s',
            quality: 'HD'
         }
       },
       deviceId: device.id,
     };
    
     (async () => {
       const {data, res} = await operationService.create(mandantoryObject);
     })();
    

detail

  • Parameters

    Returns Promise<IResult<IOperation>>

    Response wrapped in IResult

    Example

    
       const operationId: number = 1;
    
       (async () => {
         const {data, res} = await operationService.detail(operationId);
      })();
    

list

update

  • Parameters

    Returns Promise<IResult<IOperation>>

    Response wrapped in IResult

    Example

    
     const partialUpdateObject: Partial<IOperation> = {
       com_cumulocity_model_WebCamDevice: {
         name: 'take picture',
         parameters: {
            duration: '2s',
            quality: 'HD',
            ratio: '16:9'
         }
       },
       deviceId: device.id,
     };
    
     (async () => {
       const {data, res} = await operationService.update(partialUpdateObject);
     })();
    

Generated using TypeDoc