… And you will get this:
Or if you prefer a more compact rending, like:
Or… why not go really minimalist, and show the cover art only (of course, everyone knows that album):
album="Tapping the Vein">
HTML Attributes of the Tag
Any native HTML attribute (
style, etc.) is supported, plus the component-specific:
artist – Required artist name to search on Last.Fm.
album – Required album name to search on Last.Fm.
mode – Optional display mode of the component. The default mode is
"minimal" are the other two options.
as well as their jQuery or other libraries aliases), plus the component-specific:
render(artist, album, mode) – Render album info in the queried acidjs-xcdinfo
mode parameter is optional and if not set to
any of the
"full" mode will be used. Example:
document.querySelector("#album-02").render("Steve Vai", "Passion and Warfare", "full");
document.getElementById("#album-02").render("Steve Vai", "Passion and Warfare", "full");
$("#album-02").get(0).render("Steve Vai", "Passion and Warfare", "full");
getData() – Get the stored current DTO, received from Last.Fm. Example:
In order to use X-CD-Info you will need to get an API key from Last.Fm. If you don’t have one already, get it here. It’s free, and Last.Fm rocks.
Sounds good? Check it and get it here. Find @wemakesitesnet on Twitter and let me know what you think.
Sharing the same interest towards HTML5 Web Components? Check my other experiments, related to that exciting technology. If you are interested in similar 3rd-party widgets or APIs make sure you check my IMDB Fetcher project.
Rock and Roll!