The playlist ID. Pass undefined to skip the request.
Hook result with data as a SoundCloudPlaylist.
import { usePlaylist } from "soundcloud-api-ts-next";
function PlaylistInfo({ id }: { id: number }) {
const { data: playlist, loading } = usePlaylist(id);
if (loading) return <p>Loading...</p>;
return <h1>{playlist?.title}</h1>;
}
Fetch a single SoundCloud playlist by ID.