feat (v1.0.0): initial refactor and redesign
This commit is contained in:
parent
3058aa1ab4
commit
fe9b50b30e
134 changed files with 17792 additions and 3670 deletions
|
|
@ -2,6 +2,32 @@ import { NextResponse } from 'next/server'
|
|||
|
||||
export const runtime = 'edge';
|
||||
|
||||
/**
|
||||
* Fetch currently playing music from ListenBrainz
|
||||
*
|
||||
* Returns the most recent listening data for the configured user.
|
||||
* Requires LISTENBRAINZ_TOKEN environment variable to be set.
|
||||
*
|
||||
* @returns {Promise<NextResponse>} ListenBrainz listening data with track metadata
|
||||
*
|
||||
* @example
|
||||
* // Response structure
|
||||
* {
|
||||
* payload: {
|
||||
* count: 1,
|
||||
* listens: [{
|
||||
* playing_now: true,
|
||||
* track_metadata: {
|
||||
* artist_name: "Daft Punk",
|
||||
* track_name: "Get Lucky",
|
||||
* release_name: "Random Access Memories"
|
||||
* }
|
||||
* }]
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @category API
|
||||
*/
|
||||
export async function GET() {
|
||||
try {
|
||||
const response = await fetch("https://api.listenbrainz.org/1/user/p0ntus/playing-now", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue