Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
bitbucket-v2
Advanced tools
Readme
node.js library to access the Bitbucket API v2
Not supported for Node < 7.6
const Bitbucket = require('node-bitbucket-v2');
const bitbucketApi = new Bitbucket(options);
bitbucketApi.authenticateOAuth2(accessTokenString);
bitbucketApi.user.get().then(({ body }) => {
console.log(body.uuid);
});
options
It is not necessary to provide any options at all (Bitbucket
can be constructed with no argument).
requesterFn
((options) => Promise<any>
): If provided, requests will be made using the function you provide. This is allows you to use your preferred http client. The options
provided are { headers, hostname, method, path, query, url, body? }
. body
is only provided on POST
methods. In the case of getNextPage
, getPreviousPage
, getForksFromResponse
and getParentFromResponse
, only { headers, method, url }
are provided in the options. Example: const axios = require('axios');
const Bitbucket = require('node-bitbucket-v2');
const requesterFn = (options) => {
const { url, method, body } = options;
if (method === 'POST') {
return axios.post(url, body);
}
return axios.get(url);
};
const bitbucketApi = new Bitbucket({ requesterFn });
proxy
(String
): Defines a proxy to make requests against, instead of api.bitbucket.org:443
. This option is ignored when requesterFn
is provided.For implemented methods, check bitbucket/repositories.js
and bitbucket/user.js
.
FAQs
Wrapper for the BitBucket API v2, the version required to use OAuth2. Includes support for custom HTTP clients.
The npm package bitbucket-v2 receives a total of 333 weekly downloads. As such, bitbucket-v2 popularity was classified as not popular.
We found that bitbucket-v2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.