From 5e71f58223df6afa461a983e071262b2f72116df Mon Sep 17 00:00:00 2001 From: phamhiep2506 Date: Thu, 23 Jun 2022 11:17:00 +0700 Subject: [PATCH] update getHome --- README.md | 5 ++--- dist/index.d.ts | 2 +- dist/index.d.ts.map | 2 +- dist/index.js | 13 +++++++------ dist/index.js.map | 2 +- package.json | 2 +- src/index.ts | 13 +++++++------ 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 07e3635..826a2a4 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,9 @@ ZingMp3.getDetailPlaylist("ZWZB969E").then((data) => { ``` ### Get Home -> param {page} : 1, 2, 3, 4... ```javascript -ZingMp3.getHome("1").then((data) => { +ZingMp3.getHome().then((data) => { console.log(data) }) ``` @@ -129,4 +128,4 @@ ZingMp3.getCategoryMV("IWZ9Z08I").then((data) => { ZingMp3.getVideo("ZWEW9WI8").then((data) => { console.log(data) }) -``` \ No newline at end of file +``` diff --git a/dist/index.d.ts b/dist/index.d.ts index 5770eb9..80b24d4 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -16,7 +16,7 @@ declare class ZingMp3Api { private requestZingMp3; getSong(songId: string): Promise; getDetailPlaylist(playlistId: string): Promise; - getHome(page: string): Promise; + getHome(): Promise; getTop100(): Promise; getChartHome(): Promise; getNewReleaseChart(): Promise; diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index 564b6da..151d865 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAM,UAAU;IAEP,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;gBAER,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM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O,CAAC,GAAG,CAAC;IAoBhE,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAiBvC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAe/C;AAGD,eAAO,MAAM,OAAO,YAMnB,CAAA"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 43758fa..0fc11e5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -30,8 +30,8 @@ class ZingMp3Api { hashParam(path, id) { return this.getHmac512(path + this.getHash256(`ctime=${this.CTIME}id=${id}version=${this.VERSION}`), this.SECRET_KEY); } - hashParamHome(path, page) { - return this.getHmac512(path + this.getHash256(`ctime=${this.CTIME}page=${page}version=${this.VERSION}`), this.SECRET_KEY); + hashParamHome(path) { + return this.getHmac512(path + this.getHash256(`count=30ctime=${this.CTIME}page=1version=${this.VERSION}`), this.SECRET_KEY); } hashCategoryMV(path, id, type) { return this.getHmac512(path + this.getHash256(`ctime=${this.CTIME}id=${id}type=${type}version=${this.VERSION}`), this.SECRET_KEY); @@ -115,12 +115,13 @@ class ZingMp3Api { }); } // getHome - getHome(page) { + getHome() { return new Promise((resolve, rejects) => { this.requestZingMp3("/api/v2/page/get/home", { - page: page, + page: 1, segmentId: "-1", - sig: this.hashParamHome("/api/v2/page/get/home", page) + count: "30", + sig: this.hashParamHome("/api/v2/page/get/home") }) .then((res) => { resolve(res); @@ -284,7 +285,7 @@ class ZingMp3Api { } } // END // instance default -exports.ZingMp3 = new ZingMp3Api("1.5.4", // VERSION +exports.ZingMp3 = new ZingMp3Api("1.6.34", // VERSION "https://zingmp3.vn", // URL "2aa2d1c561e809b267f3638c4a307aab", // SECRET_KEY "88265e23d4284f25963e6eedac8fbfa3", // API_KEY diff --git a/dist/index.js.map b/dist/index.js.map index 7dc2a45..8dc148c 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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CAAC,GAAG,CAAC,CAAA;YACd,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,CAAA;YACd,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,WAAW;IACJ,QAAQ,CAAC,OAAe;QAC7B,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YAC3C,IAAI,CAAC,cAAc,CAAC,wBAAwB,EAAE;gBAC5C,EAAE,EAAE,OAAO;gBACX,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,wBAAwB,EAAE,OAAO,CAAC;aACvD,CAAC;iBACC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBACZ,OAAO,CAAC,GAAG,CAAC,CAAA;YACd,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,CAAA;YACd,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACJ,CAAC;CAEF,CAAC,MAAM;AAER,mBAAmB;AACN,QAAA,OAAO,GAAG,IAAI,UAAU,CACnC,QAAQ,EAAE,UAAU;AACpB,oBAAoB,EAAE,MAAM;AAC5B,kCAAkC,EAAE,aAAa;AACjD,kCAAkC,EAAE,UAAU;AAC9C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ;CAC/C,CAAA"} \ No newline at end of file diff --git a/package.json b/package.json index 0f5238e..a622e14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zingmp3-api-full", - "version": "1.0.12", + "version": "1.0.13", "description": "zingmp3-api-full", "main": "dist/index.js", "types": "dist", diff --git a/src/index.ts b/src/index.ts index 9e938de..7911625 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,9 +43,9 @@ class ZingMp3Api { ) } - private hashParamHome(path: string, page: string) { + private hashParamHome(path: string) { return this.getHmac512( - path + this.getHash256(`ctime=${this.CTIME}page=${page}version=${this.VERSION}`), + path + this.getHash256(`count=30ctime=${this.CTIME}page=1version=${this.VERSION}`), this.SECRET_KEY ) } @@ -155,12 +155,13 @@ class ZingMp3Api { } // getHome - public getHome(page: string): Promise { + public getHome(): Promise { return new Promise((resolve, rejects) => { this.requestZingMp3("/api/v2/page/get/home", { - page: page, + page: 1, segmentId: "-1", - sig: this.hashParamHome("/api/v2/page/get/home", page) + count: "30", + sig: this.hashParamHome("/api/v2/page/get/home") }) .then((res) => { resolve(res) @@ -337,7 +338,7 @@ class ZingMp3Api { // instance default export const ZingMp3 = new ZingMp3Api( - "1.5.4", // VERSION + "1.6.34", // VERSION "https://zingmp3.vn", // URL "2aa2d1c561e809b267f3638c4a307aab", // SECRET_KEY "88265e23d4284f25963e6eedac8fbfa3", // API_KEY