Wrote docs for all advanced data getters
This commit is contained in:
parent
c2d556a814
commit
e9218b266d
48
README.md
48
README.md
|
|
@ -21,54 +21,6 @@ Because of this, I decided to build my own version of a youtube music api with T
|
||||||
- Albums
|
- Albums
|
||||||
- Playlists
|
- Playlists
|
||||||
|
|
||||||
#### `getArtistSongs`
|
|
||||||
|
|
||||||
This function takes in the following parameters
|
|
||||||
|
|
||||||
| Name | Data Type | Description |
|
|
||||||
| :------- | :-------- | :---------- |
|
|
||||||
| artistId | `string` | Artist ID |
|
|
||||||
|
|
||||||
The function returns a `Promise<`[SongDetailed](#SongDetailed)`[]>` which is the information about all the artist's songs
|
|
||||||
|
|
||||||
```ts
|
|
||||||
ytmusic.getArtistSongs("UCTUR0sVEkD8T5MlSHqgaI_Q").then(artistSongs => {
|
|
||||||
console.log(artistSongs)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `getArtistAlbums`
|
|
||||||
|
|
||||||
This function takes in the following parameters
|
|
||||||
|
|
||||||
| Name | Data Type | Description |
|
|
||||||
| :------- | :-------- | :---------- |
|
|
||||||
| artistId | `string` | Artist ID |
|
|
||||||
|
|
||||||
The function returns a `Promise<`[AlbumDetailed](#AlbumDetailed)`[]>` which is the information about all the artist's albums
|
|
||||||
|
|
||||||
```ts
|
|
||||||
ytmusic.getArtistAlbums("UCTUR0sVEkD8T5MlSHqgaI_Q").then(artistAlbums => {
|
|
||||||
console.log(artistAlbums)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `getPlaylistVideos`
|
|
||||||
|
|
||||||
This function takes in the following parameters
|
|
||||||
|
|
||||||
| Name | Data Type | Description |
|
|
||||||
| :--------- | :-------- | :---------- |
|
|
||||||
| playlistId | `string` | Playlist ID |
|
|
||||||
|
|
||||||
The function returns a `Promise<Omit<`[VideoDetailed](#VideoDetailed)`, "views">[]>` which is the information about the videos without the view count
|
|
||||||
|
|
||||||
```ts
|
|
||||||
ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(playlistVideos => {
|
|
||||||
console.log(playlistVideos)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
A lot of the credit should go to [youtube-music-api](https://npmjs.com/package/youtube-music-api). I build this package as a refactored and tested version of youtube-music-api with TypeScript annotations
|
A lot of the credit should go to [youtube-music-api](https://npmjs.com/package/youtube-music-api). I build this package as a refactored and tested version of youtube-music-api with TypeScript annotations
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Getting an artist's albums
|
||||||
|
|
||||||
|
`getArtistAlbums()` will fetch you information about a specific artist's albums by it's ID.
|
||||||
|
|
||||||
|
```ts
|
||||||
|
ytmusic.getArtistAlbums("UCTUR0sVEkD8T5MlSHqgaI_Q").then(artistAlbums => {
|
||||||
|
console.log(artistAlbums)
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [reference](../../references/ytmusic-methods/getArtistAlbums.html) for more information.
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Getting an artist's songs
|
||||||
|
|
||||||
|
`getArtistSongs()` will fetch you information about a specific artist's songs by it's ID.
|
||||||
|
|
||||||
|
```ts
|
||||||
|
ytmusic.getArtistSongs("UCTUR0sVEkD8T5MlSHqgaI_Q").then(artistSongs => {
|
||||||
|
console.log(artistSongs)
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [reference](../../references/ytmusic-methods/getArtistSongs.html) for more information.
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Getting an playlist's videos
|
||||||
|
|
||||||
|
`getPlaylistVideos()` will fetch you information about a specific playlist's videos by it's ID.
|
||||||
|
|
||||||
|
```ts
|
||||||
|
ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(playlistVideos => {
|
||||||
|
console.log(playlistVideos)
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [reference](../../references/ytmusic-methods/getPlaylistVideos.html) for more information.
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# getArtistAlbums
|
||||||
|
|
||||||
|
See the [guide](../../guides/usage/getArtistAlbums.html) for information on how to use this.
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Data Type | Description |
|
||||||
|
| :--------- | :-------- | :---------- |
|
||||||
|
| `artistId` | `string` | Artist ID |
|
||||||
|
|
||||||
|
## Returns
|
||||||
|
|
||||||
|
`Promise<`[AlbumDetailed](../interfaces/AlbumDetailed.html)`[]>`
|
||||||
|
|
||||||
|
## TypeScript Source Code
|
||||||
|
|
||||||
|
```ts
|
||||||
|
public async getArtistAlbums(artistId: string): Promise<AlbumDetailed[]>
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# getArtistSongs
|
||||||
|
|
||||||
|
See the [guide](../../guides/usage/getArtistSongs.html) for information on how to use this.
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Data Type | Description |
|
||||||
|
| :--------- | :-------- | :---------- |
|
||||||
|
| `artistId` | `string` | Artist ID |
|
||||||
|
|
||||||
|
## Returns
|
||||||
|
|
||||||
|
`Promise<`[SongDetailed](../interfaces/SongDetailed.html)`[]>`
|
||||||
|
|
||||||
|
## TypeScript Source Code
|
||||||
|
|
||||||
|
```ts
|
||||||
|
public async getArtistSongs(artistId: string): Promise<SongDetailed[]>
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# getPlaylistVideos
|
||||||
|
|
||||||
|
See the [guide](../../guides/usage/getPlaylistVideos.html) for information on how to use this.
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Data Type | Description |
|
||||||
|
| :----------- | :-------- | :---------- |
|
||||||
|
| `playlistId` | `string` | Playlist ID |
|
||||||
|
|
||||||
|
## Returns
|
||||||
|
|
||||||
|
`Promise<Omit<`[VideoDetailed](../interfaces/VideoDetailed.html)`, "views">[]>`
|
||||||
|
|
||||||
|
## TypeScript Source Code
|
||||||
|
|
||||||
|
```ts
|
||||||
|
public async getPlaylistVideos(playlistId: string): Promise<Omit<VideoDetailed, "views">[]>
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue