Created
February 10, 2015 22:59
-
-
Save masonforest/59cdf9dd79ee28c64e3b to your computer and use it in GitHub Desktop.
Node-github add team membership example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GitHubApi = require("github"); | |
var teamId = "<your user id>"; | |
var token = "<your token>"; | |
var username = "<username>"; | |
var github = new GitHubApi({version: "3.0.0"}); | |
github.authenticate({ | |
type: "oauth", | |
token: token | |
}); | |
github.orgs.addTeamMembership({id: teamId, user: username}, function(error,info){ | |
if(error){ | |
console.log(error); | |
} else { | |
console.log(info); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment