aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md23
-rw-r--r--examples/rooms.p61
2 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..37faf20
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+# Matrix client
+
+Simple [matrix](https://matrix.org) client.
+
+# Examples
+
+From the `examples` directory
+
+```
+use v6;
+use Matrix::Client;
+
+# 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];
+
+# Show all joined rooms
+say $client.rooms;
+
+# And finally logout.
+$client.logout
+```
diff --git a/examples/rooms.p6 b/examples/rooms.p6
index 7f62233..6af04bc 100644
--- a/examples/rooms.p6
+++ b/examples/rooms.p6
@@ -1,3 +1,4 @@
+use v6;
use Matrix::Client;
my $c = Matrix::Client.new: :home-server<https://matrix.deprecated.org>;