PUT
json
plain
headers
response
http_get
http_post
http_put
http_delete
http_head
http_upload
json_get
json_post
json_put
json_head
/;
use
LWP::UserAgent;
use HTTP::Request;
use Try::Tiny;
use JSON;
our $VERSION = '0.20';
my $user_agent = "LWP::Simple::REST";
my $lwp = LWP::UserAgent->new;
my $response;
sub user_agent { $lwp->agent(
$_[0] ) }
sub response { $response }
sub plain { return ($_[0]->content ) }
sub json { return decode_json($_[0]->content ) }
sub headers { return $_[0] ? $_[0]->headers : $response->headers };
s
Id};
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('PUT', 'application/json', $creds, $main->baseUrl . $uri, $vars);
return $response;
}
1;
n;
use Moose;
use MooseX::SetOnce;
use AnyEvent;
use AnyEvent::SlackRTM;
use Data::Dumper;
use JSON;
use LWP::Simple;
use App::RoboBot::Channel;
use App::RoboBot::Message;
use App::RoboBot::Nick;
ta
from channels
where network_id = ? and extradata @> ?
}, $self->id, encode_json({ slack_id => $slack_id }));
if ($res && $res->next) {
$channel = App::RoboBot::Chan
=> $res->{'id'},
name => $res->{'name'},
extradata => decode_json($res->{'extradata'}),
network => $self,
config => $self->bot->co
ded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::App::Command::listdeps_darkpan",
"interface":"class",
"inherits":"Dist::Zilla::App::Command"
}
=end MetaPOD::JSON
=head1 AUTHOR
4';
use v5.20;
use namespace::autoclean;
use Moose;
use MooseX::SetOnce;
use Data::Dumper;
use JSON;
use LWP::UserAgent;
use URI;
use XML::LibXML;
extends 'App::RoboBot::Plugin';
=head1 api.trans
my $json;
eval {
$json = decode_json($response->decoded_content);
};
return 0 if $@;
return 0 unless ref($json) eq 'HASH' && exists $json->{'access_token'} && $json->{'acce
ss_token'} =~ m{HMACSHA256};
$self->token($json->{'access_token'});
$self->last_authed(time() +0);
return 1;
}
sub translate_text {
my ($self, $message, $command, $rpl, $from, $to,
ded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
toclean;
use Moose;
use MooseX::SetOnce;
use AnyEvent;
use Data::Dumper;
use HTTP::Request;
use JSON;
use LWP::UserAgent;
use URI;
use App::RoboBot::Channel;
use App::RoboBot::Response;
extends 'A
) as polled_at
}, $repo->{'repo_id'});
return unless $poll_t && $poll_t->next;
my ($json, @notices);
my $api_path = ['repos',$repo->{'owner_name'},$repo->{'repo_name'},'commits'];
) {
if (ref($json) eq 'ARRAY' && @{$json} > 0) {
my $oldest_commit;
my %commiters;
my @commits;
foreach my $commit (@{$json}) {
toclean;
use Moose;
use MooseX::SetOnce;
use AnyEvent;
use Data::Dumper;
use HTTP::Request;
use JSON;
use LWP::UserAgent;
use URI;
use App::RoboBot::Channel;
use App::RoboBot::Response;
extends 'A
rn unless $response->is_success;
my $json;
eval {
$json = decode_json($response->decoded_content);
};
return if $@;
return $json;
}
sub _run_watcher {
my ($self, $bo
t) = @_;
# TODO: Call base API path, get JSON
# TODO: Loop through keg list, compare each one's last_updated with the
# plugin's last_check attribute. Any with a new update should
Moose;
use MooseX::SetOnce;
use AnyEvent;
use Data::Dumper;
use DateTime;
use HTTP::Request;
use JSON;
use LWP::UserAgent;
use LWP::Protocol::https;
use URI;
use App::RoboBot::Channel;
use App::Robo
n/json' );
$req->header( 'Authorization' => sprintf('Token token=%s', $group->{'api_key'}) );
my $response = $self->ua->request($req);
return unless $response->is_success;
my $json;
eval {
$json = decode_json($response->decoded_content);
};
return if $@;
return $json;
}
sub now {
my ($self) = @_;
return DateTime->now->iso8601 . 'Z';
}
sub _vali
YNOPSIS
use API::Google::GCal;
my $gapi = API::Google::GCal->new({ tokensfile => 'config.json' });
my $user = 'someuser@gmail.com';
my $calendar_id = 'ooqfhagr1a91u1510ffdf7vfp
vice::SQLFormat;
$WebService::SQLFormat::VERSION = '0.000007';
use Moo 2.002004;
use JSON::MaybeXS qw( decode_json );
use LWP::UserAgent ();
use Module::Runtime qw( use_module );
use Types::Standard
=> $sql,
strip_comments => $self->strip_comments,
}
);
return decode_json( $res->decoded_content )->{result};
}
1;
=pod
=encoding UTF-8
=head1 NAME
WebService::SQLFor
=head2 C<support>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Git::Wrapper::Plus",
"interface":"class",
"inherits":"Moo::Object"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kent
MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::Plugin::Author::KENTNL::MinimumPerl",
"interface":"class",
"inherits":"Dist::Zilla::Plugin::MinimumPerl"
}
=end MetaPOD::JSON
=head1 A
}
)->recv;
# Send job, data created by encoding @args with JSON
use JSON::XS;
$client->encoder(\&JSON::XS::encode_json);
my $job2 = $client->put(
{ priority => 100,
ttr
compontent>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::Util::BundleInfo::Plugin",
"interface":"class",
"inherits":"Moo::Object"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric
( =AutoPrereqs )],
});
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::Util::EmulatePhase",
"interface":"exporter"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpan
de )],
handles => { _decode => 'execute', },
);
sub _build__decoder {
require JSON::MaybeXS;
my $decoder = JSON::MaybeXS->new()->utf8(1)->relaxed(1);
return sub {
$decoder->decode(shift);
> sub { q{0.1.0} },
);
class_has '_extension' => (
isa => Str,
ro, lazy, default => sub { q{.json} },
);
class_has '_schema_creator' => (
isa => CodeRef,
ro, lazy_build,
traits => [qw( Co
pts) );
}
sub check {
my ( $self, $json_data, $opts ) = @_;
$opts = $self->_opt_check($opts);
return $self->_schema($opts)->check($json_data);
}
1;
__END__
=pod
=encoding UTF-8
=
ance = rule_VersionsToCode( @args );
=head1 METHODS
=head2 C<filter_plaintext>
=begin MetaPOD::JSON v1.1.0
{
"namespace":"CPAN::Changes::Markdown::Filter::Rule::VersionsToCode",
"interface
o::Object",
"does":"CPAN::Changes::Markdown::Role::Filter::Rule::PlainText"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is co
001
1000.001001
Etc.
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::Role::Version::Sanitize",
"interface":"role"
}
=end MetaPOD::JSON
=head1 NORMAL FORMS
=head2 C<normal>
N