aboutsummaryrefslogtreecommitdiff
path: root/examples/get-sync-json.raku
blob: 2db9c5a238c3b761801cc9584fc865394701eb21 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}