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:
-
pluralModelName
String -
[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:
-
lbPromisedInfo
LoopbackPromised | Object-
baseURL
Stringbase 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:
-
options
Object-
one
Stringthe "one" side plural model of one-to-many relationship
-
many
Stringthe "many" side plural model of one-to-many relationship
-
id
Anythe 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:
-
pluralModelName
String -
[clientInfo]
Object optional-
[accessToken]
String optionalAccess Token
-
[debug]
Boolean optionalshows debug log if true
-
Returns:
isDebugMode
-
debug
check environment variable concerning debug
Parameters:
-
debug
Boolean
Returns:
shows debug log or not
request
-
pluralModelName
-
path
-
params
-
http_method
-
[clientInfo]
sends request to Loopback
Parameters:
-
pluralModelName
String -
path
String -
params
Objectrequest parameters
-
http_method
String{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:
-
endpoint
String -
[params]
Object optional -
http_method
String{GET|POST|PUT|DELETE|HEAD}
-
[clientInfo]
LoopbackClient | Object optional-
[accessToken]
String optionalAccess Token
-
[debug]
Boolean optionalshows debug log if true
-
-
lbPromisedInfo
LoopbackPromised | Object-
baseURL
Stringbase URL of Loopback
-
[version]
String optionalversion of Loopback API to access
-
[logger]
Object optionallogger with info(), warn(), error(), trace().
-