kristianmandrup / bitbucket-api-v2

Bitbucket API v2 library
Other
10 stars 13 forks source link

Using async/await #8

Open itsgoofer opened 6 years ago

itsgoofer commented 6 years ago

I'm trying to use the apis with async/await

const api = createBitbucketAPI({ basicAuth: { username: credentials.username, password: credentials.password } }).promised

var user = await api.user.get() console.log(user) //Cannot read property 'get' of undefined

ideas?

idolmatov56 commented 2 years ago

Check

const api = createBitbucketAPI({ basicAuth: { username: credentials.username, password: credentials.password } })

var user = await api.user.promised.get()