@atlassian/bitbucket-server
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

bitbucket-server.js

Bitbucket Server API client for Browser and Node.js

This is a port of the excellent bitbucket library by Munif Tanjim: https://github.com/MunifTanjim/node-bitbucket

Bitbucket Server API docs: https://docs.atlassian.com/bitbucket-server/rest/latest/bitbucket-rest.html

Installation

via npm:

$ npm install @atlassian/bitbucket-server --save

via yarn:

$ yarn add @atlassian/bitbucket-server

Usage

Node

const BitbucketServer = require('@atlassian/bitbucket-server')

const BitbucketServer = new BitbucketServer()

Client Options

You can set the APIs' baseUrl and modify some behaviors (e.g. request timeout etc.) by passing a clientOptions object to the BitbucketServer constructor.

const clientOptions = {
  baseUrl: 'https://<server base url>',
  headers: {},
  options: {
    timeout: 10
  }
}

const client = new BitbucketServer(clientOptions)

This enables you to use the client with Bitbucket Server.

Authentication

Basic

client.authenticate({
  type: 'basic',
  username: 'username',
  password: 'password'
})

OAuth

client.authenticate({
  type: 'token',
  token: 'access token'
})

Package Sidebar

Install

npm i @atlassian/bitbucket-server

Weekly Downloads

224

Version

0.0.6

License

MIT

Unpacked Size

206 kB

Total Files

43

Last publish

Collaborators

  • kbielaski
  • dwalker
  • atlassian-aui
  • jvdl
  • mdejongh
  • mszczepanski
  • cdarroch
  • macku
  • dboyd
  • dmorrow
  • mstaas
  • cwhittington
  • doklovic
  • 1999-atlassian
  • amcculloch
  • wyasvoin
  • jmoynihan
  • xqiu
  • gleal-atlassian
  • mszpyra
  • bcytrowski
  • plai1
  • sraj
  • tilwin_atlassian
  • mrzymski
  • media-build-bot
  • akishore
  • timse
  • mkem114
  • tsebastian
  • sfp-release-bot