node-okbitbucket
Mac/Linux | Windows |
---|
| |
| |
| |
API to programmatically query / write on bitbucket.
Pure NodeJS implementation.
Install
npm i node-okbitbucket --save
Usage
var secrets = {
username:'',
password:'',
oauth = {
clientId: '',
secret: ''
}
};
if ( process.env.NODE_ENV === 'test' ){
process.env.DEBUG='*';
}
var BitBucket = require('node-okbitbucket');
var bbt = (new BitBucket())
.authenticatePassword(secrets.username, secrets.password);
bbt.getUserApi().getRepositories(username, function(err, repos){ });
bbt.getUsersApi().getUserData(username, function(err, user){ });
bbt.getSshApi().getKeys(function(err, keys){ });
bbt.getSshApi().addKey(pubkey, function(err){ });
bbt.getSshApi().deleteKey(pubkey, function(err){ });
bbt.getSshApi().deleteAllKeys(function(){ });
bbt.getRepoApi().show(username, repo, function(err, userRepo){ })
bbt.getRepoApi().getUserRepos(username, function(err, repositories){ })
bbt.getEmailApi().getAll(username, repo, function(err, userRepo){ })
Documentation
Test
npm run test
DEBUG=node-okbitbucket mocha
Todo
- write documentation
- write missing tests (see tests files directly)
- re write example
- fix lint
About this repo
It s a fork or original repo found on github, itself a fork of a bitbucket repo.
I only want to note about the license,
i see there is one,
i m not interested into this, not at all.
I just need this to work, the rest is pointless.