-
-
01 Feb 2021 03:31:29 UTC
- Distribution: Net-LastFM
- Module version: 0.38
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (91 / 0 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (10.48KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Net::LastFM - A simple interface to the Last.fm API
SYNOPSIS
my $lastfm = Net::LastFM->new( api_key => 'XXX', api_secret => 'YYY', ); my $data = $lastfm->request_signed( method => 'user.getRecentTracks', user => 'lglb', );
DESCRIPTION
The module provides a simple interface to the Last.fm API. To use this module, you must first sign up at http://www.last.fm/api to receive an API key and secret.
You can then make requests on the API - most of the requests are signed. You pass in a hash of paramters and a data structure mirroring the response is returned.
This module confesses if there is an error.
METHODS
request
This makes an unsigned request:
my $data = $lastfm->request( method => 'auth.gettoken' );
request_signed
This makes a signed request:
my $data = $lastfm->request_signed( method => 'user.getRecentTracks', user => 'lglb', );
create_http_request
If you want to integrate this module into another HTTP framework, this method will simple create an unsigned HTTP::Request object:
my $http_request = $lastfm->create_http_request( method => 'auth.gettoken' );
create_http_request_signed
If you want to integrate this module into another HTTP framework, this method will simple create a signed HTTP::Request object:
my $http_request = $lastfm->create_http_request_signed( method => 'user.getRecentTracks', user => 'lglb', );
AUTHOR
Leon Brocard <acme@astray.com>
COPYRIGHT
Copyright (C) 2008-9, Leon Brocard.
LICENSE
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
Module Install Instructions
To install Net::LastFM, copy and paste the appropriate command in to your terminal.
cpanm Net::LastFM
perl -MCPAN -e shell install Net::LastFM
For more information on module installation, please visit the detailed CPAN module installation guide.