webservice/src/services/ApiManager.js
/**
   * Function to watch events in the user namespace
   *
   * @param func the function to be called at each event
   * @param queryParam the query parameters you are going to use (Used when calling function to watch admin namespaces)
   */
Function to watch events in the user namespace
@param func the function to be called at each event
@param queryParam the query parameters you are going to use (Used when calling function to watch admin namespaces)
Function to watch events in the user namespace @param func the function to be called at each event @param queryParam the query parameters you are going to use ( Used when calling function to watch admin namespaces )
startWatching(func, queryParam = {}) {
    const path =
      Object.keys(queryParam).length !== 0
        ? `/apis/${this.instanceGroup}/${this.version}/${this.instancePlural}`
        : `/apis/${this.instanceGroup}/${this.version}/namespaces/${this.instanceNamespace}/${this.instancePlural}`;
    watch(
      this.kc,
      path,
      queryParam,
      (type, object) => {
        func(type, object);
      },
      e => {
        func(null, e);
      }
    );
  }
startWatching ( func , queryParam = { } ) { const path = Object . keys ( queryParam ) . length !== 0 ? ` ${ this . instanceGroup } ${ this . version } ${ this . instancePlural } ` : ` ${ this . instanceGroup } ${ this . version } ${ this . instanceNamespace } ${ this . instancePlural } ` ; watch ( this . kc , path , queryParam , ( type , object ) => { func ( type , object ) ; } , e => { func ( null , e ) ; } ) ; }
Function to watch events in the user namespace
 @param func the function to be called at each event
 @param queryParam the query parameters you are going to use (Used when calling function to watch admin namespaces)
Function to watch events in the user namespace @param func the function to be called at each event @param queryParam the query parameters you are going to use ( Used when calling function to watch admin namespaces )