-8', $msg) if is_utf8($msg);
$io->say($msg);
} else {
$self->obj->post('tweets', {'-to_json' => {"text" => $msg}});
}
}
no Moose;
__PACKAGE__->meta->make_immutable;
# A module must ret
adRevolutionaryDate::MsgMaker';
use DateTime;
use File::ShareDir ':ALL';
use LWP::UserAgent;
use JSON;
use Locale::TextDomain 'App-SpreadRevolutionaryDate';
use namespace::autoclean;
has 'api_key'
->{tools} = [
{
google_search => {},
},
];
}
my $json = JSON->new->utf8;
my $args_json = $json->encode($payload);
my $ua = LWP::UserAgent->new(env_proxy => 1, timeout
ader('Accept' => 'application/json');
$ua->default_header('Content-Type' => 'application/json');
my $req = HTTP::Request->new('POST', $url);
$req->content($args_json);
my $resp = $ua->request(
RACT: Simple Class to post status to BlueSky.
use LWP::UserAgent;
use DateTime;
use JSON qw(encode_json decode_json);
use URI;
use Encode qw(decode_utf8);
use File::Type;
use File::Basename;
use nam
>request($blob_req);
return unless $blob_response->is_success;
my $blob_content = decode_json($blob_response->decoded_content);
($card->{thumb}) = $blob_content->{blob};
}
return $ca
y $response = $self->{ua}->get($uri);
return if !$response->is_success;
my $content = decode_json($response->decoded_content);
return $content->{did};
}
sub _generate_facets {
my $self = shi