Package Exports
- bitbucket
- bitbucket/src/utils/get-buffer-response-browser.js
- bitbucket/src/utils/get-buffer-response.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bitbucket) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
BitBucket.js
BitBucket API client for Browser and Node.js
BitBucket API docs: https://api.bitbucket.org
Installation
via npm:
$ npm install bitbucket --save
via yarn:
$ yarn add bitbucket
Usage
Browser
<script src="https://unpkg.com/bitbucket/dist/bitbucket.min.js"></script>
<script>
const bitbucket = new BitBucket()
</script>
Node
const BitBucket = require('bitbucket')
const bitbucket = new BitBucket()
bitbucket.authenticate({
type: 'basic',
username: 'username',
password: 'password'
})
bitbucket.repositories
.list({ username: 'username' })
.then(({ data, headers }) => console.log(data.values))
.catch(err => console.error(err))
async/await
try {
let { data, headers } = await bitbucket.<namespace>.<api>({ ...params })
} catch (err) {}
Promise
bitbucket.<namespace>
.<api>({ ...params })
.then(({ data, headers }) => {})
.catch(err => {})
Callback
bitbucket.<namespace>.<api>({ ...params }, (err, { data, headers }) => {})
Notes:
<namespace>
is one of the Namespace Names<api>
is one of the API Names
Namespace Names
addon
, hook_events
, webhooks
, repositories
, branchrestrictions
, commits
, commitstatuses
, issue_tracker
, pullrequests
, downloads
, source
, pipelines
, refs
, snippets
, teams
, projects
, users
, search
, user
, ssh
API Names
Check API client docs: https://bitbucketjs.netlify.com
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.