# AV

Source:
  - av.js, line 24

Contains all AV API classes and functions.

### Classes

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

### Namespaces

Cloud
Insight
Push

### Members

#### (static) parseJSON

Source:
  - av.js, line 254
Since:
  - 2.0.0

The inverse function of AV.Object#toFullJSON.

### Methods

#### (static) init(options)

Source:
  - init.js, line 50

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) request(options)

Source:
  - request.js, line 126
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:
  - init.js, line 124

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) setServerURLs(urls)

Source:
  - init.js, line 153
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`