DiscoveryService Class
Creates an instance of discovery service. Discovery service is used internally to discover resources URI and media type provided in the root resource.
Constructor
DiscoveryService
(
-
rootPath
-
connectionManager
Parameters:
-
rootPath
Stringpath to Root resource
-
connectionManager
ConnectionManager
Item Index
Methods
Methods
_copyToCache
(
protected
-
object
Copy all the properties of the target object into the cache
Parameters:
-
object
Objectthe object to cache
_discoverRoot
(
protected
-
rootPath
-
callback
Load the REST root resource
getInfoObject
(
-
name
-
callback
Get the information for given object name (located under the root). The information is provided as the second argument of the callback unless there's a network issue while loading the REST root resource or if there's no resource associated with the given name.
Parameters:
-
name
Stringname of the target object (located under the root, e.g. "Trash")
-
callback
Function