diff options
author | Matias Linares <matiaslina@gmail.com> | 2019-06-29 20:16:48 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2019-06-29 20:16:48 -0300 |
commit | f1cae9e3a68fc5aecbe5656bc812a758d8d62fee (patch) | |
tree | 933b622c94af775e25b3062a786fd4391d3545fb | |
parent | f4275ca847f6d7021ad2d720b88a592d03436997 (diff) | |
download | perl6-matrix-client-f1cae9e3a68fc5aecbe5656bc812a758d8d62fee.tar.gz |
Update readme
-rw-r--r-- | README.md | 59 |
1 files changed, 43 insertions, 16 deletions
@@ -1,26 +1,53 @@ -# Matrix client +# Matrix::Client A perl 6 library for [Matrix](https://matrix.org). -## Status +## Synopsis -This project is in early development. A lot of methods return a raw -`HTTP::Response` and not something from this library. -## Examples + use Matrix::Client; -From the `examples` directory: + my $client = Matrix::Client.new( + :home-server<https://matrix.org>, + :device-id<matrix-client> + ); - use v6; - use Matrix::Client; + $client.login(:username<myuser>, :password<s3cr3t>); + + # Check my user + say $client.whoami; # @myuser:matrix.org + + # Send a message to a random room that I'm in + my $room = $client.joined-rooms.pick; + say "Sending a message to {$room.name}"; + $room.send("Hello from perl6!"); + +## Description + +Matrix is an open network for secure, decentralized communication. + +This module provides an interface to interact with a Matrix homeserver through +the *Client-Server API*. It's currenlty on active development but it's mostly +stable for day to day use. + +Here's a not complete list of things that can be done: + +* Login/logout +* Registration +* Synchronization of events/messages +* Send events +* Send messages +* Upload files to a home-server + + +There are many missing endpoints (you can check a complete checklist +[here](https://github.com/matiaslina/perl6-matrix-client/blob/master/endpoints.md)). + +## Documentation - # Instantiate a new client for a given home-server - my $client = Matrix::Client.new: :home-server<https://matrix.org> - # Login - $client.login: @*ARGS[0], @*ARGS[1]; +There's a couple of pages of documentation on the `docs/` directory. This +includes API documentation, basic usage, examples, etc. - # Show all joined rooms - say $client.rooms(:sync); +## Author - # And finally logout. - $client.logout +MatÃas Linares <matias@deprecated.org> | Matrix ID: `@matias:matrix.deprecated.org` |