API-Drip-Request
view release on metacpan or search on metacpan
dist_version_from => 'lib/API/Drip/Request.pm',
release_status => 'stable',
configure_requires => { 'Module::Build' => '0', },
build_requires => { 'Test::More' => '0', },
requires => {
'Carp' => 0,
'Data::Printer' => 0,
'File::HomeDir' => 0,
'File::Spec' => 0,
'HTTP::Request::Common' => 0,
'JSON' => 0,
'LWP::UserAgent' => 0,
'Params::ValidationCompiler' => 0,
'Readonly' => 0,
'Types::Standard' => 0,
'URI' => 0,
'YAML' => 0,
},
add_to_cleanup => ['API-Drip-*'],
meta_merge => {
'meta-spec' => { version => '2',
"Module::Build" : "0"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Data::Printer" : "0",
"File::HomeDir" : "0",
"File::Spec" : "0",
"HTTP::Request::Common" : "0",
"JSON" : "0",
"LWP::UserAgent" : "0",
"Params::ValidationCompiler" : "0",
"Readonly" : "0",
"Types::Standard" : "0",
"URI" : "0",
"YAML" : "0"
}
}
},
"provides" : {
"bugtracker" : {
"web" : "https://github.com/dwright/API-Drip/issues"
},
"repository" : {
"type" : "git",
"url" : "https://github.com/dwright/API-Drip.git",
"web" : "https://github.com/dwright/API-Drip"
}
},
"version" : "0.05",
"x_serialization_backend" : "JSON::PP version 2.27300"
}
provides:
API::Drip::Request:
file: lib/API/Drip/Request.pm
version: '0.05'
requires:
Carp: '0'
Data::Printer: '0'
File::HomeDir: '0'
File::Spec: '0'
HTTP::Request::Common: '0'
JSON: '0'
LWP::UserAgent: '0'
Params::ValidationCompiler: '0'
Readonly: '0'
Types::Standard: '0'
URI: '0'
YAML: '0'
resources:
bugtracker: https://github.com/dwright/API-Drip/issues
repository: https://github.com/dwright/API-Drip.git
version: '0.05'
lib/API/Drip/Request.pm view on Meta::CPAN
use Params::ValidationCompiler qw( validation_for );
use Types::Standard qw( Str HashRef CodeRef);
use YAML;
use File::Spec;
use File::HomeDir;
use Readonly;
use Carp;
use LWP::UserAgent;
use HTTP::Request::Common;
use JSON;
use URI;
use Data::Printer;
Readonly our %DEFAULTS => (
DRIP_TOKEN => undef,
DRIP_ID => undef,
DRIP_URI => 'https://api.getdrip.com/v2',
DRIP_AGENT => 'API::Drip',
DRIP_DEBUG => 0,
);
lib/API/Drip/Request.pm view on Meta::CPAN
$self->{debugger}->("Request failed", $result->content);
die $result;
}
if ( $result->code == 204 ) {
$self->{debugger}->("Success, no content");
return undef;
}
my $decoded = eval {decode_json( $result->content )};
if ( $@ ) {
$self->{debugger}->('Failed to decode JSON:', $@, $result->content);
die $result;
}
return $decoded;
}
=head1 CONFIGURATION
Configuration data may be passed in through a number of different ways, which are searched in the following order of preference:
( run in 0.840 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )