knplabs/github-api
Lightweight, well-tested PHP wrapper for GitHub APIs v3 (REST) and v4 (GraphQL). PSR-17/PSR-18 compatible via HTTPlug, with easy setup using Guzzle, Symfony HttpClient, or other PSR clients. Supports framework integrations (Laravel via graham-campbell/github).
Listing notifications and marking them as read. Wraps GitHub Notification API.
$issues = $client->api('notification')->all();
Returns an array of unread notifications.
$includingRead = true;
$participating = true;
$since = new DateTime('1970/01/01');
$issues = $client->api('notification')->all($includingRead, $participating, $since);
Returns an array of all notifications
$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
$client->api('notification')->markThreadRead($id);
Marks a single thread as read using its ID.
$client->api('notification')->id($id);
Retrieves single thread's data using its ID.
How can I help you explore Laravel packages today?