Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
bitbucketjs
Advanced tools
Bitbucket.js is a low-level javascript http client for the Bitbucket REST API. It works great in both node and the browser. It allows you to build requests with its promise interface.
You'll need a newer (v0.12+) version of node with native Promise support or browsers that implement the Promise
constructor directly. Alternatively, either polyfill Promise
in the global scope or pass the Promise
constructor to Bitbucket.js when creating the client.
Require Bitbucket.js using CommonJS or AMD-style require
. If the environment does not support either of these, bitbucketjs will attach itself as window.bitbucketjs
.
Bitbucketjs currently only allows login through basic authentication.
Construct a client object like so:
var bitbucketjs = require('bitbucketjs');
var bitbucket = bitbucketjs({username: 'myuser', password: 'mypassword'});
A number of resources are available through the client, with many actions available that map directly to their REST api equivalents. Bitbucketjs will return to you the response body of the API response.
bitbucket.repo
Returns a Promise
thenable that resolves to the repository myrepo
for the team (or user) myteam
.
This method requires authentication to retrieve private repositories.
Returns a Promise
thenable that resolves to a list of the given user or team's repository.
opts
Object.
opts.scm
- the version control system of the repo. Can be git
or hg
.
opts.is_private
- true
for private repositories.
opts.description
- the repository's description.
opts.has_issues
- true
to create this repository with an issue tracker. Defaults to false
.
opts.has_wiki
- true
to create this repository with a wiki. Defaults to false
.
opts
accepts all the keys and values that match the parameters of
the the API repository resource.
Returns a Promise
thenable that resolves if the repository was successfully created.
Deletes the repository at the given slug. Be careful!
This method requires authentication. Only repositories for which the authenticated user has admin permissions may be deleted.
bitbucket.user
Returns a Promise
thenable that resolves to the user of the given username
.
Returns a Promise
thenable that resolves to a list of followers of the username
.
bitbucket.team
Returns a Promise
thenable that resolves to the team matching teamname
.
Returns a Promise
thenable that resolves to a list of followers of the teamname
.
Returns a Promise
thenable that resolves to a list of the authenticated user's teams. role
can be one of member
, admin
, or contributor
. role
defaults to member
.
This method requires authentication.
FAQs
A Bitbucket API client for javascript
The npm package bitbucketjs receives a total of 34 weekly downloads. As such, bitbucketjs popularity was classified as not popular.
We found that bitbucketjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.