LoopbackPromised Class
LoopbackPromised
Item Index
Methods
- createClient
- createInstance static
- createPushManager
- createRelatedClient
- createUserClient
- isDebugMode static
- request
- requestStatic static
Methods
createClient
-
pluralModelName -
[options]
creates client for Loopback
Parameters:
-
pluralModelNameString -
[options]Object optional-
[belongsTo]Object optionalkey: pluralModelName (the "one" side of one-to-many relation), value: id
-
[isUserModel]Boolean optionaltrue if user model
-
[accessToken]String optionalAccess Token
-
[debug]Boolean optionalshows debug log if true
-
Returns:
createInstance
-
lbPromisedInfo
creates an instance
Parameters:
-
lbPromisedInfoLoopbackPromised | Object-
baseURLStringbase URL of Loopback
-
[logger]Object optionallogger with info(), warn(), error(), trace().
-
[version]String optionalversion of Loopback API to access
-
Returns:
createPushManager
-
[clientInfo]
creates push manager
Parameters:
-
[clientInfo]Object optional-
[accessToken]String optionalAccess Token
-
[debug]Boolean optionalshows debug log if true
-
Returns:
createRelatedClient
-
options
creates related client (one-to-many relation)
Parameters:
-
optionsObject-
oneStringthe "one" side plural model of one-to-many relationship
-
manyStringthe "many" side plural model of one-to-many relationship
-
idAnythe id of the "one" model
-
[accessToken]String optionalAccess Token
-
[debug]Boolean optionalshows debug log if true
-
Returns:
createUserClient
-
pluralModelName -
[clientInfo]
creates user client for Loopback
Parameters:
-
pluralModelNameString -
[clientInfo]Object optional-
[accessToken]String optionalAccess Token
-
[debug]Boolean optionalshows debug log if true
-
Returns:
isDebugMode
-
debug
check environment variable concerning debug
Parameters:
-
debugBoolean
Returns:
shows debug log or not
request
-
pluralModelName -
path -
params -
http_method -
[clientInfo]
sends request to Loopback
Parameters:
-
pluralModelNameString -
pathString -
paramsObjectrequest parameters
-
http_methodString{GET|POST|PUT|DELETE|HEAD}
-
[clientInfo]LoopbackClient | Object optional-
[accessToken]String optionalAccess Token
-
[debug]Boolean optionalshows debug log if true
-
Returns:
requestStatic
-
endpoint -
[params] -
http_method -
[clientInfo] -
lbPromisedInfo
calls rest api directly
Parameters:
-
endpointString -
[params]Object optional -
http_methodString{GET|POST|PUT|DELETE|HEAD}
-
[clientInfo]LoopbackClient | Object optional-
[accessToken]String optionalAccess Token
-
[debug]Boolean optionalshows debug log if true
-
-
lbPromisedInfoLoopbackPromised | Object-
baseURLStringbase URL of Loopback
-
[version]String optionalversion of Loopback API to access
-
[logger]Object optionallogger with info(), warn(), error(), trace().
-
