Class: Registry
Defined in: | src/registry.coffee |
Overview
The representation of a connection to an Intermine Registry
Instance Method Summary
- # (String) getFormat(intended = 'json') Helper function to default to JSON format unless specified
- # (Boolean) isEmpty(obj) Helper function to check if an object is empty or not
- # (void) errorHandler(e) Default error handler function to provide error stream if present or fallback to stdout
- # (String) makePath(path = '', params = {}) Bound Concatenates relative path with root and returns final path to call service from where to make the request
- # (Promise<Object>) makeRequest(method = 'GET', path = '', urlParams = {}, data = {}, cb = function() {}) Helper function to make request, to be augmented further as need arises with callback attatched if provided
- # (Promise<Array<Object>>) fetchMines(q = [], mines = [], cb = function() {}) Bound Fetches instances of all known registry information
- # (Promise<Object>) fetchInstance(id = "", cb = function() {}) Fetches all the information of an instance by its instance id, name or namespace
- # (Promise<Object>) fetchNamespace(url = "", cb = function() {}) Return the namespace assigned to the instance with URL given in input
Instance Method Details
#
(String)
getFormat(intended = 'json')
Helper function to default to JSON format unless specified
#
(Boolean)
isEmpty(obj)
Helper function to check if an object is empty or not
#
(void)
errorHandler(e)
Default error handler function to provide error stream if present or fallback to stdout
#
(String)
makePath(path = '', params = {})
Bound
Concatenates relative path with root and returns final path to call service from where to make the request
#
(Promise<Object>)
makeRequest(method = 'GET', path = '', urlParams = {}, data = {}, cb = function() {})
Helper function to make request, to be augmented further as need arises
with callback attatched if provided
#
(Promise<Array<Object>>)
fetchMines(q = [], mines = [], cb = function() {})
Bound
Fetches instances of all known registry information
#
(Promise<Object>)
fetchInstance(id = "", cb = function() {})
Fetches all the information of an instance by its instance id, name or namespace
#
(Promise<Object>)
fetchNamespace(url = "", cb = function() {})
Return the namespace assigned to the instance with URL given in input