Skip to content
This repository was archived by the owner on Aug 8, 2019. It is now read-only.

Latest commit

 

History

History
38 lines (26 loc) · 907 Bytes

File metadata and controls

38 lines (26 loc) · 907 Bytes

Notification API

Back to the navigation

Listing notifications and marking them as read. Wraps GitHub Notification API.

List notifications

$issues = $client->api('notification')->all();

Returns an array of unread notifications.

Include already read notifications, including participating, or since a certain date

$includingRead = true;
$participating = true;
$since = new DateTime('1970/01/01');
$issues = $client->api('notification')->all($includingRead, $participating, $since);

Returns an array of all notifications

Mark notifications as read

$client->api('notification')->markRead();

or up until a certain date

$client->api('notification')->markRead(new DateTime('2015/01/01'));

Marks all notifications as read up until the current date, unless a date is given