Comparing version 0.0.5 to 0.0.6
@@ -0,1 +1,3 @@ | ||
require("../support/paths"); | ||
var http = require("http"); | ||
@@ -5,10 +7,11 @@ var Url = require("url"); | ||
var GitHubApi = require("../lib/github").GitHubApi; | ||
var OAuth2 = require("../vendor/node-oauth/lib/oauth2").OAuth2; | ||
var GitHubApi = require("github").GitHubApi; | ||
var OAuth2 = require("oauth2").OAuth2; | ||
var github = new GitHubApi(true); | ||
var user = github.getUserApi(); | ||
var repo = github.getRepoApi(); | ||
var clientId = "3e5a546357431172f24d"; | ||
var secret = "da60ce7426edfbd3d5253b096a2728e81d3bc9c5"; | ||
var clientId = "e8c434a1c92e9de7ff8d"; | ||
var secret = "1d0fcbb060e1dd86a0aa3d12265419c9bb19a333"; | ||
var oauth = new OAuth2(clientId, secret, 'https://github.com/', 'login/oauth/authorize', 'login/oauth/access_token'); | ||
@@ -32,3 +35,3 @@ | ||
redirect_uri: 'http://localhost:7878/github-callback', | ||
scope: "user,repo" | ||
scope: "user,repo,gist" | ||
}) | ||
@@ -35,0 +38,0 @@ }); |
@@ -204,2 +204,16 @@ /** | ||
/** | ||
* Get the pull API | ||
* | ||
* @return {PullApi} the pull API | ||
*/ | ||
this.getPullApi = function() | ||
{ | ||
if(!this.$apis['pull']) { | ||
this.$apis['pull'] = new (require("./github/PullApi").PullApi)(this); | ||
} | ||
return this.$apis['pull']; | ||
}; | ||
/** | ||
* Get the object API | ||
@@ -206,0 +220,0 @@ * |
@@ -137,7 +137,15 @@ /** | ||
* @param {String} repo the name of the repo | ||
* @param {Boolean} anon retreive non-github contributors | ||
*/ | ||
this.getRepoContributors = function(username, repo, callback) | ||
this.getRepoContributors = function(username, repo, anon, callback) | ||
{ | ||
if (typeof(anon) == 'function') { | ||
callback = anon; | ||
anon = ''; | ||
} | ||
else { | ||
anon = '/anon'; | ||
} | ||
this.$api.get( | ||
'repos/show/' + encodeURI(username) + "/" + encodeURI(repo) + "/contributors", | ||
'repos/show/' + encodeURI(username) + "/" + encodeURI(repo) + "/contributors" + anon, | ||
null, null, | ||
@@ -144,0 +152,0 @@ this.$createListener(callback, "contributors") |
{ | ||
"name" : "github", | ||
"version" : "0.0.5", | ||
"version" : "0.0.6", | ||
"description" : "Wrapper for the GitHub API", | ||
@@ -13,2 +13,6 @@ "author": "Fabian Jakobs <fabian.jakobs@web.de>", | ||
"engine" : ["node >=0.4.0"], | ||
"dependencies": { | ||
"asyncjs": ">=0.0.3", | ||
"oauth": ">=0.8.4" | ||
}, | ||
"licenses": [{ | ||
@@ -15,0 +19,0 @@ "type": "The MIT License", |
@@ -55,3 +55,4 @@ # JavaScript GitHub API for node.js | ||
* Issues API: only _getList_ is implemented | ||
* Gist API: still missing | ||
* Pulls API: only _getList_ is implemented | ||
* Gist API: still missing | ||
* Network API: still missing | ||
@@ -58,0 +59,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
289980
108
6973
89
2
7
9
+ Addedasyncjs@>=0.0.3
+ Addedoauth@>=0.8.4
+ Addedasyncjs@0.0.13(transitive)
+ Addedoauth@0.10.0(transitive)