Skip to content

Commit 23fc996

Browse files
committed
simplified structure
1 parent 8b0c03b commit 23fc996

File tree

2 files changed

+5
-40
lines changed

2 files changed

+5
-40
lines changed

content/v3/activity/notifications.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ directly participating or mentioned.
6969
### Response
7070

7171
<%= headers 200 %>
72-
<%= json(:summaries) %>
72+
<%= json(:summary) { |h| [h] } %>
7373

7474
## Mark as read
7575

@@ -97,15 +97,10 @@ from the [default view on GitHub.com](https://github.com/notifications).
9797

9898
GET /notifications/summaries/:id
9999

100-
### Issue Summary Response
101-
102-
<%= headers 200 %>
103-
<%= json(:issue_summary) { |h| [h] } %>
104-
105-
### Commit Summary Response
100+
### Response
106101

107102
<%= headers 200 %>
108-
<%= json(:commit_summary) { |h| [h] } %>
103+
<%= json(:summary) { |h| [h] } %>
109104

110105
## Mark a summary as read
111106

lib/resources.rb

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -964,49 +964,19 @@ def text_html(response, status, head = {})
964964
:size => 100
965965
}
966966

967-
ISSUE_SUMMARY = {
967+
SUMMARY = {
968968
:id => 1,
969969
:repository => SIMPLE_REPO,
970-
:thread => {
971-
:type => "Issue",
972-
:id => 123,
970+
:subject => {
973971
:title => "Greetings",
974-
:state => 'open',
975-
:number => 123,
976972
:url => "https://api.github.com/repos/pengwynn/octokit/issues/123"
977973
},
978-
:comment => {
979-
:type => "IssueComment",
980-
:id => 456,
981-
:body => "Hello",
982-
:author => USER,
983-
:created_at => '2012-09-25T07:54:41-07:00',
984-
:url => "https://api.github.com/repos/pengwynn/octokit/issues/comments/456"
985-
},
986974
:reason => 'subscribed',
987975
:unread => true,
988976
:updated_at => '2012-09-25T07:54:41-07:00',
989977
:last_read_at => '2012-09-25T07:54:41-07:00'
990978
}
991979

992-
COMMIT_SUMMARY = ISSUE_SUMMARY.merge \
993-
:thread => {
994-
:type => "Commit",
995-
:title => "added readme, because im a good github citizen",
996-
:id => "7638417db6d59f3c431d3e1f261cc637155684cd",
997-
:url => "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd"
998-
},
999-
:comment => {
1000-
:type => "CommitComment",
1001-
:id => 1,
1002-
:author => USER,
1003-
:body => "Great stuff",
1004-
:created_at => '2012-09-25T07:54:41-07:00',
1005-
:url => "https://api.github.com/repos/octocat/Hello-World/comments/1"
1006-
}
1007-
1008-
SUMMARIES = [ISSUE_SUMMARY, COMMIT_SUMMARY]
1009-
1010980
SUBSCRIPTION = {
1011981
:subscribed => true,
1012982
:ignored => false,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy