A small API using Deno that will get the currently playing information for a user from Last fm and return it. It is designed to be easily deployed to Deno Deploy.
The easiest and only supported way to deploy this is to use Deno Deploy.
- Get your last.fm API Key from https://www.last.fm/api/accounts
- click the "Deploy on Deno" button above
- Click the "Add Environment Variables" button
- Add the following
- add
LASTFM_API_KEYwith your API Key from Last.fm - add
CONFIG_USERwith the last.fm username
- add
- Click "Create App"
- execute a get request to the URL to make sure it is working
- Party
- fork this repo
- create an account on and/or login to https://console.deno.com/
- Get your last.fm API Key from https://www.last.fm/api/accounts
- on the Deno Deploy dashboard click "New App"
- Connect Deno deploy to your GitHub account
- Select the fork of this repo you made
- Click the "Add Environment Variables" button
- Add the following
- add
LASTFM_API_KEYwith your API Key from Last.fm - add
CONFIG_USERwith the last.fm username
- add
- Click "Create App"
- execute a get request to the URL to make sure it is working
- Party
- Install Deno from https://deno.com/
- Get a Last.fm API Key from https://www.last.fm/api/accounts
- Clone this repo
- Created a
.envfile in the root of the project- add
LASTFM_API_KEYwith your API Key from Last.fm - add
CONFIG_USERwith the last.fm username
- add
- run
deno run dev
The only endpoint is
Arguments: none
application/json
{
state: "success",
data: {
images: { src: string, size: "small" | "medium" | "large" | "extralarge" }[];
artist: string;
album: string;
track: string;
user: string;
nowPlaying: boolean;
}
}application/json
{
state: "error",
data: string
}