All Projects → MunifTanjim → Node Bitbucket

MunifTanjim / Node Bitbucket

Licence: mit
Bitbucket API client for Browser and Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Bitbucket

Github
Ruby interface to GitHub API
Stars: ✭ 1,081 (+1380.82%)
Mutual labels:  api-client
Slacko
A neat interface for Slack
Stars: ✭ 64 (-12.33%)
Mutual labels:  api-client
Bigcommerce Api Ruby
Connect Ruby applications with the Bigcommerce Platform
Stars: ✭ 69 (-5.48%)
Mutual labels:  api-client
Groupy
A simple yet powerful API wrapper for the GroupMe messaging service.
Stars: ✭ 57 (-21.92%)
Mutual labels:  api-client
Mvvmdemo
MVVMDemo With ReactiveCocoa
Stars: ✭ 60 (-17.81%)
Mutual labels:  api-client
Moneybird Php Client
PHP Client for Moneybird V2
Stars: ✭ 67 (-8.22%)
Mutual labels:  api-client
Anaconda
A Go client library for the Twitter 1.1 API
Stars: ✭ 1,077 (+1375.34%)
Mutual labels:  api-client
Python2 Krakenex
(UNMAINTAINED) REST Exchange API for Kraken.com, Python 2
Stars: ✭ 72 (-1.37%)
Mutual labels:  api-client
Redux Api Call
One declarative API to create reducers, action creators and selectors for any API calls
Stars: ✭ 63 (-13.7%)
Mutual labels:  api-client
Export Pull Requests
Export pull requests and/or issues to a CSV file. Supports GitHub, GitLab, and Bitbucket
Stars: ✭ 68 (-6.85%)
Mutual labels:  bitbucket
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+14467.12%)
Mutual labels:  api-client
Somfy Open Api
REST API client for the Somfy Open API
Stars: ✭ 59 (-19.18%)
Mutual labels:  api-client
Chump
The Best API Wrapper for Pushover.
Stars: ✭ 67 (-8.22%)
Mutual labels:  api-client
Api Php Client
PHP client of Akeneo PIM API
Stars: ✭ 56 (-23.29%)
Mutual labels:  api-client
Newsapi
A python wrapper for News API.
Stars: ✭ 71 (-2.74%)
Mutual labels:  api-client
Quandl Python
Stars: ✭ 1,076 (+1373.97%)
Mutual labels:  api-client
Igdb
Go client for the Internet Game Database API
Stars: ✭ 65 (-10.96%)
Mutual labels:  api-client
Openvulnapi
Documentation and Tools for Cisco's PSIRT openVuln API
Stars: ✭ 73 (+0%)
Mutual labels:  api-client
Russianpost
SDK для работы с API Почты России (pochta.ru)
Stars: ✭ 72 (-1.37%)
Mutual labels:  api-client
Simpleapiclient Ios
A configurable api client based on Alamofire4 and RxSwift4 for iOS
Stars: ✭ 68 (-6.85%)
Mutual labels:  api-client

version:@latest Documentation License

Bitbucket.js

Bitbucket API client for Browser and Node.js

Bitbucket API docs: https://api.bitbucket.org


BITBUCKET CLOUD API LATEST UPDATES: https://developer.atlassian.com/cloud/bitbucket


Installation

via npm:

$ npm install --save bitbucket

via yarn:

$ yarn add bitbucket

Usage

Browser

<script src="https://unpkg.com/bitbucket/lib/index.umd.js"></script>
<script>
  const bitbucket = new Bitbucket()
</script>

Node

const { Bitbucket } = require('bitbucket')

const bitbucket = new Bitbucket()

Client Options

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

const clientOptions = {
  baseUrl: 'https://api.bitbucket.org/2.0',
  request: {
    timeout: 10,
  },
}

const bitbucket = new Bitbucket(clientOptions)

Authentication

Using username and password:

const clientOptions = {
  auth: {
    username: 'username',
    password: 'password',
  },
}

const bitbucket = new Bitbucket(clientOptions)

Using token:

const clientOptions = {
  auth: {
    token: 'abcdef123456',
  },
}

const bitbucket = new Bitbucket(clientOptions)

API Methods

async/await

try {
  const { data, headers, status, url } = await bitbucket.<namespace>.<api>({ ...params })
} catch (err) {
  const { message, error, headers, request, status } = err
}

Promise

bitbucket.<namespace>
  .<api>({ ...params })
  .then(({ data, headers, status, url }) => {})
  .catch(({ message, error, headers, request, status }) => {})

Notes:

  • <namespace> is one of the Namespace Names
  • <api> is one of the API Names

Namespace Names

branching_model, branchrestrictions, commits, commitstatuses, deploy, deployments, downloads, hook_events, issue_tracker, pipelines, projects, pullrequests, refs, repositories, search, snippet, snippets, source, ssh, teams, user, users, webhooks

API Names

Check API client docs: https://bitbucketjs.netlify.com

Examples
bitbucket.repositories
  .listGlobal({})
  .then(({ data }) => console.log(data.values))
  .catch((err) => console.error(err))

Acknowledgement

This API client is heavily inspired by the octokit/rest.js and a lot of ideas are taken from there. So, thanks goes to the maintainer Gregor Martynus and all the awesome contributors of octokit/rest.js.

License

Licensed under the MIT License. Check the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].