We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For anyone using modern browsers/node, this should help to make the examples usable.
The secret lies in util.promisify!
const util = require('util') const dbAccessToken = 'YOURTOKEN' const dropbox = require('dropbox-v2-api').authenticate({ token: dbAccessToken }) const dbSync = util.promisify(dropbox) async function getAcc () { const params = { resource: 'users/get_current_account' } try { return (await dbSync(params)) } catch (err) { console.error(err) } } async function test () { console.log(await getAcc()) } test()
Hope this helps someone else avoid a good couple of hours struggling with why the "returns" were returning" undefined"!
The text was updated successfully, but these errors were encountered:
Thanks!
Sorry, something went wrong.
However this does not work for files/list_folder, returns search_file_metadata thus crashing when writing the stream
files/list_folder
search_file_metadata
No branches or pull requests
For anyone using modern browsers/node, this should help to make the examples usable.
The secret lies in util.promisify!
Hope this helps someone else avoid a good couple of hours struggling with why the "returns" were returning" undefined"!
The text was updated successfully, but these errors were encountered: