aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2018-06-05 00:02:22 -0300
committerMatias Linares <matiaslina@openmailbox.org>2018-06-05 00:02:22 -0300
commitdf75b85c9af231227cfaab0d722cad410b3ff55c (patch)
treedbb97242151e05fa4fcb536579c6845ef07be96b
parentdbd7a63d8af46f51abb48b39b9b80b341504ad74 (diff)
downloadperl6-matrix-client-df75b85c9af231227cfaab0d722cad410b3ff55c.tar.gz
Add login with positional parameters
-rw-r--r--lib/Matrix/Client.pm66
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Matrix/Client.pm6 b/lib/Matrix/Client.pm6
index 89c464c..1ef4426 100644
--- a/lib/Matrix/Client.pm6
+++ b/lib/Matrix/Client.pm6
@@ -18,7 +18,11 @@ submethod TWEAK {
}
-method login(Str :$username, Str :$password, Str :$device-id?) {
+multi method login(Str $username, Str $password) {
+ $.login(:$username, :$password);
+}
+
+multi method login(Str :$username, Str :$password) {
my $post-data = {
type => "m.login.password",
user => $username,