w(Class::Accessor);
use Cache::FileCache;
use Carp;
use File::Spec::Functions qw(tmpdir);
use JSON;
use LWP::ConnCache;
use LWP::UserAgent;
use WebService::Flixster::Actor;
use WebService::Flixs
ecoded_json {
my $self = shift;
my $request = shift;
my $content = $self->_response_decoded_content($request);
my $json = JSON->new();
$json->utf8(0);
my $resp = $json->deco
__content()->{$page};
if (! defined $content) {
$content = $self->_ws()->_response_decoded_json($self->_request($page));
$self->__content()->{$page} = $content;
}
return $content;
}
es/%d.json", $self->_id()));
$uri->query_form('limit' => 13, 'offset' => 0); # TODO: Suitable limit (and use offset?)
} elsif ($page == PAGE_PHOTOS) {
$uri->path("/iphone/api/v1/photos.json");
set?)
} elsif ($page == PAGE_REVIEWS) {
$uri->path(sprintf("/iphone/api/v1/movies/%d/reviews.json", $self->_id()));
$uri->query_form('type' => 'critics', 'limit' => 100, 'offset' => 0); # TODO:
v1/movies/%d.json", $id));
my $content = $self->_ws()->_response_decoded_content(GET $uri->as_string());
if ($content =~ m/^\s*$/) {
croak "Resource not found";
}
my $json = $self->_ws
N) {
$uri->path(sprintf("/iphone/api/v1/actors/%d.json", $self->_id()));
} elsif ($page == PAGE_PHOTOS) {
$uri->path("/iphone/api/v1/photos.json");
$uri->query_form('actor' => $self->_id(), 'li
v1/actors/%d.json", $id));
my $content = $self->_ws()->_response_decoded_content(GET $uri->as_string());
if ($content =~ m/^\s*$/) {
croak "Resource not found";
}
my $json = $self->_ws
()->_response_decoded_json(GET $uri->as_string());
if ($json->{'id'} ne $id) {
die "id failed round trip"
}
return $id;
} elsif (exists $self->_q()->{'imdbid'}) {
my $imdbid = $self->_