How to get GitHub API notifications corresponding to the notification site

I am trying to get the same information from GitHub as on https://github.com/notifications . Unfortunately, the standard notification API does not actually match this view.

If I receive notifications from this API (even with participating=false), I do not see all the elements visible on the website. On the other hand, the API seems to be based on the idea last_read_at, and everything I saw on the website does not automatically disappear from the notification list.

Is there a way (without scraping the site) to get the same look /notifications?

+6
source share
1 answer

, API GitHub , , API 30 . 100, 1 , , .

<https://api.github.com/notifications?page=1&per_page=100>; rel="next"
<https://api.github.com/notifications?page=2&per_page=100>; rel="next"
...and so on till you get an empty list then you stop

rel= "next" - , : https://developer.github.com/v3/#pagination

,

+2

Source: https://habr.com/ru/post/1015890/


All Articles