frontend/src/libraries/client.js
/**
   * Gets all events
   * 
   * @param {object} param0           Object containing success and failure callbacks
   * @param {object} param0.successFn Callback to be run on success
   * @param {object} param0.errorFn   Callback to be run on failure
   * @returns {array}                 Array of event objects
   */
Gets all events

@param {object} param0           Object containing success and failure callbacks
@param {object} param0.successFn Callback to be run on success
@param {object} param0.errorFn   Callback to be run on failure
@returns {array}                 Array of event objects
Gets all events @param { object } param0 Object containing success and failure callbacks @param { object } param0 . successFn Callback to be run on success @param { object } param0 . errorFn Callback to be run on failure @returns { array } Array of event objects
fetchEvents({successFn, errorFn = this.defaultErrorHandler}) {
    fetch(`http://${this.host}:${this.port}/api/events/`)
      .then(response => response.json())
      .then(data => successFn(data))
      .catch(error => errorFn(error));
  }
fetchEvents ( { successFn , errorFn = this . defaultErrorHandler } ) { fetch ( ` ${ this . host } ${ this . port } ` ) . then ( response => response . json ( ) ) . then ( data => successFn ( data ) ) . catch ( error => errorFn ( error ) ) ; }
Gets all events
Gets all events