@@ -17,55 +17,50 @@ view and mark notifications as read.
1717The core notifications functionality is under the` /notifications ` endpoint.
1818You can look for unread notifications:
1919
20- <pre class =" terminal " >
21- $ curl https://api.github.com/notifications
22- </pre >
20+ {:.terminal}
21+ $ curlhttps://api.github.com/notifications
2322
2423You can filter these notifications to a single Repository:
2524
26- <pre class =" terminal " >
27- $ curl https://api.github.com/repos/technoweenie/faraday/notifications
28- </pre >
25+ {:.terminal}
26+ $ curlhttps://api.github.com/repos/technoweenie/faraday/notifications
2927
3028You can mark them as read:
3129
32- < pre class = " terminal " >
33- # all notifications
34- $ curl https://api.github.com/notifications \
35- -X PUT -d '{"read": true}'
30+ {:. terminal}
31+ # all notifications
32+ $ curlhttps://api.github.com/notifications \
33+ -X PUT -d '{"read": true}'
3634
37- # notifications for a single repository
38- $ curl https://api.github.com/repos/technoweenie/faraday/notifications \
39- -X PUT -d '{"read": true}'
40- </pre >
35+ # notifications for a single repository
36+ $ curl https://api.github.com/repos/technoweenie/faraday/notifications \
37+ -X PUT -d '{"read": true}'
4138
4239You can also modify subscriptions for a Repository or a single thread.
4340
44- < pre class = " terminal " >
45- # subscription details for the thread (either an Issue or Commit)
46- $ curl https://api.github.com/notifications/threads/1/subscription
41+ {:. terminal}
42+ # subscription details for the thread (either an Issue or Commit)
43+ $ curlhttps://api.github.com/notifications/threads/1/subscription
4744
48- # subscription details for a whole Repository.
49- $ curl https://api.github.com/repos/technoweenie/faraday/subscription
50- </pre >
45+ # subscription details for a whole Repository.
46+ $ curl https://api.github.com/repos/technoweenie/faraday/subscription
5147
5248##Polling
5349
5450The Notifications API is optimized for polling by the last modified time:
5551
56- <pre class =" terminal " >
57- # Add authentication to your requests
58- $ curl -I https://api.github.com/notifications
59- HTTP/1.1 200 OK
60- Last-Modified: Thu, 25 Oct 2012 15:16:27 GMT
61- X-Poll-Interval: 60
62-
63- # Pass the Last-Modified header exactly
64- $ curl -I https://api.github.com/notifications
65- -H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT"
66- HTTP/1.1 304 Not Modified
67- X-Poll-Interval: 60
68- </pre >
52+ {:.terminal}
53+ # Add authentication to your requests
54+ $ curl -Ihttps://api.github.com/notifications
55+ HTTP/1.1 200 OK
56+ Last-Modified: Thu, 25 Oct 2012 15:16:27 GMT
57+ X-Poll-Interval: 60
58+
59+ # Pass the Last-Modified header exactly
60+ $ curl -I https://api.github.com/notifications
61+ -H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT"
62+ HTTP/1.1 304 Not Modified
63+ X-Poll-Interval: 60
6964
7065You can read about the API details in depth in the[ Notifications documentation] [ api ] .
7166