matrix-js-sdk icon indicating copy to clipboard operation
matrix-js-sdk copied to clipboard

Provide examples in documentation for common use cases

Open alexgleason opened this issue 8 years ago • 7 comments

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.

alexgleason avatar May 02 '17 15:05 alexgleason

  • Peeking into rooms as a guest
  • Upgrading from guest to non-guest (with CAPTCHA maybe) and joining a room

ilyaigpetrov avatar Sep 03 '17 12:09 ilyaigpetrov

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.

pixelass avatar Feb 14 '18 10:02 pixelass

@alexgleason @ilyaigpetrov @pixelass Where would you expect that documentation to live? In code? On a website? In the README?

Ryuno-Ki avatar Oct 30 '18 20:10 Ryuno-Ki

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?

alexgleason avatar Oct 30 '18 21:10 alexgleason

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.

Ryuno-Ki avatar Oct 30 '18 21:10 Ryuno-Ki

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.

Gregoor avatar Jan 24 '23 16:01 Gregoor