diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-03-19 00:32:01 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-03-19 00:32:01 -0500 |
commit | cc3bb1de114ac1d52f2ebb8986e4f996903ca8d8 (patch) | |
tree | 488a30f4be872bcbca44c6dd9e3e85049619caeb | |
parent | f87eeba7fd87a83f75e445d9ef2ec55f46b24668 (diff) | |
download | lastfm-export-cc3bb1de114ac1d52f2ebb8986e4f996903ca8d8.tar.gz lastfm-export-cc3bb1de114ac1d52f2ebb8986e4f996903ca8d8.zip |
allow passing parameters to the track_count method too
-rw-r--r-- | lib/LastFM/Export.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/LastFM/Export.pm b/lib/LastFM/Export.pm index c36f65f..dfad065 100644 --- a/lib/LastFM/Export.pm +++ b/lib/LastFM/Export.pm @@ -34,12 +34,13 @@ has lastfm => ( sub track_count { my $self = shift; + my (%params) = @_; + + $params{method} = 'user.getRecentTracks'; + $params{user} = $self->user; + $params{limit} = 1; - return $self->lastfm->request( - method => 'user.getRecentTracks', - user => $self->user, - limit => 1, - )->{recenttracks}{'@attr'}{total}; + return $self->lastfm->request(%params)->{recenttracks}{'@attr'}{total}; } sub tracks { |