- Source:
Contains all AV API classes and functions.
Classes
- ACL
- Captcha
- Conversation
- Error
- File
- Friendship
- GeoPoint
- InboxQuery
- Leaderboard
- LiveQuery
- Object
- Query
- Relation
- Role
- SearchQuery
- SearchSortBuilder
- Status
- User
Namespaces
- Cloud
- debug
- Insight
- Push
Members
(static) LeaderboardOrder
- Source:
Properties:
Name |
Type |
Description |
ASCENDING |
|
|
DESCENDING |
|
|
The order of the leaderboard results
(static) LeaderboardUpdateStrategy
- Source:
Properties:
Name |
Type |
Description |
BETTER |
|
Only keep the best statistic. If the leaderboard is in descending order, the best statistic is the highest one. |
LAST |
|
Keep the last updated statistic |
SUM |
|
Keep the sum of all updated statistics |
The update strategy for Leaderboard
(static) LeaderboardVersionChangeInterval
- Source:
Properties:
Name |
Type |
Description |
NEVER |
|
|
DAY |
|
|
WEEK |
|
|
MONTH |
|
|
The version change interval for Leaderboard
Methods
(static) init(options)
- Source:
Call this method first to set up your authentication tokens for AV.
You can get your app keys from the LeanCloud dashboard on http://leancloud.cn .
Parameters:
Name |
Type |
Description |
options |
Object
|
Properties
Name |
Type |
Attributes |
Description |
appId |
String
|
|
application id |
appKey |
String
|
|
application key |
masterKey |
String
|
<optional>
|
application master key |
production |
Boolean
|
<optional>
|
|
serverURL |
String
|
ServerURLs
|
<optional>
|
URLs for services. if a string was given, it will be applied for all services. |
disableCurrentUser |
Boolean
|
<optional>
|
|
|
- Source:
- Since:
Similar to JSON.parse, except that AV internal types will be used if possible.
Inverse to
AV.stringify
Parameters:
Name |
Type |
Description |
text |
string
|
the string to parse. |
Returns:
-
Type
-
AV.Object
|
AV.File
|
any
(static) parseJSON(return)
- Source:
- Since:
Parameters:
Name |
Type |
Description |
return |
Object
|
{AV.Object|AV.File|any} |
(static) request(options)
- Source:
- Since:
Low level REST API client. Call REST endpoints with authorization headers.
Parameters:
Name |
Type |
Description |
options |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
method |
String
|
|
|
HTTP method |
path |
String
|
|
|
endpoint path, e.g. `/classes/Test/55759577e4b029ae6015ac20` |
query |
Object
|
<optional>
|
|
query string dict |
data |
Object
|
<optional>
|
|
HTTP body |
authOptions |
AuthOptions
|
<optional>
|
|
|
service |
String
|
<optional>
|
'api'
|
|
version |
String
|
<optional>
|
'1.1'
|
|
|
(static) setAdapters(newAdapters)
- Source:
- Since:
Specify Adapters
Parameters:
(static) setProduction(production)
- Source:
Call this method to set production environment variable.
Parameters:
Name |
Type |
Description |
production |
Boolean
|
True is production environment,and
it's true by default. |
(static) setRequestTimeout(ms)
- Source:
- Since:
Set a deadline for requests to complete.
Note that file upload requests are not affected.
Parameters:
Name |
Type |
Description |
ms |
number
|
|
(static) setServerURL(urls)
- Source:
- Since:
Set server URLs for services.
Parameters:
Name |
Type |
Description |
urls |
String
|
ServerURLs
|
URLs for services. if a string was given, it will be applied for all services.
You can also set them when initializing SDK with `options.serverURL` |
(static) stringify() → {string}
- Source:
- Since:
Serialize a target containing AV.Object, similar to JSON.stringify.
Inverse to
AV.parse
Returns:
-
Type
-
string