NAME

TV::ProgrammesSchedules::BBC - Interface to BBC TV Programmes Schedules.

VERSION

Version 0.08

DESCRIPTION

The module provides programmes schedules for BBC One, BBC Two, BBC Three, BBC Four, BBC HD, CBBC, CBeebies, BBC News, BBC Parliament, BBC ALBA.

+----------------+-----------------------------+
| Name           | Location                    |
+----------------+-----------------------------+
| BBC One        | Cambridgeshire              |
|                | Channel Islands             |
|                | East                        |
|                | East Midlands               |
|                | HD                          |
|                | London                      |
|                | North East & Cumbria        |
|                | Northern Ireland            |
|                | Oxfordshire                 |
|                | Scotland                    |
|                | South                       |
|                | South East                  |
|                | South West                  |
|                | West Midlands               |
|                | Yorks & Lincs               |
+----------------+-----------------------------+
| BBC Two        | England                     |
|                | Northern Ireland            |
|                | Northern Ireland (Analogue) |
|                | Scotland                    |
|                | Wales                       |
|                | Wales (Analogue)            |
+----------------+-----------------------------+
| BBC Three      | N/A                         |
+----------------+-----------------------------+
| BBC Four       | N/A                         |
+----------------+-----------------------------+
| BBC HD         | N/A                         |
+----------------+-----------------------------+
| CBBC           | N/A                         |
+----------------+-----------------------------+
| CBeebies       | N/A                         |
+----------------+-----------------------------+
| BBC News       | N/A                         |
+----------------+-----------------------------+
| BBC Parliament | N/A                         |
+----------------+-----------------------------+
| BBC ALBA       | N/A                         |
+----------------------------------------------+

CONSTRUCTOR

The constructor expects a reference to an anonymous hash as input parameter. Table below shows the possible value of various key (channel, location, yyyy, mm, dd). The yyyy, mm and dd are optional. If missing picks up the current year, month and day.

+----------------+------------+-----------------+------+----+----+
| Name           | Channel    | Location        | YYYY | MM | DD |
+----------------+------------+-----------------+------+----+----+
| BBC One        | bbcone     | cambridge       | 2011 |  4 |  7 |
|                |            | channel_islands |      |    |    |
|                |            | east            |      |    |    |
|                |            | east_midlands   |      |    |    |
|                |            | hd              |      |    |    |
|                |            | london          |      |    |    |
|                |            | north_east      |      |    |    |
|                |            | ni              |      |    |    |
|                |            | oxford          |      |    |    |
|                |            | scotland        |      |    |    |
|                |            | south           |      |    |    |
|                |            | south_east      |      |    |    |
|                |            | south_west      |      |    |    |
|                |            | west_midlands   |      |    |    |
|                |            | east_yorkshire  |      |    |    |
+----------------+------------+-----------------+------+----+----+
| BBC Two        | bbctwo     | england         | 2011 |  4 |  7 |
|                |            | ni              |      |    |    |
|                |            | ni_analogue     |      |    |    |
|                |            | scotland        |      |    |    |
|                |            | wales           |      |    |    |
|                |            | wales_analogue  |      |    |    |
+----------------+------------+-----------------+------+----+----+
| BBC Three      | bbcthree   | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+
| BBC Four       | bbcfour    | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+
| BBC HD         | hd         | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+
| CBBC           | cbbc       | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+
| CBeebies       | cbeebies   | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+
| BBC News       | bbcnews    | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+
| BBC Parliament | parliament | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+
| BBC ALBA       | bbcalba    | N/A             | 2011 |  4 |  7 |
+----------------+------------+-----------------+------+----+----+

METHODS

get_url()

Prepare and return URL using the given information.

use strict; use warnings;
use TV::ProgrammesSchedules::BBC;

my $bbc = TV::ProgrammesSchedules::BBC->new({ channel => 'bbcone', location => 'london' });
print $bbc->get_url();

get_listings()

Return the programmes listings for the given channel and location (if applicable). Data would be in the form of reference to a list containing anonymous hash with keys start_time,end_time, title and url for each of the programmes.

use strict; use warnings;
use TV::ProgrammesSchedules::BBC;

my $bbc = TV::ProgrammesSchedules::BBC->new({ channel => 'bbcone', location => 'london' });
my $listings = $bbc->get_listings();

as_xml()

Returns listings in XML format. By default it returns todays lisitng for BBC TV.

use strict; use warnings;
use TV::ProgrammesSchedules::BBC;

my $bbc = TV::ProgrammesSchedules::BBC->new({ channel => 'bbcone', location => 'london' });
print $bbc->as_xml();

as_string()

Returns listings in a human readable format.

use strict; use warnings;
use TV::ProgrammesSchedules::BBC;

my $bbc = TV::ProgrammesSchedules::BBC->new({ channel => 'bbcone', location => 'london' });

print $bbc->as_string();

# or even simply
print $bbc;

AUTHOR

Mohammad S Anwar, <mohammad.anwar at yahoo.com>

BUGS

Please report any bugs/feature requests to bug-tv-programmesschedules-bbc at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=TV-ProgrammesSchedules-BBC. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc TV::ProgrammesSchedules::BBC

You can also look for information at:

ACKNOWLEDGEMENTS

TV::ProgrammesSchedules::BBC provides information from BBC official website. This information should be used as it is without any modifications. BBC remains the sole owner of the data. The terms and condition for Personal and Non-business use can be found here http://www.bbc.co.uk/terms/personal.shtml.

LICENSE AND COPYRIGHT

Copyright 2011 Mohammad S Anwar.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

DISCLAIMER

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.