# Class: Request

## Request(data)

对DuerOS请求bot的request body进行封装

## Constructor

#### new Request(data)

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | request body

Source:
  - Request.js, line 26

### Methods

#### getAudioPlayerContext() → {Mixed}

获取设备音频播放的状态

Source:
  - Request.js, line 87

##### Returns:

Type
  Mixed

#### getBotId() → {string}

获取bot id

Source:
  - Request.js, line 162

##### Returns:

Type
  string

#### getData() → {Object}

获取Request 的数据

Source:
  - Request.js, line 51

##### Returns:

Type
  Object

#### getEventData() → {Mixed}

返回event request数据

Source:
  - Request.js, line 98

##### Returns:

Type
  Mixed

#### getLocation()

获取地理位置

Source:
  - Request.js, line 173

##### Returns:

array

#### getNlu() → {Nlu}

获取nlu 对象

Source:
  - Request.js, line 69

##### Returns:

Type
  Nlu

#### getQuery() → {string}

获取请求的query

Source:
  - Request.js, line 125

##### Returns:

Type
  string

#### getSession() → {Session}

获取session 对象

Source:
  - Request.js, line 60

##### Returns:

Type
  Session

#### getType() → {string}

获取请求类型

Source:
  - Request.js, line 78

##### Returns:

Type
  string

#### getUserId() → {string}

获取用户的user id

Source:
  - Request.js, line 113

##### Returns:

Type
  string

#### isDialogStateCompleted() → {boolean}

判断槽位是否填完。针对于填槽多轮。

Source:
  - Request.js, line 184

##### Returns:

Type
  boolean

#### isLaunchRequest() → {boolean}

判断是否为调起bot的请求

Source:
  - Request.js, line 138

##### Returns:

Type
  boolean

#### isSessionEndedRequest() → {boolean}

判断是否为结束对话的请求

Source:
  - Request.js, line 150

##### Returns:

Type
  boolean