README advice on GitHub API limits?
-
Say I wanted to embed 100 GH sources into an arbitrary page using github-embed, am I going to encounter problems as a concurrently in logged in GH user?
-
Same Q but as a not-logged-in guest to GH?
Good question. Deserves an answer.
@paul-hammant @DevinWalker per https://developer.github.com/v3/#rate-limiting
For unauthenticated requests, the rate limit allows for up to 60 requests per hour.
But if an API request fails, the library makes simple Fetch request to githubusercontent (see the code). It works because they send header Access-Control-Allow-Origin: *. Theoretically, one day they can change the header but since they didn't do it last few years, I can say the limit is infinite. To test that, open the demo page, open Network tab at developer tools and reload the page many times. Nth (I suppose 31th) time API requests will fail but the fallback bypasses that and the widget is rendered correctly.
Sorry for late reply.
Great thanks for the thorough response! I'm probably going to implement this on our site in the coming week.