Brightcove::MAPI;
# ABSTRACT: Brightcove Media API Wrapper
our $VERSION = '0.1';
use URI;
use JSON;
use Any::Moose;
use LWP::UserAgent;
has read_api_url => (
is => 'rw',
required=> 1,
default
s);
my $res = $self->user_agent->get($url->as_string);
if ($res->is_success) {
return decode_json($res->decoded_content);
} else {
confess $res->status_line;
}
}
sub post {
my $self = shif
t;
my $params = shift || {};
my $file = shift;
$params->{token} = $self->token;
my $jsonrpc = encode_json({
method => $method,
params => $params,
});
my $res;
if (defined($file) and -f $