Skip to content
A bitbucket client API for node js that works.
JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 79 commits ahead, 3 commits behind c9:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bitbucket
demo
test
.eslintrc
.gitignore
.travis.yml
LICENSE.txt
NOTICE.txt
README.md
appveyor.yml
package.json
publish.js

README.md

node-okbitbucket

Mac/Linux Windows
Build Status

| Windows Build status

API to programmatically query / write on bitbucket.

Pure NodeJS implementation.

Install

    npm i node-okbitbucket --save

Usage

    var secrets = {
        username:'',
        password:'',
        oauth = {
            clientId: '',
            secret: ''
        }
    };

    // var secrets = require('./secrets.json');
    
    // enable debug messages
    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.

You can’t perform that action at this time.