src/components/pusher.js
/** Push the data to the Gecko Widget.*/
Push the data to the Gecko Widget.
Push the data to the Gecko Widget .
async push() {
    try {
      const data = await this.fnForData_.apply(this.feed_, this.fnForDataArgs_);
      try {
      await request.post(Config.geckoBoard.pushUrl + this.widgetId_)
        .send({
          'api_key': Config.geckoBoard.apiKey,
          'data': data,
        });
      } catch (err) {
        throw (err.response.body);
      }
    } catch (e) {
      Logger.error('[PUSHER] ' + this.widgetId_, e);
    }
  }
async push ( ) { try { const data = await this . fnForData_ . apply ( this . feed_ , this . fnForDataArgs_ ) ; try { await request . post ( Config . geckoBoard . pushUrl + this . widgetId_ ) . send ( { 'api_key' : Config . geckoBoard . apiKey , 'data' : data , } ) ; } catch ( err ) { throw ( err . response . body ) ; } } catch ( e ) { Logger . error ( '[PUSHER] ' + this . widgetId_ , e ) ; } }
Push the data to the Gecko Widget.
Push the data to the Gecko Widget .