File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Notification API
2
+ [ Back to the navigation] ( index.md )
3
+
4
+ Listing notifications and marking them as read.
5
+ Wraps [ GitHub Notification API] ( https://developer.github.com/v3/activity/notifications/ ) .
6
+
7
+ ### List notifications
8
+
9
+ ``` php
10
+ $issues = $client->api('notification')->all();
11
+ ```
12
+
13
+ Returns an array of unread notifications.
14
+
15
+ ### Include already read notifications, including participating, or since a certain date
16
+
17
+ ``` php
18
+ $includingRead = true;
19
+ $participating = true;
20
+ $since = new DateTime('1970/01/01');
21
+ $issues = $client->api('notification')->all($includingRead, $participating, $since);
22
+ ```
23
+
24
+ Returns an array of all notifications
25
+
26
+ ### Mark notifications as read
27
+
28
+ ``` php
29
+ $client->api('notification')->markRead();
30
+ ```
31
+
32
+ or up until a certain date
33
+
34
+ ``` php
35
+ $client->api('notification')->markRead(new DateTime('2015/01/01'));
36
+ ```
37
+
38
+ Marks all notifications as read up until the current date, unless a date is given
You can’t perform that action at this time.
0 commit comments