Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    WebService::BBC::MusicCharts 0.01

    Download button

    No screenshots available
    Downloads: 245  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Dean Wilson | More programs
    Perl Artistic License / FREE
    October 14th, 2009, 23:26 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    WebService::BBC::MusicCharts description

    Retrieve and return UK music chart listings

    WebService::BBC::MusicCharts is a Perl module that provides access to some of the BBCs online music charts via a simple object-oriented interface.

    It currently supports the singles chart, album chart and downloaded music charts.

    SYNOPSIS

     use WebService::BBC::MusicCharts;

     my $chart = WebService::BBC::MusicCharts->new( chart => 'album' );
     my $count = 1;

     foreach my $title ($chart->titles) {
     print "At $count we have $title
    ";
     $count++;
     }


    EXAMPLES

     use WebService::BBC::MusicCharts;

     my $albums = WebService::BBC::MusicCharts->new( chart => 'album' );

     foreach my $chart_position (1..40) {
     my $details = $albums->number($chart_position);
     print "$chart_position: ", $details->{title};
     print " by ", $details->{artist},"
    ";
     }


    METHODS

    new ( chart => 'chart type' )

    This is the constructor for a new WebService::BBC::MusicCharts object. The chart argument is required (and can currently be 'album', 'download' or 'singles') and the module will die if it is either missing or passed an invalid value.

    The constructor also does the actual page fetch, which may also die if the get fails. Wrapping the new invocation in an eval isn't a bad idea.

    chart_type

    Returns the type of chart that this instance represents. Mostly used when I was debugging the module.

    titles

    Returns an array containing all the titles from the chart this instance represents.

    artists

    Returns an array containing all the artists from the chart this instance represents.

    number($num)

    The number method must be called with a valid integer (it accepts any between 1 and 40), it then returns a hash ref containing the details for the song/album at that chart position.

    The fields returned are: artist - the name of the artist title - the title of the single or album label - the owning record label this_week - the current chart position of the song/album last_week - The position this song/album was at last week. This will either be a number, NEW or RE (re-entry) weeks_in_chart - the number of weeks it's been in the chart

    If called without an argument, or with one that's not between 1 and 40, it will return undef.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    music chart listings | Perl module | retrieve listings | UK | BBC | music

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM