Skip to content
New issue

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

Improve README and Documentation #1

Open
yakovkhalinsky opened this issue Dec 3, 2015 · 7 comments
Open

Improve README and Documentation #1

yakovkhalinsky opened this issue Dec 3, 2015 · 7 comments

Comments

@yakovkhalinsky
Copy link
Owner

The documentation and the README needs a bit of improvement.

@ablankenship10
Copy link

ablankenship10 commented Apr 23, 2017

Do the promises still work (or only work?) the way as described in the README?

I am using the promises like so that seems to work also:

b2.functionName(payload)
    .then(callback)
    .catch(errorCallback);

EDIT: looks like this is somewhat explained in the 0.9.x to 1.0.x upgrade section.

@yakovkhalinsky
Copy link
Owner Author

yakovkhalinsky commented Apr 23, 2017

Should do, if the promise ever resolves with an error(rejection).

The second arg in the .then(arg1, arg1) if a reject is ever called in the promise. It's of course optional.

The .catch() is also a feature of the promise, not something I've added in the README.

Might need a more comprehensive example at the top of the README probably to explain this.

@odensc
Copy link
Collaborator

odensc commented Jan 17, 2019

Relevant: #53

@yakovkhalinsky
Copy link
Owner Author

I might look at making some nicer docs using GH pages so we can get a proper list of functions, and also add async/await as well as traditional Promise.then().catch()

Or should we just be documenting examples with async/await?

@cbess
Copy link
Collaborator

cbess commented Jan 17, 2019

I'd say just using asyn/await covers our basis

@odensc
Copy link
Collaborator

odensc commented Jan 17, 2019

Agreed - I think we should just use async/await for examples.

@Bimman2021
Copy link

this documentation is very poor. despite my years of using api. i still struggle to get things done. probably drop use case examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants