Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@absolunet/bitbucket-api

absolunet7MITdeprecated2.0.0

Not maintained anymore

Bitbucket API wrapper via OAuth2

api, bitbucket, oauth, oauth2

readme

@absolunet/bitbucket-api

npm npm dependencies Tests npms License: MIT

Bitbucket API wrapper via OAuth2

Authenticate to Bitbutcket APIv2 via OAuth2 then call API directly

Install

$ npm install @absolunet/bitbucket-api

Usage

import { BitbucketAPI } from '@absolunet/bitbucket-api';

const bitbucket = new BitbucketAPI({
    consumerKey:    'zyxwvutsrqponmlkji',
    consumerSecret: 'abcdefghijklmnopqrstuvwxyz012345'
});

const { data } = await bitbucket.get('/repositories/{uuid}/my-project/commits');
console.log(data);

const { ssh } = await bitbucket.repositories.getUserRepository('my-project');
console.log(`The ssh url to my project is: ${ssh}`);

Documentation

See the full documentation for an in-depth look.

See the Changelog to see what has changed.

Contribute

See the Contributing Guidelines for ways to get started.

See the Support Guide for ways to get help.

See the Security Policy for sharing vulnerability reports.

This project has a Code of Conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Absolunet

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

2.0.0 - 2021-04-19

Added

  • .authenticated
  • .ensureAuthenticated()
  • .repositories.getUserRepository()
  • .repositories.createUserRepository()
  • Automatic authentication on calls if not authenticated
  • Add tests
  • API documentation

Changed

  • Export named properties
  • Calls return axios response object
  • Change argument validation from ow to joi
  • Maintenance updates

1.2.0 - 2020-06-16

Added

  • Expose axios instance under .axios

1.1.0 - 2019-06-25

Added

  • Package manager

Changed

  • Change HTTP client from gotto axios
  • Maintenance updates

1.0.0 - 2019-03-14

Added

  • Basic API

Authentication

  • .authenticate()

Low-level calls

  • .put()
  • .post()
  • .get()
  • .delete()

Information

  • .user