Dave Cross

NAME

Net::Songkick - Perl wrapper for the Songkick API

SYNOPSIS

  use Net::Songkick;

  my $api_key = 'your_api_key';
  my $sk = Net::Songkick->new({ api_key => $api_key });

  # Returns XML by default
  my $events = $sk->get_events;

  # Or returns JSON
  my $events = $sk->get_events({ format => 'json' });

DESCRIPTION

This module presents a Perl wrapper around the Songkick API.

Songkick (http://www.songkick.com/) is a web site that tracks gigs around the world. Users can add information about gigs (both in the past and the future) and can track their attendance at those gigs.

For more details of the Songkick API see http://developer.songkick.com/.

METHODS

Net::Songkick->new({ api_key => $api_key })

Creates a new object which can be used to request data from the Songkick API. Requires one parameter which is the user's API key.

To request an API key from Songkick, see http://www.songkick.com/api_keys/index.

Returns a Net::Songkick object if successful.

$sk->get_events({ ... options ... });

Gets a list of upcoming events from Songkick. Various parameters to control the events returned are supported for the full list see http://www.songkick.com/developer/event-search.

In addition, this method takes an extra parameter, format, which control the format of the data returned. This can be either xml, json or perl. If it is either xml or json then the method will return the raw XML or JSON from the Songkick API. If ii is perl then this method will return a list of Net::Songkick::Event objects. If this parameter is omitted, then perl is assumed.

$sk->get_upcoming_events({ ... options ... });

Gets a list of upcoming events for a particular user from Songkick. This method accepts all of the same search parameters as get_events. It also supports the optional format parameter.

This method has another, mandatory, parameter called user. This is the username of the user that you want information about.

$sk->get_past_events({ ... options ... });

Gets a list of upcoming events for a particular user from Songkick.

This method has an optional parameter, page to control which page of the data you want to return. It also supports the format parameter.

This method has another, mandatory, parameter called user. This is the username of the user that you want information about.

$sk->get_setlist({ ... options ... });

Returns information about a set list from a gig. It supports the format parameter.

This method also has a mandatory parameter called event_id. This is the Songkick identifier for the gig that you want the set list for. For more details about this parameter, see http://www.songkick.com/developer/setlists.

AUTHOR

Dave Cross <dave@mag-sol.com>

SEE ALSO

perl(1), http://www.songkick.com/, http://developer.songkick.com/

COPYRIGHT AND LICENSE

Copyright (C) 2010, Magnum Solutions Ltd. All Rights Reserved.

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