diff options
author | Matias Linares <matiaslina@gmail.com> | 2019-08-17 19:54:09 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2019-08-17 19:54:09 -0300 |
commit | 5feee914510dd9adfa53dce89b160ee2d0218fc0 (patch) | |
tree | 0bdef8fae4f5ae7cefe6848faf1a789707c78748 /README.md | |
parent | bc6c791c72f9fe460fdb9559522ae154124e8e97 (diff) | |
parent | ec4393cb81952fffa2273e313818a57c9611c5a2 (diff) | |
download | perl6-matrix-client-5feee914510dd9adfa53dce89b160ee2d0218fc0.tar.gz |
Merge branch 'master' into documentation
Diffstat (limited to 'README.md')
-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` |