File: Person.pm

package info (click to toggle)
xmltv 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,396 kB
  • sloc: perl: 37,189; xml: 5,017; sh: 153; makefile: 18
file content (54 lines) | stat: -rw-r--r-- 1,365 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# Lightweight package to retrieve movie/tv programme data from The Movie Database (http://www.themoviedb.org/ )
#
# This is a custom version of the CPAN package :
#   WWW::TMDB::API - TMDb API (http://api.themoviedb.org) client
#   Version 0.04 (2012)
#   Author Maria Celina Baratang, <maria at zambale.com>
#   https://metacpan.org/pod/WWW::TMDB::API
#
# Modified for XMLTV use to 
#  - fix broken methods
#  - add methods for TV programmes, and Configuration
#  - 'version' changed to be 0.05
#
# Modifications: Geoff Westcott, December 2021
#

# Package changes for XMLTV
#  - info()   - add 'append_to_response' param
#

package XMLTV::TMDB::API::Person;

use strict;
use warnings;
our $VERSION = '0.05';

sub info {
    my $self = shift;
    my (%params) = @_;
    $self->api->send_api( [ 'person', $params{ID} ], { ID => 1, append_to_response =>0 }, \%params );
}

sub credits {
    my $self = shift;
    my (%params) = @_;
    $self->api->send_api( [ 'person', $params{ID}, 'credits' ],
        { ID => 1, language => 0 }, \%params );
}

sub images {
    my $self = shift;
    my (%params) = @_;
    $self->api->send_api( [ 'person', $params{ID}, 'images' ],
        { ID => 1 }, \%params );
}

sub search {
    my $self = shift;
    my (%params) = @_;
    $self->api->send_api( [ 'search', 'person' ],
        { query => 1, page => 0 }, \%params );
}
1;