   * that can contain one or more of the following fields.
   *
   * @class
-  * @param {String} apiToken - Sets the user's API token used for authentication purposes.
-  * @param {String=} host - Authentication server to which the client will connect. Should *NOT* include the URL schema as it defaults to `http`. Defaults to `DEFAULT_HOST`.
-  * @param {Number=} port - TCP port from the host to which the client will connect. Defaults to `DEFAULT_PORT`.
+  * @param {string} apiToken - Sets the user's API token used for authentication purposes.
+  * @param {string=} host - Authentication server to which the client will connect. Should *NOT* include the URL schema as it defaults to `http`. Defaults to `DEFAULT_HOST`.
+  * @param {number=} port - TCP port from the host to which the client will connect. Defaults to `DEFAULT_PORT`.
   * @alias UoACalendarClient
+  *
+  * @example <caption>Minimal example of how to instantiate a UoACalendarClient. Default host and port used.</caption>
+  * var client = new UoACalendarClient("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvcmlnX2lhdCI6MTQyMjQ5ODk0OSwiZXhwIjoxNDI" +
+  *                                     "yNDk5MjQ5LCJ1c2VyX2lkIjoyLCJ1c2VybmFtZSI6ImRldmVsb3BlciIsImVtYWlsIjoidGVzdEBhdWN" +
+  *                                     "rbGFuZC5hYy5ueiJ9.7jLkEBovT2HvT2noL4xdIhddaY8wpZpEVYEDHnnNm1Y");
+  *
+  * @example <caption>Example where host and port specified.</caption>
+  * var client = new UoACalendarClient("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvcmlnX2lhdCI6MTQyMjQ5ODk0OSwiZXhwIjoxNDI" +
+  *                                     "yNDk5MjQ5LCJ1c2VyX2lkIjoyLCJ1c2VybmFtZSI6ImRldmVsb3BlciIsImVtYWlsIjoidGVzdEBhdWN" +
+  *                                     "rbGFuZC5hYy5ueiJ9.7jLkEBovT2HvT2noL4xdIhddaY8wpZpEVYEDHnnNm1Y",
+  *                                     "sitcalprd01.its.auckland.ac.nz", 345);
   ###
 
   constructor: (apiToken, host, port) ->

  ###*
  * Return host used by UoACalendarClient instance.
  *
  * @returns {String}
  ###

  getHost: () ->

      onSuccess, onError
    )

  ###*
  * Callback, returns events from a particular calendar within a date range.
  *
  * @callback onFindEventsSuccess
  * @param {HttpResponse} res - HTTP response
  * @param {Array.<{}>} data - Array of events
  *
  * @example <caption>Example output</caption>
  * res: {"offset":0,"readable":true,"_events":{},"statusCode":204,"headers":{"content-type":"text/plain; charset=UTF-8"}}
  * data: [{},
  *        {}]
  ###

  ###*
  * Callback function, executed when finding events failed.
  *
  * @callback onFindEventsError
  * @param {HttpResponse} res - HTTP response
  * @param {ErrorMessage} data - Error message.
  *
  * @example <caption>Example output</caption>
  * todo: insert example
  ###

  ###*
  * @typedef {Object} HttpResponse
  * @property {number} offset -
  * @property {boolean} readable -
  * @property {number} statusCode - See [HTTP status codes]{@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
  * @property {Object} headers -
  * @property {string} headers.content-type -
  *
  * @example
  * {"offset":30,"readable":true,"_events":{},"statusCode":200,"headers":{"content-type":"application/json"}}
  ###

  ###*
  *
  * @typedef {Object} ErrorMessage
  * @property {string} detail - Reason for error.
  *
  * @example
  * {detail: "You do not have permission to perform this action."}
  ###

exports.UoACalendarClient = UoACalendarClient

module.exports = (config) ->
