github-api
Advanced tools
Comparing version 0.10.3 to 0.10.4
@@ -48,4 +48,4 @@ /*! | ||
var xhr = new XMLHttpRequest(); | ||
if (!raw) {xhr.dataType = "json";} | ||
xhr.open(method, getURL(), !sync); | ||
@@ -63,3 +63,10 @@ if (!sync) { | ||
} | ||
xhr.setRequestHeader('Accept','application/vnd.github.v3.raw+json'); | ||
if (!raw) { | ||
xhr.dataType = "json"; | ||
xhr.setRequestHeader('Accept','application/vnd.github.v3+json'); | ||
} else { | ||
xhr.setRequestHeader('Accept','application/vnd.github.v3.raw+json'); | ||
} | ||
xhr.setRequestHeader('Content-Type','application/json;charset=UTF-8'); | ||
@@ -66,0 +73,0 @@ if ((options.token) || (options.username && options.password)) { |
{ | ||
"name": "github-api", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"description": "A higher-level wrapper around the Github API.", | ||
@@ -5,0 +5,0 @@ "main": "github.js", |
@@ -68,9 +68,19 @@ var test = require('tape'); | ||
user.createRepo({ "name": repoTest }, function (err, res) { | ||
t.error(err); | ||
t.equals(res.name, repoTest.toString(), 'Repo created'); | ||
clearTimeout(timeout); | ||
t.end(); | ||
t.test('user.createRepo', function(q) { | ||
user.createRepo({ "name": repoTest }, function (err, res) { | ||
q.error(err); | ||
q.equals(res.name, repoTest.toString(), 'Repo created'); | ||
q.end(); | ||
}); | ||
}); | ||
var repo = github.getRepo(test_user.USERNAME, repoTest); | ||
t.test('repo.write', function(q) { | ||
repo.write('master', 'TEST.md', 'THIS IS A TEST', 'Creating test', function(err) { | ||
q.error(err); | ||
q.end(); | ||
}); | ||
}); | ||
clearTimeout(timeout); | ||
t.end(); | ||
}); | ||
@@ -77,0 +87,0 @@ |
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
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
52892
12
882