From 5c93e58da47d7bb5f1097e7d9ca83d8dadc94b0c Mon Sep 17 00:00:00 2001 From: Zechariah Date: Wed, 22 Jun 2022 04:24:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20remove=20subscriber=20count=20fr?= =?UTF-8?q?om=20artist=20full?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/references/interfaces/ArtistFull.md | 2 -- package.json | 2 +- src/index.ts | 1 - src/interfaces.ts | 1 - src/parsers/ArtistParser.ts | 4 ---- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/references/interfaces/ArtistFull.md b/docs/references/interfaces/ArtistFull.md index f6d632a..fd849ee 100644 --- a/docs/references/interfaces/ArtistFull.md +++ b/docs/references/interfaces/ArtistFull.md @@ -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[] topAlbums: AlbumDetailed[] } diff --git a/package.json b/package.json index 6e83985..116a23a 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/index.ts b/src/index.ts index be972f2..40b367a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -52,7 +52,6 @@ export interface ArtistDetailed extends ArtistBasic { export interface ArtistFull extends ArtistDetailed { description: string - subscribers: number topSongs: Omit[] topAlbums: AlbumDetailed[] } diff --git a/src/interfaces.ts b/src/interfaces.ts index 3896941..a4e666e 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -89,7 +89,6 @@ export const ARTIST_FULL: ObjectValidator = OBJECT({ type: STRING("ARTIST"), thumbnails: LIST(THUMBNAIL_FULL), description: STRING(), - subscribers: NUMBER(), topSongs: LIST( OBJECT({ type: STRING("SONG"), diff --git a/src/parsers/ArtistParser.ts b/src/parsers/ArtistParser.ts index 4f0ec74..c4b22e6 100644 --- a/src/parsers/ArtistParser.ts +++ b/src/parsers/ArtistParser.ts @@ -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) ),