Closed rwdaigle closed 9 years ago
@zeke are you thinking something like this?
$ curl https://ghproxy.herokuapp.com/v1/zeke/queriac.json
{
".gitignore": "full body of file...",
"README.md": "full body of file..."
}
Where the file contents are part of the JSON response?
And what about directories, how are those handled?
Yep, that's what I'm picturing! But js files only, and no directories. Flat.
If you're building this thing in node, the npm-cdn codebase might be helpful: https://github.com/zeke/npm-cdn
The way I would do this is to pull down a repo tarball and extract it to /tmp
, rather than futzing with the github API. But I'll take what I can get!
:+1:
I'll see what I can do...
@zeke how does this look?
$ curl https://queriac-github-proxy.herokuapp.com/v1/zeke/queriac-commands
{
"_commands.js": "var basicCSV = ...",
"a.js": "// Search Amazon\n\n/*\nSearches all of amazon.com\n*/\n\nlocation = \"http://www.amazon.com/s/ref=nb_sb_noss_2?field-keywords=\"+args.join(\" \")\n",
"acr.js": "..."
}
Repo here
:clap:
@zeke it's very raw, so let me know when it starts to be limiting.
From tweet: