From f1cae9e3a68fc5aecbe5656bc812a758d8d62fee Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sat, 29 Jun 2019 20:16:48 -0300 Subject: Update readme --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 43c1aac..bdb8067 100644 --- a/README.md +++ b/README.md @@ -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, + :device-id + ); - use v6; - use Matrix::Client; + $client.login(:username, :password); + + # 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 - # 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 | Matrix ID: `@matias:matrix.deprecated.org` -- cgit v1.2.3-70-g09d2