Updated README
This commit is contained in:
parent
59c6458738
commit
f14a478d7d
37
README.md
37
README.md
|
|
@ -22,14 +22,6 @@ Because of this, I decided to build my own version of a youtube music api with T
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
With `yarn`
|
|
||||||
|
|
||||||
```
|
|
||||||
$ yarn add ytmusic-api
|
|
||||||
```
|
|
||||||
|
|
||||||
With `npm`
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm i ytmusic-api
|
$ npm i ytmusic-api
|
||||||
```
|
```
|
||||||
|
|
@ -294,7 +286,7 @@ ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(play
|
||||||
| Name | Data Type | Description |
|
| Name | Data Type | Description |
|
||||||
| :--------- | :---------------------------------- | :------------------ |
|
| :--------- | :---------------------------------- | :------------------ |
|
||||||
| type | `"SONG"` | Type of data |
|
| type | `"SONG"` | Type of data |
|
||||||
| videoId | `string \| null` | YouTube Video ID |
|
| videoId | `string` | YouTube Video ID |
|
||||||
| name | `string` | Name |
|
| name | `string` | Name |
|
||||||
| artists | [ArtistBasic](#ArtistBasic)`[]` | Artists |
|
| artists | [ArtistBasic](#ArtistBasic)`[]` | Artists |
|
||||||
| album | [AlbumBasic](#AlbumBasic) | Album |
|
| album | [AlbumBasic](#AlbumBasic) | Album |
|
||||||
|
|
@ -306,7 +298,7 @@ ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(play
|
||||||
| Name | Data Type | Description |
|
| Name | Data Type | Description |
|
||||||
| :-------------- | :---------------------------------- | :--------------------- |
|
| :-------------- | :---------------------------------- | :--------------------- |
|
||||||
| type | `"SONG"` | Type of data |
|
| type | `"SONG"` | Type of data |
|
||||||
| videoId | `string \| null` | YouTube Video ID |
|
| videoId | `string` | YouTube Video ID |
|
||||||
| name | `string` | Name |
|
| name | `string` | Name |
|
||||||
| artists | [ArtistBasic](#ArtistBasic)`[]` | Artists |
|
| artists | [ArtistBasic](#ArtistBasic)`[]` | Artists |
|
||||||
| duration | `number` | Duration in seconds |
|
| duration | `number` | Duration in seconds |
|
||||||
|
|
@ -320,7 +312,7 @@ ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(play
|
||||||
| Name | Data Type | Description |
|
| Name | Data Type | Description |
|
||||||
| :--------- | :---------------------------------- | :------------------------------ |
|
| :--------- | :---------------------------------- | :------------------------------ |
|
||||||
| type | `"VIDEO"` | Type of data |
|
| type | `"VIDEO"` | Type of data |
|
||||||
| videoId | `string \| null` | YouTube Video ID |
|
| videoId | `string` | YouTube Video ID |
|
||||||
| name | `string` | Name |
|
| name | `string` | Name |
|
||||||
| artists | [ArtistBasic](#ArtistBasic)`[]` | Channels that created the video |
|
| artists | [ArtistBasic](#ArtistBasic)`[]` | Channels that created the video |
|
||||||
| views | `number` | View count |
|
| views | `number` | View count |
|
||||||
|
|
@ -332,7 +324,7 @@ ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(play
|
||||||
| Name | Data Type | Description |
|
| Name | Data Type | Description |
|
||||||
| :---------- | :---------------------------------- | :------------------------------------- |
|
| :---------- | :---------------------------------- | :------------------------------------- |
|
||||||
| type | `"VIDEO"` | Type of data |
|
| type | `"VIDEO"` | Type of data |
|
||||||
| videoId | `string \| null` | YouTube Video ID |
|
| videoId | `string` | YouTube Video ID |
|
||||||
| name | `string` | Name |
|
| name | `string` | Name |
|
||||||
| artists | [ArtistBasic](#ArtistBasic)`[]` | Channels that created the video |
|
| artists | [ArtistBasic](#ArtistBasic)`[]` | Channels that created the video |
|
||||||
| views | `number` | View count |
|
| views | `number` | View count |
|
||||||
|
|
@ -348,7 +340,7 @@ ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(play
|
||||||
|
|
||||||
| Name | Data Type | Description |
|
| Name | Data Type | Description |
|
||||||
| :------- | :--------------- | :---------- |
|
| :------- | :--------------- | :---------- |
|
||||||
| artistId | `string \| null` | Artist ID |
|
| artistId | `string` | Artist ID |
|
||||||
| name | `string` | Name |
|
| name | `string` | Name |
|
||||||
|
|
||||||
#### `ArtistDetailed`
|
#### `ArtistDetailed`
|
||||||
|
|
@ -368,7 +360,7 @@ ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(play
|
||||||
| artistId | `string` | Artist ID |
|
| artistId | `string` | Artist ID |
|
||||||
| name | `string` | Name |
|
| name | `string` | Name |
|
||||||
| thumbnails | [ThumbnailFull](#ThumbnailFull)`[]` | Thumbnails |
|
| thumbnails | [ThumbnailFull](#ThumbnailFull)`[]` | Thumbnails |
|
||||||
| description | `string \| null` | Description |
|
| description | `string` | Description |
|
||||||
| subscribers | `number` | Number of subscribers the Artist has |
|
| subscribers | `number` | Number of subscribers the Artist has |
|
||||||
| topSongs | `Omit<`[SongDetailed](#SongDetailed)`, "duration">[]` | Top Songs from Artist |
|
| topSongs | `Omit<`[SongDetailed](#SongDetailed)`, "duration">[]` | Top Songs from Artist |
|
||||||
| topAlbums | [AlbumDetailed](#AlbumDetailed)`[]` | Top Albums from Artist |
|
| topAlbums | [AlbumDetailed](#AlbumDetailed)`[]` | Top Albums from Artist |
|
||||||
|
|
@ -403,7 +395,7 @@ ytmusic.getPlaylistVideos("OLAK5uy_nRb467jR73IXKybwzw22_rTYIJ808x4Yc").then(play
|
||||||
| artists | [ArtistBasic](#ArtistBasic)`[]` | Creators of the Album |
|
| artists | [ArtistBasic](#ArtistBasic)`[]` | Creators of the Album |
|
||||||
| year | `number` | Publication Year |
|
| year | `number` | Publication Year |
|
||||||
| thumbnails | [ThumbnailFull](#ThumbnailFull)`[]` | Thumbnails |
|
| thumbnails | [ThumbnailFull](#ThumbnailFull)`[]` | Thumbnails |
|
||||||
| description | `string \| null` | Description |
|
| description | `string` | Description |
|
||||||
| songs | [SongDetailed](#SongDetailed)`[]` | Songs in the Album |
|
| songs | [SongDetailed](#SongDetailed)`[]` | Songs in the Album |
|
||||||
|
|
||||||
#### `PlaylistFull`
|
#### `PlaylistFull`
|
||||||
|
|
@ -426,7 +418,7 @@ A lot of the credit should go to [youtube-music-api](https://npmjs.com/package/y
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
YTMusic API's data return types are tested with Jest. To run the tests, run the command
|
YTMusic API's data return types are tested with Mocha. To run the tests, run the command
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run test
|
$ npm run test
|
||||||
|
|
@ -435,18 +427,17 @@ $ npm run test
|
||||||
## Built with
|
## Built with
|
||||||
|
|
||||||
- TypeScript
|
- TypeScript
|
||||||
- [](https://npmjs.com/package/@types/jest)
|
- [](https://npmjs.com/package/@types/mocha)
|
||||||
|
- [](https://npmjs.com/package/@types/node)
|
||||||
- [](https://npmjs.com/package/@types/tough-cookie)
|
- [](https://npmjs.com/package/@types/tough-cookie)
|
||||||
- [](https://npmjs.com/package/typescript)
|
- [](https://npmjs.com/package/typescript)
|
||||||
- Axios
|
- Axios
|
||||||
- [](https://npmjs.com/package/axios)
|
- [](https://npmjs.com/package/axios)
|
||||||
- Tough Cookie
|
- Tough Cookie
|
||||||
- [](https://npmjs.com/package/tough-cookie)
|
- [](https://npmjs.com/package/tough-cookie)
|
||||||
- Jest
|
- Mocha
|
||||||
- [](https://npmjs.com/package/@babel/core)
|
- [](https://npmjs.com/package/mocha)
|
||||||
- [](https://npmjs.com/package/@babel/preset-env)
|
- [](https://npmjs.com/package/mocha.parallel)
|
||||||
- [](https://npmjs.com/package/@babel/preset-typescript)
|
- [](https://npmjs.com/package/ts-mocha)
|
||||||
- [](https://npmjs.com/package/babel-jest)
|
|
||||||
- [](https://npmjs.com/package/jest)
|
|
||||||
- Miscellaneous
|
- Miscellaneous
|
||||||
- [](https://npmjs.com/package/validate-any)
|
- [](https://npmjs.com/package/validate-any)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue