Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github

Package Overview
Dependencies
Maintainers
0
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

lib/github_all_tests.js

13

demo/oauth.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc