Class jMatrixBrowseNs.APIHandler
APIHandler
Defined in: APIHandler.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Manages requests to the api.
|
Method Attributes | Method Name and Description |
---|---|
getColDataForCell(cell)
Get the col data for the col index for current window.
|
|
getColHeadersFromLeftCol(leftColIndex)
Get the column headers for the current window from left column index.
|
|
Get matrix size from api.
|
|
getResponse(request)
Gets the response for a request.
|
|
getResponseData(request)
Gets the response data for a request.
|
|
getRowDataForCell(cell)
Get the row data for the row index for current window.
|
|
getRowHeadersFromTopRow(topRowIndex)
Get the row headers for the current window from top row index.
|
|
<inner> |
initApi(type)
Initialize the API
|
setRenderer(renderer)
Sets the renderer.
|
Class Detail
jMatrixBrowseNs.APIHandler(type)
Manages requests to the api.
- Parameters:
- {jQuery Object} type
- - type of API to use.
Method Detail
{Array}
getColDataForCell(cell)
Get the col data for the col index for current window.
- Parameters:
- {Object} cell
- - row and column index of cell.
- Deprecated:
- You need to pass in the full window now. See getResponseData.
- Returns:
- {Array} colData - Array of col data.
{Array}
getColHeadersFromLeftCol(leftColIndex)
Get the column headers for the current window from left column index.
- Parameters:
- {Number} leftColIndex
- - index of the left column
- Returns:
- {Array} colHeaders - Array of column headers
{Object, Number, Number}
getMatrixSize()
Get matrix size from api.
- Returns:
- {Object} size - size of the matrix.
- {Number} size.width - width of the matrix.
- {Number} size.height - height of the matrix.
getResponse(request)
Gets the response for a request. No checks are performed.
- Parameters:
- {Object} request
- - request to send to server. See (https://github.com/pulkit110/jMatrixBrowse/wiki/API-Details)
- Returns:
- response received from the server.
getResponseData(request)
Gets the response data for a request. No checks are performed.
- Parameters:
- {Object} request
- - request to send to server. See (https://github.com/pulkit110/jMatrixBrowse/wiki/API-Details)
- Returns:
- response.data received from the server.
{Array}
getRowDataForCell(cell)
Get the row data for the row index for current window.
- Parameters:
- {Object} cell
- - row and column index of cell
- Deprecated:
- You need to pass in the full window now. See getResponseData.
- Returns:
- {Array} rowData - Array of row data
{Array}
getRowHeadersFromTopRow(topRowIndex)
Get the row headers for the current window from top row index.
- Parameters:
- {Number} topRowIndex
- - index of the top row
- Returns:
- {Array} rowHeaders - Array of row headers
<inner>
initApi(type)
Initialize the API
- Parameters:
- {string} type
- type of api: 'test' initializes the mockAPI
setRenderer(renderer)
Sets the renderer.
- Parameters:
- {Object} renderer