This repository is no longer actively maintained. The plugin still works, but does not receive any further updates other than community contributed fixes. |
---|
WordPress plugin to get latest scrobbles from Last.fm user.
Basically this plugin fetches scrobbles from Last.fm, saves those to transient and next requests will be served from there. After transient has expired and deleted, new fetch from Last.fm will be made and saved to transient. This implements very simple cache.
Handcrafted with love at Digitoimisto Dude Oy, a Finnish boutique digital agency in the center of Jyväskylä.
This plugin is not meant to be "plugin for everyone", it needs at least some basic knowledge about php and css to add it to your site and making it look beautiful.
This is a plugin in development for now, so it may update very often.
Dude last.fm feed is released under the GNU GPL 2 or later.
This plugin does not have settings page or provide anything visible on front-end. So it's basically dumb plugin if you don't use any filters listed below.
Only mandatory filter to use is dude-lastfm-feed/api_key
.
Get scrobbles by calling function dude_lastfm_feed()->get_user_scrobbles()
, pass username as a only argument.
All the settings are set with filters, and there is also few filters to change basic functionality and manipulate data before caching.
Set the API key. Defaults to empty string.
API key can be generated by creating API account.
Change name of the transient for user scrobbles, must be unique for every user. Passed arguments are default name and username.
Defaults to dude-lastfm-user-$username
.
Modify api call parameters, example count of results. Only passed argument is array of default parameters.
Defaults to api key defined and result count of five.
Possible parameters are listed in Last.fm documentation.
Manipulate or use data before it's cached to transient. Only passed argument is array of scrobbles.
Change scrobble cache lifetime. Only passed argument is default lifetime in seconds.
Defaults to 600 (= ten minutes).
To use with composer, run composer require digitoimistodude/dude-lastfm-feed dev-master
in your project directory or add "digitoimistodude/dude-lastfm-feed":"dev-master"
to your composer.json require.
If you have ideas about the theme or spot an issue, please let us know. Before contributing ideas or reporting an issue about "missing" features or things regarding to the nature of that matter, please read Please note section. Thank you very much.