简体   繁体   English

Github API v3事件通过api检索所有事件

[英]Github API v3 Events to retrieve all events through api

I wanted to confirm that the GitHub API for events provides only the latest 300 events only or is can I get the entire list of events?我想确认事件的 GitHub API 仅提供最新的 300 个事件,或者我可以获得整个事件列表吗?

A bit of searching led me to this answer on another question: How do I get a list of all the GitHub projects I've contributed to in the last year? 经过一些搜索,我得到了另一个问题的答案: 如何获得我去年贡献的所有GitHub项目的列表?

The application is hosted at opensourcecontributo.rs . 该应用程序托管在opensourcecontributo.rs Simply input your GitHub username, then you will have two tabs to use, allowing you to list all the repositories you contributed to, and all your events. 只需输入GitHub用户名,即可使用两个选项卡,从而可以列出您贡献的所有存储库以及所有事件。 The source code is available on GitHub at tenex/opensourcecontributors . 源代码可在Tenex / opensourcecontributors的 GitHub上获得。

I guess this application does what I suggested in my comment to your question: for recent data it may just use the API, and for older data it may use the timeline to enumerate repositories, then use the API to inspect these repositories. 我想这个应用程序可以完成我在对您的问题的评论中建议的操作:对于最近的数据,它可能只使用API​​,对于较旧的数据,它可以使用时间轴枚举存储库,然后使用API​​来检查这些存储库。 I definitely have to take a look at this code. 我绝对必须看一下这段代码。

My understanding is that GitHub's API doesn't limit you to 300 events, but instead only events that have occurred in the last 90 days我的理解是 GitHub 的 API 并没有将你限制为 300 个事件,而是仅限于过去 90 天内发生的事件

Only events created within the past 90 days will be included in timelines.只有在过去 90 天内创建的事件才会包含在时间线中。 > > Events older than 90 days will not be included (even if the total number of > events in the timeline is less than 300). > > 超过 90 天的事件将不包括在内(即使时间线中 > 事件的总数少于 300)。

https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-public-events-for-a-user https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-public-events-for-a-user

If you are looking for the raw number of events that a user created on any day historically through their account, I created a script that works within GitHub's current HTML display and web scraping instead of using their API (as I can't find a way to acquire this kind of data through their API).如果您正在寻找用户在历史上任何一天通过他们的帐户创建的事件的原始数量,我创建了一个在 GitHub 当前的 HTML 显示和 web 抓取中工作的脚本,而不是使用他们的 API(因为我找不到方法通过他们的 API 获取此类数据)。 As a note, the details of each event although can be displayed in the UI, is activated by private calls so I don't believe there is an easy way to access that data.请注意,每个事件的详细信息虽然可以显示在 UI 中,但是由私人电话激活的,因此我认为没有一种简单的方法可以访问该数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM