- Source:
Contains functions for calling and declaring
Some functions are only available from Cloud Code.
Members
(static) requestCaptcha
- Source:
Request a captcha.
Methods
(static) getServerDate() → {Promise.<Date>}
- Source:
- Since:
- 0.5.9
Make a call to request server date time.
Returns:
A promise that will be resolved with the result
of the function.
- Type
- Promise.<Date>
(static) requestCaptcha(optionsopt) → {Promise.<AV.Captcha>}
- Source:
Request a captcha
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
<optional> |
Properties
|
Returns:
- Type
- Promise.<AV.Captcha>
(static) requestSmsCode(data, optionsopt) → {Promise}
- Source:
Makes a call to request an sms code for operation verification.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
String | Object | The mobile phone number string or a JSON
object that contains mobilePhoneNumber,template,sign,op,ttl,name etc.
Properties
|
|||||||||||||||||||||
options |
SMSAuthOptions |
<optional> |
Returns:
A promise that will be resolved if the request succeed
- Type
- Promise
(static) rpc(name, dataopt, optionsopt) → {Promise}
- Source:
Makes a call to a cloud function, you can send {AV.Object} as param or a field of param; the response
from server will also be parsed as an {AV.Object}, array of {AV.Object}, or object includes {AV.Object}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String | The function name. | |
data |
Object |
<optional> |
The parameters to send to the cloud function. |
options |
AuthOptions |
<optional> |
Returns:
A promise that will be resolved with the result of the function.
- Type
- Promise
(static) run(name, dataopt, optionsopt) → {Promise}
- Source:
Makes a call to a cloud function.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String | The function name. | |
data |
Object |
<optional> |
The parameters to send to the cloud function. |
options |
AuthOptions |
<optional> |
Returns:
A promise that will be resolved with the result
of the function.
- Type
- Promise
(static) useMasterKey()
Switches the LeanCloud SDK to using the Master key. The Master key grants
priveleged access to the data in LeanCloud and can be used to bypass ACLs and
other restrictions that are applied to the client SDKs.
Available in Cloud Code and Node.js only.
(static) verifyCaptcha(code, captchaToken) → {Promise.<String>}
- Source:
Verify captcha code. This is the low-level API for captcha.
Checkout AV.Captcha for high abstract APIs.
Parameters:
Name | Type | Description |
---|---|---|
code |
String | the code from user input |
captchaToken |
String | captchaToken returned by AV.Cloud.requestCaptcha |
Returns:
validateToken if the code is valid
- Type
- Promise.<String>
(static) verifySmsCode(code, phone) → {Promise}
- Source:
Makes a call to verify sms code that sent by AV.Cloud.requestSmsCode
Parameters:
Name | Type | Description |
---|---|---|
code |
String | The sms code sent by AV.Cloud.requestSmsCode |
phone |
phone | The mobile phoner number. |
Returns:
A promise that will be resolved with the result
of the function.
- Type
- Promise