Skip to content

jedediah/github-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

// This is (or will be) a pure JavaScript, OOPish wrapper for the GitHub API.
// It uses dynamic script tags for AJAX so it has no cross-domain limitations.

// Should come in handy for making embedded widgets and alternative interfaces.

// This is roughly what the code will look like:

var gh = new GitHub.API('username','GFwregWH5g39fFefj04fFfdjf948f');   // account and API token

var me = gh.user();                        // User object for the authenticated account
var you = gh.user('bob');                  // User object for someone else

// Results are passed to your callback as JS objects, with optional context.
// Some objects are wrapped, others are just plain structures.
me.profile(function(json) { ... }, this);
gh.userSearch('melvin',function(json) { ... });

var myProj = me.repo('doomlaser');      // Repo object
var bugReport = myProj.issue(147);      // Issue object

// Other objects: Commit, Tree, Blob, Network (the "secret" one)

About

JavaScript client for the GitHub v2 API, in-browser, cross-domain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published