matrix-js-sdk
matrix-js-sdk copied to clipboard
Provide examples in documentation for common use cases
I see you have some example code in the repo, but it would be helpful to show some common tasks as well as how to do them with the SDK in the docs. As it stands it's difficult for a beginner to use this without first grasping all of the concepts of Matrix.
For instance:
- Sending a message
- Responding to a message
- Joining a room
- Adding images to a message
Basically some "getting started" tutorial sort of things would be great.
- Peeking into rooms as a guest
- Upgrading from guest to non-guest (with CAPTCHA maybe) and joining a room
Yes. I literally have no idea how this works. I need to ask someone who has used it before and even then it's hard since nothing is documented.
@alexgleason @ilyaigpetrov @pixelass Where would you expect that documentation to live? In code? On a website? In the README?
I was expecting to find examples here: http://matrix-org.github.io/matrix-js-sdk/0.12.1/index.html
But it's difficult to find this page as well (it's halfway down the README). Maybe this could be made more prominent and a section with examples could be added to it?
Thanks for the quick reply.
I'm not sure, whether JSDoc actually allows for fine granularity. Let's see. I've opened another PR to fix a docs issue and want to learn what the maintainers expect from contributions in this area first.
I'd love to see some Rust cookbook or MDN Learn style docs for the SDK. Currently attempting to use it for a simple prototype which lists rooms, their messages and allow receiving and sending and I'm finding it a tad hard to achieve that with just the API docs and type information.
Edit: Just found the guide on matrix.org through Google, might be worth linking to? Exactly what I was looking for.