AV

AV

Source:
Contains all AV API classes and functions.

Classes

ACL
Captcha
Conversation
Error
File
GeoPoint
InboxQuery
Leaderboard
LiveQuery
Object
Query
Relation
Role
SearchQuery
SearchSortBuilder
Status
User

Namespaces

Cloud
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
The update strategy for Leaderboard

(static) LeaderboardVersionChangeInterval

Source:
Properties:
Name Type Description
NEVER
HOUR
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 Default Description
appId String application id
appKey String application key
masterKey String <optional>
application master key
region String <optional>
'cn' region
production Boolean <optional>
serverURLs String | ServerURLs <optional>
URLs for services. if a string was given, it will be applied for all services.
disableCurrentUser Boolean <optional>

(static) parseJSON(return)

Source:
Since:
  • 2.0.0
The inverse function of AV.Object#toFullJSON.
Parameters:
Name Type Description
return Object {AV.Object|AV.File|any}

(static) request(options)

Source:
Since:
  • 3.0.0
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) 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:
  • 3.6.0
Set a deadline for requests to complete. Note that file upload requests are not affected.
Parameters:
Name Type Description
ms number

(static) setServerURLs(urls)

Source:
Since:
  • 3.0.0
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.serverURLs`