octokit / octokit.js

The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.
MIT License
6.94k stars 1.02k forks source link

How soon are you pushing 0.1.0? #24

Closed niftylettuce closed 12 years ago

niftylettuce commented 12 years ago

oh it seems you're moving everything to https://github.com/c9/node-github3

mikedeboer commented 12 years ago

nope, it's the other way around in fact!

niftylettuce commented 12 years ago

ah lol, so its now:

var GitHubApi = require('node-github');
var github = new GitHubApi({ version: '3.0.0' });

right?

mikedeboer commented 12 years ago

yes, indeed! There are some API incompatibilities between the two versions, but they are easy to spot. Docs will appear on http://ajaxorg.github.com/node-github very shortly (I just pushed 'em).

niftylettuce commented 12 years ago

what about authenticateToken ?

niftylettuce commented 12 years ago

nvm

github.authenticate({
    type: "basic",
    username: username,
    password: password
});
github.user.update({
    location: "Argentina"
}, function(err) {
    console.log("done!");
});
mikedeboer commented 12 years ago

I added more examples there for you - and all others with the same question, of course ;)

niftylettuce commented 12 years ago

authenticate({ type: 'token' }) doesn't seem to be working when passing a valid username and token option, returns 401, could you test?

niftylettuce commented 12 years ago

oh nevermind, i still had user.update(username, {} vs user.update({}

niftylettuce commented 12 years ago

hmm, still seems that token type is not working, getting 401 bad credentials.

mikedeboer commented 12 years ago

please read the README, I added a comment to the code example.

niftylettuce commented 12 years ago

Github isn't supporting token auth it seems in v3 with username/token combination, only basic or oauth2

http://developer.github.com/v3/#authentication

we should remove the token auth type

niftylettuce commented 12 years ago

ah I see your comment now, it wasn't there when I checked a bit ago :)

niftylettuce commented 12 years ago

nice work, closing this issue

:+1: