gh
Little github client.
Installation
$ npm install gh2
Example
var Github = ; var gh = token: 'github-auth-token'; gh;
API
Client(opts:Object)
Fetch releases with opts
:
token
optional github tokenuser
optional github userpass
optional github passua
user-agent string [gh]
Client#stream(repo:String, ref:String, path:String)
Return a stream for repo
's path
at ref
.
gh;
Client#get(path:String, fn:Function)
GET the given path
.
Client#releases(repo:String, fn:Function)
Respond with releases for repo
.
gh;
Client#contents(repo:String, ref:String, path:String, fn:Function)
Get contents of path
at `ref.
gh;
Client#lookup(repo:String, version:String, fn:Function)
Lookup semver release of repo
at the given version
.
gh;
Running tests
$ TOKEN=<token> USER=<user> PASS=<pass> make test
License
MIT