2.0.1 • Published 4 months ago

solid-lastfm-viewer v2.0.1

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

solid-lastfm-viewer

!NOTE This repository is now part of a monorepo if you want to start developing on it go to the original monorepo here

A solidjs component to view recent scrobbles for a last.fm user (This is a sister project to @react-lastfm-viewer)

Quick start

Install it:

npm i solid-lastfm-viewer
# or
yarn add solid-lastfm-viewer
# or
pnpm add solid-lastfm-viewer

Use it:

to start using the component you first need to get a last.fm API key from here, once you've done that just import the component and specify the username of the user you want to get scrobbling information from:

Please note that some users set their profile stats to private, so not every user is applicable, if you're using this component on your personal account just set your "Recent listening" stats to public here

import SolidLastFMViewer from "solid-lastfm-viewer";

function App() {
	return (
		<>
			<SolidLastFMViewer user="[username]" api_key="[API_KEY]" />
		</>
	);
}

if you want to frequently fetch the user's listening info just specify the updateInterval prop. (milliseconds) (it takes a number that determines the update interval):

import SolidLastFMViewer from "solid-lastfm-viewer";

function App() {
	return (
		<>
			<SolidLastFMViewer
				user="[username]"
				api_key="[API_KEY]"
				updateInterval={20000} //20 seconds
			/>
		</>
	);
}

!CAUTION setting the updateInterval prop to a low number might subject your api key for termination, to avoid this just use a higher more reasonable number.

2.0.1

4 months ago

1.2.0

4 months ago

2.0.0

4 months ago

1.0.5

4 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago