thor::KENTNL');
$bundle->configure;
my @stopwords = (
qw(
ci api travis api API GitHub URI JSON URIs
)
);
for my $var (@stopwords) {
$bundle->add_or_append_policy_field( 'Documentation::P
e::Client;
our $VERSION = '0.002001';
# ABSTRACT: Anything that fetches from Travis and returns JSON data
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
use Moo::Role qw( has );
has
TF-8
=head1 NAME
Net::Travis::API::Role::Client - Anything that fetches from Travis and returns JSON data
=head1 VERSION
version 0.002001
=head1 ATTRIBUTES
=head2 C<http_engine>
A L<< C<Net::Tr
1.0
{
"namespace":"Net::Travis::API::Role::Client",
"interface":"role"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is co
{ return 'application/vnd.travis-ci.2+json' },
);
has 'authtokens' => (
is => rw =>,
predicate => 'has_authtokens',
);
has 'json' => (
is => ro =>,
lazy
=> 1,
builder => sub {
require JSON::MaybeXS;
return JSON::MaybeXS->new();
},
);
sub _add_auth_tokens {
my ( $self, $options ) = @_;
$options = {} if not defined $options;
if ( exis
require Net::Travis::API::UA::Response;
return Net::Travis::API::UA::Response->new(
json => $self->json,
%{$result},
);
}
no Moo;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Ne
nds 'HTTP::Tiny::UA::Response';
has 'json' => (
is => ro =>,
lazy => 1,
builder => sub {
require JSON::MaybeXS;
return JSON::MaybeXS->new();
},
);
sub con
e::FB_CROAK );
}
sub content_json {
my ( $self, $force ) = @_;
my ($has_force) = ( @_ > 1 );
my %whitelist = ( 'application/json' => 1 );
return unless $has_force or exists
next unless $param =~ /\Acharset=(.+)\z/msx;
$charset = $1;
}
}
return $self->json->utf8(0)->decode( $self->decoded_content($charset) );
}
no Moo;
1;
__END__
=pod
=encoding UT
$result->status;
return if not length $result->content;
return unless my $json = $result->content_json;
return $json->{access_token};
}
sub get_authorised_ua_for {
my ( $self, $gh_
et_authorized_ua_for( <githubtoken> ) ) {
pp ( $ua->get('/users')->content_json );
}
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Net::Travis::API::Auth::GitHub",
"inherits":"Moo::
Object",
"does":"Net::Travis::API::Role::Client",
"interface":"class"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copy
N
version 0.002001
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Net::Travis::API",
"interface":"class",
"inherits":"Moo::Object"
}
=end MetaPOD::JSON
=head1 DEVELOPMENT
This code is h