Reputation: 1070
I've setup a github pages site here: http://d3js.live
This uses the github api to get gists for d3.js examples. The end look and functionality is similar to this site: http://threejs.live
I'm getting a 403 error due to my rate limit being hit. I understand that authenticating will increase my rate limit, however I'd like this site to be public. Because of this, I have a few questions:
Mike Bostock's bl.ocks seems to get around the rate limit but it's not clear to me how this is done.
Upvotes: 3
Views: 633
Reputation: 12247
The best way to get around the limit is to write a simple back-end that makes the API requests to GitHub (or whoever), cache those results for some time to remain below the rate limit, and then serve all the required assets from that request to your users.
If your JavaScript is polymorphic, it should be fairly trivial to put most of what you already have in a NodeJS server.
As a general rule, this is probably what a tool like this should do, anyway. Of course, given the trade-off required, arguments could be made either way.
This is what bl.ocks seems to do, for example.
Upvotes: 1