提交 d3147837 编写于 作者: R rcy-hw

update api and user guide

Signed-off-by: Nrcy-hw <renchunyang@huawei.com>
上级 7110a579
......@@ -30,7 +30,7 @@ Publishes an agent-powered reminder. This API uses an asynchronous callback to r
**Example**
```
timer: {
let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10
}
......@@ -60,7 +60,7 @@ Publishes an agent-powered reminder. This API uses a promise callback to return
**Example**
```
timer: {
let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10
}
......@@ -275,7 +275,7 @@ Adds a reminder notification slot. This API uses an asynchronous callback to ret
**Example**
```
mySlot: {
let mySlot = {
type: 3,
sound: "/sdcard/music2.mp3"
}
......@@ -308,16 +308,13 @@ Adds a reminder notification slot. This API uses a promise to return the result.
**Example**
```
export default { data: { mySlot: {
type: 3,
sound: "/sdcard/music2.mp3"
} },
addSlot() {
reminderAgent.addNotificationSlot(mySlot).then(() => {
console.log("do next");
});
}
let mySlot = {
type: 3,
sound: "/sdcard/music2.mp3"
}
reminderAgent.addNotificationSlot(mySlot).then(() => {
console.log("addNotificationSlot promise");
});
```
......
......@@ -30,7 +30,7 @@ publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback&lt;number&
**示例**
```
timer: {
let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10
}
......@@ -60,7 +60,7 @@ publishReminder(reminderReq: ReminderRequest): Promise&lt;number&gt;
**示例**
```
timer: {
let timer = {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 10
}
......@@ -275,7 +275,7 @@ addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback&lt;void&gt;)
**示例**
```
mySlot: {
let mySlot = {
type: 3,
sound: "/sdcard/music2.mp3"
}
......@@ -308,7 +308,7 @@ addNotificationSlot(slot: NotificationSlot): Promise&lt;void&gt;
**示例**
```
mySlot: {
let mySlot = {
type: 3,
sound: "/sdcard/music2.mp3"
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册