aders;
use URI;
use JSON::XS;
use SilverGoldBull::API::Response;
use constant {
API_URL => 'https://api.silvergoldbull.com/',
JSON_CONTENT_TYPE => 'application/json',
TIMEOUT
return LWP::UserAgent->new();
}
);
has 'json' => (
is => 'ro',
init_arg => undef,
isa => 'JSON::XS',
default => sub {
return JSON::XS->new();
}
);
has 'api_url' => ( is
f->api_key,
%{$args->{params} || {}},
);
my $head = HTTP::Headers->new(Content_Type => JSON_CONTENT_TYPE);
$head->header(%params);
my $req = HTTP::Request->new($args->{method},$args->{