diff options
Diffstat (limited to 'examples/get-sync-json.raku')
-rw-r--r-- | examples/get-sync-json.raku | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/get-sync-json.raku b/examples/get-sync-json.raku new file mode 100644 index 0000000..2db9c5a --- /dev/null +++ b/examples/get-sync-json.raku @@ -0,0 +1,12 @@ +use v6; +use Matrix::Client; + +sub MAIN($file? = 'sync.json') { + my $c = Matrix::Client.new(home-server => 'https://matrix.deprecated.org'); + $c.login: 'deprecated_bot', 'deprecatedbot'; + + my $res = $c.sync; + $file.IO.spurt($res.content); + + $c.logout; +} |