Skip to content

Commit

Permalink
add appi
Browse files Browse the repository at this point in the history
  • Loading branch information
Helperhaps committed Sep 27, 2018
1 parent aef95c0 commit 1f6982e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ $schedule->getSchedule($schedule_id);

// 删除指定定时任务
$schedule->deleteSchedule($schedule_id);

// 获取定时任务对应的所有 msg_id
$schedule->getMsgIds($schedule_id);
```

## Exception Handle
Expand Down
9 changes: 9 additions & 0 deletions src/JPush/SchedulePayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,14 @@ public function deleteSchedule($schedule_id) {
$url = $this->client->makeURL('schedule') . "/" . $schedule_id;
return Http::delete($this->client, $url);
}

public function getMsgIds($schedule_id) {
if (!is_string($schedule_id)) {
throw new InvalidArgumentException('Invalid schedule id');
}
$url = $this->client->makeURL('schedule') . '/' . $schedule_id . '/msg_ids';
return Http::get($this->client, $url);
}

}

2 changes: 1 addition & 1 deletion src/JPush/version.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
namespace JPush;

const VERSION = '3.6.1';
const VERSION = '3.6.2';

0 comments on commit 1f6982e

Please sign in to comment.