diff options
author | Matias Linares <matiaslina@gmail.com> | 2019-06-05 00:30:56 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2019-06-05 00:30:56 -0300 |
commit | ecf602241f38552132e16d44a8871232b23f2b1e (patch) | |
tree | c0c1d283853fc819726b88366cb63aa23f79b0d3 /lib/Matrix/Client | |
parent | 5d8aafcccbc582bf2d3be828b66e1495433ae5e5 (diff) | |
download | perl6-matrix-client-ecf602241f38552132e16d44a8871232b23f2b1e.tar.gz |
Add POD declarators
Diffstat (limited to 'lib/Matrix/Client')
-rw-r--r-- | lib/Matrix/Client/Room.pm6 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Matrix/Client/Room.pm6 b/lib/Matrix/Client/Room.pm6 index e0b14a2..4ec774f 100644 --- a/lib/Matrix/Client/Room.pm6 +++ b/lib/Matrix/Client/Room.pm6 @@ -25,6 +25,7 @@ method !get-name() { $!name = $data<name>; } +#| GET - /_matrix/client/r0/rooms/{roomId}/joined_members method joined-members { my %data = from-json($.get("/joined_members").content); %data<joined> @@ -51,6 +52,7 @@ method fallback-name(--> Str) { }; } +#| GET - /_matrix/client/r0/rooms/{roomId}/messages method messages() { my $res = $.get("/messages"); my $data = from-json($res.content); @@ -58,6 +60,7 @@ method messages() { return $data<chunk>.clone; } +#| PUT - /_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId} method send(Str $body!, Str :$type? = "m.text") { $Matrix::Client::Common::TXN-ID++; my $res = $.put( @@ -68,6 +71,7 @@ method send(Str $body!, Str :$type? = "m.text") { from-json($res.content)<event_id> } +#| GET - /_matrix/client/r0/rooms/{roomId}/state multi method state(--> Seq) { my $data = from-json($.get('/state').content); @@ -76,10 +80,12 @@ multi method state(--> Seq) { } } +#| GET - /_matrix/client/r0/rooms/{roomId}/state/{eventType} multi method state(Str $event-type) { from-json($.get("/state/$event-type").content) } +#| PUT - /_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey} method send-state(Str:D $event-type, :$state-key = "", *%args --> Str) { my $res = $.put( "/state/$event-type/$state-key", @@ -88,6 +94,7 @@ method send-state(Str:D $event-type, :$state-key = "", *%args --> Str) { from-json($res.content)<event_id> } +#| POST - /_matrix/client/r0/rooms/{roomId}/leave method leave() { $.post('/leave') } |