bitbucket-api-v2
Advanced tools
Comparing version 0.6.0 to 0.6.1
{ | ||
"name": "bitbucket-api-v2", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Wrapper for the BitBucket API v2, the version required to use OAuth2. Includes support for XHR requests.", | ||
@@ -27,3 +27,2 @@ "homepage": "https://github.com/kristianmandrup/bitbucket-api-v2.git", | ||
"xhr": "^2.4.0", | ||
"generic-test-generator": "github:kristianmandrup/generic-test-generator", | ||
"bitbucket-auth": "github:kristianmandrup/bitbucket-auth" | ||
@@ -41,2 +40,3 @@ }, | ||
"babili": "^0.1.4", | ||
"generic-test-generator": "github:kristianmandrup/generic-test-generator", | ||
"babili-webpack-plugin": "^0.1.2", | ||
@@ -43,0 +43,0 @@ "eslint": "^4.9.0", |
@@ -40,2 +40,18 @@ # Bitbucket API v2 | ||
If you are unable to use ES 2015 modules directly, try using the pre-compiled `dist` bundles: | ||
```js | ||
const { createBitbucketAPI } = require('bitbucket-api-v2/dist/bitbucketAPI') | ||
``` | ||
Minified: | ||
```js | ||
const { createBitbucketAPI } = require('bitbucket-api-v2/dist/bitbucketAPI.min') | ||
``` | ||
Note: You may also use `createBitBucketAPI` (deprecated) | ||
## API usage | ||
Get the user info (of authenticated user) | ||
@@ -42,0 +58,0 @@ |
@@ -18,3 +18,3 @@ const { | ||
async function createAuthenticatedAPI(opts = {}) { | ||
getAccessToken = opts.getAccessToken | ||
const getAccessToken = opts.getAccessToken | ||
if (!getAccessToken) { | ||
@@ -25,6 +25,6 @@ throw 'ERROR: Missing getAccessToken (function) option' | ||
opts.accessToken = accessToken | ||
return createBitBucketAPI(opts) | ||
return createBitbucketAPI(opts) | ||
} | ||
function createBitBucketAPI(opts = {}) { | ||
function createBitbucketAPI(opts = {}) { | ||
let bitbucketApi = new Bitbucket(opts) | ||
@@ -211,4 +211,4 @@ if (opts.accessToken) { | ||
Bitbucket, | ||
createBitBucketAPI, | ||
createBitbucketAPI, | ||
createAuthenticatedAPI | ||
} |
const { | ||
Bitbucket, | ||
createBitBucketAPI, | ||
createBitbucketAPI, | ||
createAuthenticatedAPI | ||
@@ -17,2 +17,3 @@ } = require('./bitbucket') | ||
createBitBucketAPI, | ||
createBitBucketAPI: createBitbucketAPI, // alias | ||
createAuthenticatedAPI, | ||
@@ -19,0 +20,0 @@ createRequest, |
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
4364351
6
66
32048
211
1
19