Socket
Socket
Sign inDemoInstall

bitbucketapi

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitbucketapi

Simple api wrapper for calling the bitbucket api


Version published
Weekly downloads
11
increased by10%
Maintainers
1
Weekly downloads
 
Created
Source

#node-bitbucket

Simple api wrapper for calling the bitbucket api

Returns promises.

If the token fails with a 401 it will throw a boom error w/ code 511 So that end-clients receiving errors can differentiate between 401s from your app and 401s from your own api

###examples

const BitBucketApi = require('bitbucketapi');

const bitbucket = new BitbucketApi({
  token: 'oauth token'
});

return bitbucket.apiCall({ path: '/user' });
const BitBucketApi = require('bitbucketapi');

const bitbucket = new BitbucketApi({
  token: 'oauth token'
});

return bitbucket.apiCall({ path: `/repositories/cool_user`, query: { role: 'member' } }).then((repos) => {

  if (bitbucket.hasNextPage(repos) {
    return bitbucket.apiCall({ next: repos.next }).then((nextRepos) {

      return repos.values.concat(nextRepos.values);
    }
  }
  return repos.value;
});

FAQs

Package last updated on 06 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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