@jeromefitz/spotify v2.1.6-kbar-from-website.1
@jeromefitz/spotify
Custom API for jeromefitzgerald.com/music.
nowPlaying: Current TrackrecentlyPlayed: Recently PlayedtopArtists: Top ArtiststopTracks: Top Tracks
š ļø Usage
Must provide:
const {
SPOTIFY_CLIENT_ID: clientId,
SPOTIFY_CLIENT_SECRET: clientSecret,
SPOTIFY_REFRESH_TOKEN: refreshToken,
} = process.env
const credentials = {
clientId,
clientSecret,
refreshToken,
}
const spotify: ClientProps = new Client({ ...credentials })This will get the Authorization Token for the Bearer and consistently apply for API calls on your behalf.
šļø Note: Need to verify w. 2.0.1 release what happens if the token expires š
ļø (before we were getting the token on every request)
Following functions are exposed via spotify.get.*:
nowPlaying: Current TrackrecentlyPlayed: Recently PlayedtopArtists: Top ArtiststopTracks: Top Tracks
Example:
spotify.get.topArtists({
limit,
offset,
time_range,
withImages: true,
})āØļø Customizations
š§āš¤ļø artist
For a track we create an artist key that maps across all available artists[artist.name].
š¼ļø withImages
If this is passed we dynamically use plaiceholder to add an image key to:
nowPlaying:albumrecentlyPlayed:albumtopArtists:artisttopTracks:album
Only call this via an API call.
8 months ago
12 months ago
10 months ago
12 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago