Skip to content

Latest commit

 

History

History
146 lines (102 loc) · 4.88 KB

Request.md

File metadata and controls

146 lines (102 loc) · 4.88 KB

Request

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

Kind: global class

new Request(data)

constructor

Param Type Description
data Object request

request.getData() ⇒ Object

获取Request 的数据

Kind: instance method of Request

request.getSession() ⇒ Session

获取session 对象

Kind: instance method of Request

request.getNlu() ⇒ Nlu

获取nlu 对象

Kind: instance method of Request

request.getType() ⇒ string

获取请求类型

Kind: instance method of Request

request.getAudioPlayerContext() ⇒ Object

获取设备音频播放的状态

Kind: instance method of Request

request.getVideoPlayerContext() ⇒ Object

获取设备视频播放的状态

Kind: instance method of Request

request.getScreenContext() ⇒ Object

获取screen context

Kind: instance method of Request

request.getEventData() ⇒ Object

返回event request数据

Kind: instance method of Request

request.getUserId() ⇒ string

获取用户的user id

Kind: instance method of Request

request.getQuery() ⇒ string

获取请求的query

Kind: instance method of Request

request.isLaunchRequest() ⇒ boolean

判断是否为调起bot的请求

Kind: instance method of Request

request.isSessionEndedRequest() ⇒ boolean

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

Kind: instance method of Request

request.getBotId() ⇒ string

获取bot id

Kind: instance method of Request

request.getLocation() ⇒ null | Object

获取地理位置

Kind: instance method of Request

request.isDialogStateCompleted() ⇒ boolean

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

Kind: instance method of Request

request.getApiAccessToken() ⇒ string

获取apiAccessToken

Kind: instance method of Request

request.getApiEndPoint() ⇒ string

获取apiEndPoint

Kind: instance method of Request

request.getExternalAccessTokens() ⇒ Array

获取externalAccessTokens

Kind: instance method of Request