Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventService

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

create

  • Parameters

    Returns Promise<IResult<IEvent>>

    Response wrapped in IResult

    Example

    
     const mandantoryObject: IEvent = {
       source: device,
       text: 'I am an Event!',
       time: '2018-05-02T10:08:00Z',
       type: 'device-type-here',
     };
    
     (async () => {
       const {data, res} = await eventService.create(mandantoryObject);
     })();
    

delete

  • Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

  • Parameters

    Returns Promise<IResult<IEvent>>

    Response wrapped in IResult

    Example

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

list

update

  • Parameters

    Returns Promise<IResult<IEvent>>

    Response wrapped in IResult

    Example

    
     const partialUpdateObject: Partial<IEvent> = {
       source: device,
       text: 'Changed Event!'
     };
    
     (async () => {
       const {data, res} = await eventService.update(partialUpdateObject);
     })();
    

Generated using TypeDoc