Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.16 KB

notification.md

File metadata and controls

54 lines (36 loc) · 1.16 KB

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

Mark a thread as read using its ID

$client->api('notification')->markThreadRead($id);

Marks a single thread as read using its ID.

Get a single thread using its ID

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

Retrieves single thread's data using its ID.