diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2018-01-28 18:17:07 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2018-01-28 18:17:07 -0300 |
commit | 2baee1bb5321342f4065914815b057e64082706c (patch) | |
tree | a2a2b54bb1d397467421cbf51cd4c9e4760f6016 | |
parent | b1f945d6cc9853b7e0dda302c2c0ba3cd0946ae7 (diff) | |
download | perl6-matrix-client-2baee1bb5321342f4065914815b057e64082706c.tar.gz |
Update examples
-rw-r--r-- | examples/rooms.p6 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/rooms.p6 b/examples/rooms.p6 index 7a2de98..4f0a0c7 100644 --- a/examples/rooms.p6 +++ b/examples/rooms.p6 @@ -1,7 +1,12 @@ use v6; use Matrix::Client; -my $c = Matrix::Client.new: :home-server<https://matrix.deprecated.org>; -$c.login: @*ARGS[0], @*ARGS[1]; -say $c.rooms(:sync); +sub MAIN($username, $pass) { + my $c = Matrix::Client.new(home-server => 'https://matrix.deprecated.org'); + $c.login: $username, $pass; + + for $c.joined-rooms -> $room { + $room.say; + } +} |