summaryrefslogtreecommitdiff
path: root/examples/doc-test.raku
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2020-03-24 19:37:11 -0300
committerMatias Linares <matiaslina@gmail.com>2020-03-24 19:37:11 -0300
commite50b8fa9e02b19ece80ebeb576051e451d3a7812 (patch)
tree037db346e5deacfe21fe0bbae1b496331e3c117e /examples/doc-test.raku
parente39257df2688137d57d88d502f7198425d5dfcd5 (diff)
downloadperl6-matrix-client-e50b8fa9e02b19ece80ebeb576051e451d3a7812.tar.gz
Rename some things to from perl6 to raku
Diffstat (limited to 'examples/doc-test.raku')
-rw-r--r--examples/doc-test.raku19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/doc-test.raku b/examples/doc-test.raku
new file mode 100644
index 0000000..0072c94
--- /dev/null
+++ b/examples/doc-test.raku
@@ -0,0 +1,19 @@
+use v6;
+use lib <lib>;
+use Matrix::Client;
+use Data::Dump::Tree;
+
+my Matrix::Client $client .= new:
+ :home-server<https://matrix.deprecated.org>,
+ :access-token(%*ENV<MATRIX_ACCESS_TOKEN>);
+
+say $client.presence(“@matias:matrix.deprecated.org”);
+#`[
+for ^10 -> $i {
+ my $presence = $i %% 2 ?? "online" !! "offline";
+ say $client.presence.presence;
+ say "Setting presence $presence";
+ $client.set-presence($presence, :status-message<woops>);
+ sleep 3;
+}
+]