From 02026860982899cd561ffd8cc0fbd8077ef69444 Mon Sep 17 00:00:00 2001 From: Neil Richter Date: Tue, 25 Jul 2023 15:37:45 +0200 Subject: [PATCH] docs: update readme --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index f17de32..8d6353c 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ if (playbackState.item?.type === 'track') { ## ๐Ÿ“ฆ Available APIs +- [๐Ÿ”’ Authentication](#---authentication) - [๐Ÿ’ฟ Albums](#---albums) - [๐ŸŽค Artists](#---artists) - [๐Ÿ“— Audiobooks](#---audiobooks) @@ -54,7 +55,23 @@ if (playbackState.item?.type === 'track') { - [๐ŸŽผ Tracks](#---tracks) - [๐Ÿ‘ฅ Users](#---users) +### ๐Ÿ”’ Authentication + +These methods can be accessed directly through your `SpotifyClient` instance. + +| Method | Description | +| -------| ----------- | +| `setAccessToken` | Sets the `access_token` for the current instance of `SpotifyClient` | +| `setRefreshToken` | Sets the `refresh_token` for the current instance of `SpotifyClient` | +| `generateOAuthUrl` | Generates an OAuth link with the provided scope | +| `getAccessToken` | Exchanges an authorization code for an `access_token` and a `refresh_token` | +| `refreshToken` | Obtain a new `access_token` from a refresh token | + + ### ๐Ÿ’ฟ Albums + +These methods can be accessed through the `albums` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getAlbum`](https://developer.spotify.com/documentation/web-api/reference/get-an-album) | Get Spotify catalog information for a single album. | @@ -68,6 +85,8 @@ if (playbackState.item?.type === 'track') { ### ๐ŸŽค Artists +These methods can be accessed through the `artists` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getArtist`](https://developer.spotify.com/documentation/web-api/reference/get-an-artist) | Get Spotify catalog information for a single artist identified by their unique Spotify ID. | @@ -78,6 +97,8 @@ if (playbackState.item?.type === 'track') { ### ๐Ÿ“— Audiobooks +These methods can be accessed through the `audiobooks` key of your `SpotifyClient` instance. + **Note:** Audiobooks are only available for the US, UK, Ireland, New Zealand and Australia markets. | Method | Description | @@ -92,6 +113,8 @@ if (playbackState.item?.type === 'track') { ### ๐Ÿ”– Categories +These methods can be accessed through the `categories` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getCategories`](https://developer.spotify.com/documentation/web-api/reference/get-categories) | Get a list of categories used to tag items in Spotify (on, for example, the Spotify playerโ€™s โ€œBrowseโ€ tab). | @@ -99,6 +122,8 @@ if (playbackState.item?.type === 'track') { ### ๐Ÿ•ฎ Chapters +These methods can be accessed through the `chapters` key of your `SpotifyClient` instance. + **Note:** Chapters are only available for the US, UK, Ireland, New Zealand and Australia markets. | Method | Description | @@ -108,6 +133,8 @@ if (playbackState.item?.type === 'track') { ### ๐ŸŽ™๏ธ Episodes +These methods can be accessed through the `episodes` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getEpisode`](https://developer.spotify.com/documentation/web-api/reference/get-an-episode) | Get Spotify catalog information for a single episode identified by its unique Spotify ID. | @@ -119,18 +146,24 @@ if (playbackState.item?.type === 'track') { ### ๐Ÿชฉ Genres +These methods can be accessed through the `genres` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getAvailableGenreSeeds`](https://developer.spotify.com/documentation/web-api/reference/get-recommendation-genres) | Retrieve a list of available genres seed parameter values for recommendations. | ### ๐ŸŒ Markets +These methods can be accessed through the `genres` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getMarkets`](https://developer.spotify.com/documentation/web-api/reference/get-available-markets) | Get the list of markets where Spotify is available. | ### โ–ถ๏ธ Player +These methods can be accessed through the `player` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getPlaybackState`](https://developer.spotify.com/documentation/web-api/reference/get-information-about-the-users-current-playback) | Get information about the userโ€™s current playback state, including track or episode, progress, and active device. | @@ -151,6 +184,8 @@ if (playbackState.item?.type === 'track') { ### ๐ŸŽง Playlists +These methods can be accessed through the `playlists` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getPlaylist`](https://developer.spotify.com/documentation/web-api/reference/get-playlist) | Get a playlist owned by a Spotify user. | @@ -169,6 +204,8 @@ if (playbackState.item?.type === 'track') { ### ๐Ÿ” Search +These methods can be accessed through the `search` key of your `SpotifyClient` instance. + **Note:** Audiobooks are only available for the US, UK, Ireland, New Zealand and Australia markets. | Method | Description | @@ -177,6 +214,8 @@ if (playbackState.item?.type === 'track') { ### ๐ŸŽ™๏ธ Shows +These methods can be accessed through the `shows` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getShow`](https://developer.spotify.com/documentation/web-api/reference/get-a-show) | Get Spotify catalog information for a single show identified by its unique Spotify ID. | @@ -189,6 +228,8 @@ if (playbackState.item?.type === 'track') { ### ๐ŸŽผ Tracks +These methods can be accessed through the `tracks` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getTrack`](https://developer.spotify.com/documentation/web-api/reference/get-track) | Get Spotify catalog information for a single track identified by its unique Spotify ID. | @@ -204,6 +245,8 @@ if (playbackState.item?.type === 'track') { ### ๐Ÿ‘ฅ Users +These methods can be accessed through the `users` key of your `SpotifyClient` instance. + | Method | Description | | -------| ----------- | | [`getCurrentUserProfile`](https://developer.spotify.com/documentation/web-api/reference/get-current-users-profile) | Get detailed profile information about the current user (including the current user's username). |