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 Rust documentation #186

Open
lolbinarycat opened this issue Oct 31, 2023 · 1 comment
Open

Improve Rust documentation #186

lolbinarycat opened this issue Oct 31, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lolbinarycat
Copy link

Describe the enhancement

there is no explination for what data Client keeps track of or what it does exactly.

namely, the only hint that connect() must be called before relays are added is the example.
Use case

misusing Client will often result in vauge timeout errors or simply empty lists being returned.

functions also don't specify the prerequisites needed before they can be called.
Additional context

the documentation for most functions is just the name of the function without underscores.

it took several days to find out why my program wasn't working, because none of documentation suggests relays won't be automatically connected to as needed.

@lolbinarycat lolbinarycat added the enhancement New feature or request label Oct 31, 2023
@yukibtc
Copy link
Member

yukibtc commented Nov 1, 2023

Hi, thanks for testing nostr-sdk! The libraries are in alpha state so the docs aren't completed.

For now I specified in add_relay method docs that connection isn't started automatically. I hope to improve documentation soon (I started to write also the Rust Nostr Book, for both Rust and bindings).

Contributions are really appreciated!

@yukibtc yukibtc added the help wanted Extra attention is needed label Nov 1, 2023
@yukibtc yukibtc changed the title [nostr_sdk] improve documentation by explaining the internal state of nostr_sdk::Client Improve Rust documentation Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants