Home Manual Reference Source Test Repository
import PeriodicityActions from 'opengate-js/src/operations/PeriodicityActions.js'
public class | source

PeriodicityActions

Constructor Summary

Public Constructor
public

Constructor

Method Summary

Public Methods
public

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

public

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel a periodicity

public

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses a periodicity

Public Constructors

public constructor(ogapi: InternalOpenGateAPI, taskId: string) source

Constructor

Params:

NameTypeAttributeDescription
ogapi InternalOpenGateAPI

this is configuration about Opengate North API.

taskId string

Identifier of the periodicity on which the action will be carried out

Public Methods

public activate(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.newPeriodicityActions("xxxxx-xxx-xxxx-xxxxx").activate()

public cancel(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel a periodicity

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(result: object, statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

public pause(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses a periodicity

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()