🔥 remove subscriber count from artist full
This commit is contained in:
parent
c912078967
commit
5c93e58da4
|
|
@ -9,7 +9,6 @@
|
|||
| name | `string` | Name |
|
||||
| thumbnails | [ThumbnailFull](./ThumbnailFull.html)`[]` | Thumbnails |
|
||||
| description | `string` | Description |
|
||||
| subscribers | `number` | Number of subscribers the Artist has |
|
||||
| topSongs | `Omit<`[SongDetailed](./SongDetailed.html)`, "duration">[]` | Top Songs from Artist |
|
||||
| topAlbums | [AlbumDetailed](./AlbumDetailed.html)`[]` | Top Albums from Artist |
|
||||
|
||||
|
|
@ -22,7 +21,6 @@ interface ArtistFull {
|
|||
name: string
|
||||
thumbnails: ThumbnailFull[]
|
||||
description: string
|
||||
subscribers: number
|
||||
topSongs: Omit<SongDetailed, "duration">[]
|
||||
topAlbums: AlbumDetailed[]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ytmusic-api",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0",
|
||||
"description": "YouTube Music API",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ export interface ArtistDetailed extends ArtistBasic {
|
|||
|
||||
export interface ArtistFull extends ArtistDetailed {
|
||||
description: string
|
||||
subscribers: number
|
||||
topSongs: Omit<SongDetailed, "duration">[]
|
||||
topAlbums: AlbumDetailed[]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ export const ARTIST_FULL: ObjectValidator<ArtistFull> = OBJECT({
|
|||
type: STRING("ARTIST"),
|
||||
thumbnails: LIST(THUMBNAIL_FULL),
|
||||
description: STRING(),
|
||||
subscribers: NUMBER(),
|
||||
topSongs: LIST(
|
||||
OBJECT({
|
||||
type: STRING("SONG"),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import checkType from "../utils/checkType"
|
|||
import traverseList from "../utils/traverseList"
|
||||
import traverseString from "../utils/traverseString"
|
||||
import AlbumParser from "./AlbumParser"
|
||||
import Parser from "./Parser"
|
||||
import SongParser from "./SongParser"
|
||||
|
||||
export default class ArtistParser {
|
||||
|
|
@ -22,9 +21,6 @@ export default class ArtistParser {
|
|||
...artistBasic,
|
||||
thumbnails: traverseList(data, "header", "thumbnails"),
|
||||
description,
|
||||
subscribers: Parser.parseNumber(
|
||||
traverseString(data, "subscriberCountText", "text")()
|
||||
),
|
||||
topSongs: traverseList(data, "musicShelfRenderer", "contents").map(item =>
|
||||
SongParser.parseArtistTopSong(item, artistBasic)
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue