Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

WordPress plugin to get latest scrobbles from Last.fm user.

License

Notifications You must be signed in to change notification settings

digitoimistodude/dude-lastfm-feed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

‼️ This repository is no longer actively maintained. The plugin still works, but does not receive any further updates other than community contributed fixes.

Dude last.fm feed

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ä.

Table of contents

  1. Please note before using
  2. License
  3. Usage
  4. Hooks
  5. Composer
  6. Contributing

Please note before using

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.

License

Dude last.fm feed is released under the GNU GPL 2 or later.

Usage

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.

Hooks

All the settings are set with filters, and there is also few filters to change basic functionality and manipulate data before caching.

dude-lastfm-feed/api_key

Set the API key. Defaults to empty string.

API key can be generated by creating API account.

dude-lastfm-feed/user_scrobbles_transient

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.

dude-lastfm-feed/user_scrobbles_parameters

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.

dude-lastfm-feed/user_scrobbles

Manipulate or use data before it's cached to transient. Only passed argument is array of scrobbles.

dude-lastfm-feed/user_scrobbles_lifetime

Change scrobble cache lifetime. Only passed argument is default lifetime in seconds.

Defaults to 600 (= ten minutes).

Composer

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.

Contributing

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.

Releases

No releases published

Packages

No packages published

Languages