@ekwoka/spotify-api
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -6,3 +6,3 @@ import { Copyrights } from '../../core/types'; | ||
export declare type AlbumStub = { | ||
album_type: 'SINGLE' | 'ALBUM' | 'COMPILATION'; | ||
album_type: 'SINGLE' | 'ALBUM' | 'COMPILATION' | 'single' | 'album' | 'compilation'; | ||
artists: ArtistStub[]; | ||
@@ -9,0 +9,0 @@ available_markets: string[]; |
@@ -14,2 +14,4 @@ export { albumIsSaved } from './albums/albumIsSaved'; | ||
export { recentlyPlayedTracks } from './player/recentlyPlayedTracks'; | ||
export { getPlaylist } from './playlists/getPlaylist'; | ||
export { getUsersPlaylists } from './playlists/getUsersPlaylists'; | ||
export { search } from './search/search'; | ||
@@ -31,2 +33,3 @@ export { searchString } from './search/searchString'; | ||
export type { Context } from './player/types'; | ||
export type { Playlist, PlaylistStub } from './playlists/types'; | ||
export type { QueryType, PageType, SearchResults } from './search/types'; | ||
@@ -33,0 +36,0 @@ export type { Recommendations } from './tracks/getRecommendations'; |
@@ -14,2 +14,4 @@ export { albumIsSaved } from './albums/albumIsSaved'; | ||
export { recentlyPlayedTracks } from './player/recentlyPlayedTracks'; | ||
export { getPlaylist } from './playlists/getPlaylist'; | ||
export { getUsersPlaylists } from './playlists/getUsersPlaylists'; | ||
export { search } from './search/search'; | ||
@@ -16,0 +18,0 @@ export { searchString } from './search/searchString'; |
import { PaginatedList } from '../../core'; | ||
import { Album } from '../albums'; | ||
import { Artist } from '../artists'; | ||
import { PlaylistStub } from '../playlists'; | ||
import { Track } from '../tracks'; | ||
@@ -16,3 +17,3 @@ export declare type QueryType = { | ||
artists: PaginatedList<Artist>; | ||
playlists: PaginatedList<unknown>; | ||
playlists: PaginatedList<PlaylistStub>; | ||
tracks: PaginatedList<Track>; | ||
@@ -19,0 +20,0 @@ shows: PaginatedList<unknown>; |
export { fetchOptions, makeAuthURL, refreshToken, tokensFromCode, } from './auth'; | ||
export { resetCache, setToken, spotifyApiClient } from './core'; | ||
export { albumIsSaved, getAlbum, getAlbums, getAlbumTracks, getArtist, getArtists, getCurrentUser, getRecommendations, getSavedAlbums, getTopItems, getUserProfile, newReleases, recentlyPlayedTracks, removeAlbums, removeTracks, saveAlbums, saveTracks, search, trackIsSaved, } from './endpoints'; | ||
export { albumIsSaved, getAlbum, getAlbums, getAlbumTracks, getArtist, getArtists, getCurrentUser, getPlaylist, getRecommendations, getSavedAlbums, getTopItems, getUserProfile, getUsersPlaylists, newReleases, recentlyPlayedTracks, removeAlbums, removeTracks, saveAlbums, saveTracks, search, trackIsSaved, } from './endpoints'; | ||
export { spotifyFetch } from './utils/spotifyFetch'; | ||
@@ -5,0 +5,0 @@ export type { RefreshedToken, SpotifyTokens } from './auth'; |
export { fetchOptions, makeAuthURL, refreshToken, tokensFromCode, } from './auth'; | ||
export { resetCache, setToken, spotifyApiClient } from './core'; | ||
export { albumIsSaved, getAlbum, getAlbums, getAlbumTracks, getArtist, getArtists, getCurrentUser, getRecommendations, getSavedAlbums, getTopItems, getUserProfile, newReleases, recentlyPlayedTracks, removeAlbums, removeTracks, saveAlbums, saveTracks, search, trackIsSaved, } from './endpoints'; | ||
export { albumIsSaved, getAlbum, getAlbums, getAlbumTracks, getArtist, getArtists, getCurrentUser, getPlaylist, getRecommendations, getSavedAlbums, getTopItems, getUserProfile, getUsersPlaylists, newReleases, recentlyPlayedTracks, removeAlbums, removeTracks, saveAlbums, saveTracks, search, trackIsSaved, } from './endpoints'; | ||
export { spotifyFetch } from './utils/spotifyFetch'; |
@@ -16,3 +16,3 @@ { | ||
"license": "MIT", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "Composable Wrapper for the Spotify Web Api and Spotify Web Playback SDK", | ||
@@ -35,3 +35,3 @@ "repository": "github:ekwoka/spotify-api", | ||
"esbuild": "^0.15.5", | ||
"eslint": "^8.22.0", | ||
"eslint": "^8.23.0", | ||
"gzip-size": "^7.0.0", | ||
@@ -38,0 +38,0 @@ "husky": "^8.0.1", |
@@ -293,2 +293,35 @@ # ⚡️A tree-shakable, composable, lightweight wrapper for the multiple Spotify APIs🔥 | ||
### Playlists | ||
The following endpoints are available in the Playlists category: | ||
- `getPlaylist` - Gets complete playlist information by playlist ID | ||
- `getUsersPlaylists` - Gets playlists created by or saved by the current user | ||
#### getPlaylist | ||
Gets the complete playlist information by playlistID. | ||
```js | ||
const playlist = await client(getPlaylist('37i9dQZF1DX5g856aiKiDS')) | ||
const playlistDescription = await client(getPlaylist('37i9dQZF1DX5g856aiKiDS', { | ||
fields: 'description' | ||
})) | ||
``` | ||
The options object accepts a fields string, which is a comma-separated list of the fields from the Playlist object to return. (This currently does not return the correct type when fields entry is used). | ||
#### getUsersPlaylists | ||
Gets the playlists created by or saved by the current user. | ||
```js | ||
const savedPlaylists = await client(getUsersPlaylists()) | ||
const fivePlaylists = await client(getUsersPlaylists({ limit: 5 })) | ||
``` | ||
Options: | ||
- `limit`: How many playlists to return in the results. | ||
- `offset`: How far into the list to start the results | ||
Playlists returned by this endpoint do not include track information. | ||
### Search | ||
@@ -295,0 +328,0 @@ There is only one Search endpoint: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113933
191
1583
567