Subject: | Feature request: add similar_movies |
Date: | Fri, 28 Sep 2012 22:04:34 +0200 |
To: | bug-TMDB [...] rt.cpan.org |
From: | Brainkiller <brainkiller [...] gmail.com> |
Hi,
Please add support for the call to |similar_movies as it is now
supported in the API
|
You can use the following patch as example:
-----------------------------------------------------------
--- Movie.pm.org 2012-09-28 22:03:33.942167716 +0200
+++ Movie.pm 2012-09-27 19:59:18.026397296 +0200
@@ -87,6 +87,26 @@
} ## end sub alternative_titles
## ====================
+## SIMILAR MOVIES
+## ====================
+sub similar_movies {
+ my ($self) = @_;
+ my $params = {};
+ $params->{lang} = $self->session->lang if $self->session->lang;
+
+ my $response = $self->session->talk(
+ {
+ method => 'movie/' . $self->id . '/similar_movies',
+ params => $params
+ }
+ );
+ my $result = $response->{'results'};
+
+ return @$result if wantarray;
+ return $result;
+}
+
+## ====================
## CAST
## ====================
sub cast {
-----------------------------------------------------------
Regards,
Brainkiller