Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
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
via npm:
$ npm install --save bitbucket
via yarn:
$ yarn add bitbucket
<script src="https://unpkg.com/bitbucket/lib/index.umd.js"></script>
<script>
const bitbucket = new Bitbucket()
</script>
const { Bitbucket } = require('bitbucket')
const bitbucket = new Bitbucket()
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)
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)
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 Namesbranching_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
Check API client docs: https://bitbucketjs.netlify.com
bitbucket.repositories
.listGlobal({})
.then(({ data }) => console.log(data.values))
.catch((err) => console.error(err))
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
.
Licensed under the MIT License. Check the LICENSE file for details.
[2.11.0] - 2023-03-08
FAQs
Bitbucket API client for Browser and Node.js
The npm package bitbucket receives a total of 18,598 weekly downloads. As such, bitbucket popularity was classified as popular.
We found that bitbucket demonstrated a healthy version release cadence and project activity because the last version was released less than 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.