This commit is contained in:
2024-10-14 00:08:40 +02:00
parent dbfba56f66
commit 1462d52e13
4572 changed files with 2658864 additions and 0 deletions

30
Mastodon/toot3.pl Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/perl
#Client-Schlüssel 8aJzHkVjpomU2UUl_W8G_90Syb3P9Eg5xK61Nwti85o
#Client-Secret v6zxkyQ1oNVr4RbB50w9dIancWDKhpXRgxG_4dej0eo
#Dein Zugangs-Token KkfiWIzBCAAiVOff9OHK0ka8fCsA-RAP-1TS9a_1Fks
use Mastodon::Client;
my $client = Mastodon::Client->new(
instance => 'hessen.social',
name => 'perltoot',
client_id => '8aJzHkVjpomU2UUl_W8G_90Syb3P9Eg5xK61Nwti85o',
client_secret => 'v6zxkyQ1oNVr4RbB50w9dIancWDKhpXRgxG_4dej0eo',
access_token => 'KkfiWIzBCAAiVOff9OHK0ka8fCsA-RAP-1TS9a_1Fks',
coerce_entities => 1,
api_version => 2,
);
my $listener = $client->stream( "#natenom" );
# Streaming interface might change!
$listener->on( update => sub {
my ($listener, $status) = @_;
printf "%s said: %s\n",
$status->account->display_name,
$status->content;
});
$listener->start;