NAME

WWW::Mixcloud - Perl wrapper for the Mixcloud API

VERSION

version 0.01

SYNOPSIS

use WWW::Mixcloud;

my $mixcloud = WWW::Mixcloud->new({
    api_key    => $api_key,
    api_secret => $api_secret,
)};

my $cloudcast = $mixcloud->get_cloudcast(
    'http://api.mixcloud.com/spartacus/party-time/'
);

my $user = $mixcloud->get_user(
    'http://www.mixcloud.com/spartacus/'
);

my $tag = $mixcloud->get_tag(
    'http://api.mixcloud.com/tag/funk/'
);

my $artist = $mixcloud->get_artist(
    'http://api.mixcloud.com/artist/aphex-twin/'
);

my $track = $mixcloud->get_track(
    'http://api.mixcloud.com/track/bonobo/ketto/'
);

my $category = $mixcloud->get_category(
    'http://api.mixcloud.com/categories/ambient/'
);

DESCRIPTION

WWW::Mixcloud is a simple Perl wrapper for the read only portion of the mixcloud API.

Each method requires a URL and will return an object representing the data returned from the API. The attributes on the object match the data from the API.

METHODS

new

my $mixcloud = WWW::Mixcloud->new({ api_key => $key, api_secret => $secret });

Creates a new WWW::Mixcloud object. The key and secret arguments are only required to use non-readonly portions of the API (not currently supported).

get_cloudcast

my $cloudcast = $mixcloud->get_cloudcast( $url );

Returns a WWW::Mixcloud::Cloudcast object. $url should be a valid cloudcast URL.

get_user

my $user = $mixcloud->get_user( $url );

Returns a WWW::Mixcloud::User object. $url should be a valid user URL.

get_tag

my $tag = $mixcloud->get_tag( $url );

Returns a WWW::Mixcloud::Cloudcast::Tag object. $url should be a valid tag URL.

get_artist

my $artist = $mixcloud->get_artist( $url );

Returns a WWW::Mixcloud::Artist object. $url should be a valid artist URL.

get_track

my $track = $mixcloud->get_artist( $url );

Returns a new WWW::Mixcloud::Track object. $url should be a valid track URL.

get_category

my $category = $mixcloud->get_category( $url );

Returns a new WWW::Mixcloud::Category object. $url should be a valid category URL.

AUTHOR

Adam Taylor <ajct@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Adam Taylor.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.