Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac3ef2c

Browse files
committed
describe notifications polling
1 parent40b2793 commitac3ef2c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎content/v3/activity/notifications.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ user is involved including:
2626
Notifications come back as Summary objects. A Summary contains information
2727
about the current discussion of an Issue/PullRequest/Commit.
2828

29+
Notifications are optimized for polling with the "Last-Modified" header. If
30+
there are no new notifications, you will see a "304 Not Modified" response,
31+
leaving your current rate limit untouched. There is an "X-Poll-Interval"
32+
header that specifies how often (in seconds) you are allowed to poll. In times
33+
of high server load, the time may increase. Please obey the header.
34+
35+
# Add authentication to your requests
36+
$ curl -I https://api.github.com/notifications
37+
HTTP/1.1 200 OK
38+
Last-Modified: Thu, 25 Oct 2012 15:16:27 GMT
39+
X-Poll-Interval: 60
40+
41+
# Pass the Last-Modified header exactly
42+
$ curl -I https://api.github.com/notifications
43+
-H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT"
44+
HTTP/1.1 304 Not Modified
45+
X-Poll-Interval: 60
46+
2947
##List your notifications
3048

3149
List all notifications for the current user, grouped by repository.
@@ -153,3 +171,4 @@ repository.
153171
###Response
154172

155173
<%= headers 204 %>
174+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp