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

Commit40ae5b8

Browse files
committed
more tweaks
summary => threadremoved /mark rpc endpoint
1 parentf223a5b commit40ae5b8

File tree

2 files changed

+64
-26
lines changed

2 files changed

+64
-26
lines changed

‎content/v3/activity/notifications.md‎

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ user is involved including:
2323
* Commits the user authors or commits
2424
* Any discussion in which the user actively participates
2525

26-
Notifications come back asSummary objects. ASummary contains information
27-
about thecurrent discussion of an Issue/PullRequest/Commit.
26+
Notifications come back as"threads". AThread contains information about the
27+
current discussion of an Issue/PullRequest/Commit.
2828

2929
Notifications are optimized for polling with the "Last-Modified" header. If
3030
there are no new notifications, you will see a "304 Not Modified" response,
@@ -67,7 +67,7 @@ time. The time should be passed in as UTC in the ISO 8601 format:
6767
###Response
6868

6969
<%= headers 200 %>
70-
<%= json(:summary) { |h|[h] } %>
70+
<%= json(:thread) { |h|[h] } %>
7171

7272
##List your notifications in a repository
7373

@@ -84,17 +84,35 @@ participating
8484
:_Optional_**boolean**`true` to show only notifications in which the user is
8585
directly participating or mentioned.
8686

87+
since
88+
:_Optional_**time** filters out any notifications updated before the given
89+
time. The time should be passed in as UTC in the ISO 8601 format:
90+
`YYYY-MM-DDTHH:MM:SSZ`. Example: "2012-10-09T23:39:01Z".
91+
8792
###Response
8893

8994
<%= headers 200 %>
90-
<%= json(:summary) { |h|[h] } %>
95+
<%= json(:thread) { |h|[h] } %>
9196

9297
##Mark as read
9398

9499
Marking a notification as "read" removes it from the[default view
95100
on GitHub.com](https://github.com/notifications).
96101

97-
POST /notifications/mark
102+
PUT /notifications
103+
104+
###Input
105+
106+
unread
107+
:**Boolean** Changes the unread status of the threads.
108+
109+
read
110+
:**Boolean** Inverse of "unread".
111+
112+
last_read_at
113+
:_Optional_**Time** Describes the last point that notifications were checked. Anything
114+
updated since this time will not be updated. Default: Now. Expected in ISO
115+
8601 format:`YYYY-MM-DDTHH:MM:SSZ`. Example: "2012-10-09T23:39:01Z".
98116

99117
###Response
100118

@@ -105,49 +123,70 @@ on GitHub.com](https://github.com/notifications).
105123
Marking all notifications in a repository as "read" removes them
106124
from the[default view on GitHub.com](https://github.com/notifications).
107125

108-
POST /repos/:owner/:repo/notifications/mark
126+
PUT /repos/:owner/:repo/notifications
127+
128+
###Input
129+
130+
unread
131+
:**Boolean** Changes the unread status of the threads.
132+
133+
read
134+
:**Boolean** Inverse of "unread".
135+
136+
last_read_at
137+
:_Optional_**Time** Describes the last point that notifications were checked. Anything
138+
updated since this time will not be updated. Default: Now. Expected in ISO
139+
8601 format:`YYYY-MM-DDTHH:MM:SSZ`. Example: "2012-10-09T23:39:01Z".
109140

110141
###Response
111142

112143
<%= headers 205 %>
113144

114-
##View a singlesummary
145+
##View a singlethread
115146

116-
GET /notifications/summaries/:id
147+
GET /notifications/threads/:id
117148

118149
###Response
119150

120151
<%= headers 200 %>
121-
<%= json(:summary) { |h|[h] } %>
152+
<%= json(:thread) { |h|[h] } %>
153+
154+
##Mark a thread as read
155+
156+
PATCH /notifications/threads/:id
157+
158+
###Input
122159

123-
##Mark a summary as read
160+
unread
161+
:**Boolean** Changes the unread status of the threads.
124162

125-
POST /notifications/summaries/:id/mark
163+
read
164+
:**Boolean** Inverse of "unread".
126165

127166
###Response
128167

129168
<%= headers 205 %>
130169

131-
##Get aSummary Subscription
170+
##Get aThread Subscription
132171

133-
This checks to see if the current user is subscribed to asummary. You can also
172+
This checks to see if the current user is subscribed to athread. You can also
134173
[get a Repository subscription](http://localhost:3000/v3/activity/watching/#get-a-repository-subscription).
135174

136-
GET /notifications/summary/1/subscription
175+
GET /notifications/threads/1/subscription
137176

138177
###Response
139178

140179
<%= headers 200 %>
141180
<%= json:subscription %>
142181

143-
##Set aSummary Subscription
182+
##Set aThread Subscription
144183

145-
This lets you subscribe to asummary, or ignore it. Subscribing to asummary
184+
This lets you subscribe to athread, or ignore it. Subscribing to athread
146185
is unnecessary if the user is already subscribed to the repository. Ignoring
147-
asummary will mute all future notifications (until you comment or get
186+
athread will mute all future notifications (until you comment or get
148187
@mentioned).
149188

150-
PUT /notifications/summary/1/subscription
189+
PUT /notifications/threads/1/subscription
151190

152191
###Input
153192

@@ -164,9 +203,9 @@ repository.
164203
<%= headers 200 %>
165204
<%= json:subscription %>
166205

167-
##Delete aSummary Subscription
206+
##Delete aThread Subscription
168207

169-
DELETE /notifications/summary/1/subscription
208+
DELETE /notifications/threads/1/subscription
170209

171210
###Response
172211

‎lib/resources.rb‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ def text_html(response, status, head = {})
965965
:size=>100
966966
}
967967

968-
SUMMARY={
968+
THREAD={
969969
:id=>1,
970970
:repository=>SIMPLE_REPO,
971971
:subject=>{
@@ -977,23 +977,22 @@ def text_html(response, status, head = {})
977977
:unread=>true,
978978
:updated_at=>'2012-09-25T07:54:41-07:00',
979979
:last_read_at=>'2012-09-25T07:54:41-07:00',
980-
:url=>"https://api.github.com/notifications/summaries/1",
981-
:mark_url=>"https://api.github.com/notifications/summaries/1/mark",
980+
:url=>"https://api.github.com/notifications/threads/1"
982981
}
983982

984983
SUBSCRIPTION={
985984
:subscribed=>true,
986985
:ignored=>false,
987986
:reason=>nil,
988987
:created_at=>"2012-10-06T21:34:12Z",
989-
:url=>"https://api.github.com/notifications/summaries/1/subscription",
990-
:summary_url=>"https://api.github.com/notifications/summaries/1"
988+
:url=>"https://api.github.com/notifications/threads/1/subscription",
989+
:thread_url=>"https://api.github.com/notifications/threads/1"
991990
}
992991

993992
REPO_SUBSCRIPTION=SUBSCRIPTION.merge \
994993
:url=>"https://api.github.com/repos/octocat/example/subscription",
995994
:repository_url=>"https://api.github.com/repos/octocat/example"
996-
REPO_SUBSCRIPTION.delete:summary_url
995+
REPO_SUBSCRIPTION.delete:thread_url
997996
end
998997
end
999998

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp