migu-api-enhanced 2.14.0 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ var __export = (target, all) => {
8
8
  var modules_exports = {};
9
9
  __export(modules_exports, {
10
10
  YDRZ: () => YDRZ,
11
+ addFollower: () => addFollower,
11
12
  addSongToMyList: () => addSongToMyList,
12
13
  addUserCollect: () => addUserCollect,
13
14
  addUserMyList: () => addUserMyList,
@@ -24,6 +25,9 @@ __export(modules_exports, {
24
25
  getConcertInfo: () => getConcertInfo,
25
26
  getConcertRecommendMv: () => getConcertRecommendMv,
26
27
  getConcertUrl: () => getConcertUrl,
28
+ getFollowerList: () => getFollowerList,
29
+ getFollowingList: () => getFollowingList,
30
+ getFollowingVra: () => getFollowingVra,
27
31
  getLyric: () => getLyric,
28
32
  getMVRecommend: () => getMVRecommend,
29
33
  getMvBySong: () => getMvBySong,
@@ -36,6 +40,8 @@ __export(modules_exports, {
36
40
  getNinanSong: () => getNinanSong,
37
41
  getOpNum: () => getOpNum,
38
42
  getPacmToken: () => getPacmToken,
43
+ getPageInfo: () => getPageInfo,
44
+ getPageTab: () => getPageTab,
39
45
  getPlaylistInfo: () => getPlaylistInfo,
40
46
  getPlaylistSong: () => getPlaylistSong,
41
47
  getPlaylistSquarePage: () => getPlaylistSquarePage,
@@ -48,6 +54,7 @@ __export(modules_exports, {
48
54
  getRedirectUrl: () => getRedirectUrl,
49
55
  getResourceInfo: () => getResourceInfo,
50
56
  getSVideoInfo: () => getSVideoInfo,
57
+ getSVideoRecommend: () => getSVideoRecommend,
51
58
  getSVideoSearchSuggest: () => getSVideoSearchSuggest,
52
59
  getSVideoUrl: () => getSVideoUrl,
53
60
  getSVideoUserContent: () => getSVideoUserContent,
@@ -69,8 +76,10 @@ __export(modules_exports, {
69
76
  getUrlV2: () => getUrlV2,
70
77
  getUserBadge: () => getUserBadge,
71
78
  getUserCollectList: () => getUserCollectList,
79
+ getUserHeader: () => getUserHeader,
72
80
  getUserHomePage: () => getUserHomePage,
73
81
  getUserMyList: () => getUserMyList,
82
+ getUserSongPage: () => getUserSongPage,
74
83
  getVersion: () => getVersion,
75
84
  getVipPlaylist: () => getVipPlaylist,
76
85
  getVrbtOpNum: () => getVrbtOpNum,
@@ -81,8 +90,10 @@ __export(modules_exports, {
81
90
  loginOneClick: () => loginOneClick,
82
91
  loginPhone: () => loginPhone,
83
92
  loginSim: () => loginSim,
93
+ logout: () => logout,
84
94
  matchPlaylist: () => matchPlaylist,
85
95
  queryUserInfo: () => queryUserInfo,
96
+ removeFollower: () => removeFollower,
86
97
  removeSongFromMyList: () => removeSongFromMyList,
87
98
  removeUserCollect: () => removeUserCollect,
88
99
  removeUserMyList: () => removeUserMyList,
@@ -96,6 +107,8 @@ __export(modules_exports, {
96
107
  searchSong: () => searchSong,
97
108
  searchSuggest: () => searchSuggest,
98
109
  searchTicket: () => searchTicket,
110
+ shareCommon: () => shareCommon,
111
+ shareVideo: () => shareVideo,
99
112
  signNinan: () => signNinan
100
113
  });
101
114
 
@@ -301,16 +314,16 @@ var getRecommendPlaylist = async () => {
301
314
 
302
315
  // src/utils/deviceID.ts
303
316
  function getDeviceId(a, b) {
304
- var c, d = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), e = [];
317
+ var c, d = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), e2 = [];
305
318
  if (b = b || d.length, a)
306
319
  for (c = 0; a > c; c++)
307
- e[c] = d[0 | Math.random() * b];
320
+ e2[c] = d[0 | Math.random() * b];
308
321
  else {
309
322
  var f;
310
- for (e[8] = e[13] = e[18] = e[23] = "-", e[14] = "4", c = 0; 36 > c; c++)
311
- e[c] || (f = 0 | 16 * Math.random(), e[c] = d[19 == c ? 3 & f | 8 : f]);
323
+ for (e2[8] = e2[13] = e2[18] = e2[23] = "-", e2[14] = "4", c = 0; 36 > c; c++)
324
+ e2[c] || (f = 0 | 16 * Math.random(), e2[c] = d[19 == c ? 3 & f | 8 : f]);
312
325
  }
313
- return e.join("");
326
+ return e2.join("");
314
327
  }
315
328
 
316
329
  // src/modules/recommend_song.ts
@@ -430,20 +443,20 @@ var SECURE = "Jk8qzuePiJ1qE3mDYhLQ3T73DtDoAhLP";
430
443
  var aw = 171;
431
444
  var iw = 205;
432
445
  var ow = 1;
433
- function textEncode(e) {
434
- return new TextEncoder().encode(e);
446
+ function textEncode(e2) {
447
+ return new TextEncoder().encode(e2);
435
448
  }
436
- function textDecode(e) {
437
- return new TextDecoder("utf-8").decode(e);
449
+ function textDecode(e2) {
450
+ return new TextDecoder("utf-8").decode(e2);
438
451
  }
439
- function decryptBlob(e, r) {
452
+ function decryptBlob(e2, r) {
440
453
  if (r.length == 0)
441
454
  return null;
442
- var n = e.length;
443
- if (n < 4 || !(e[0] == aw && e[1] == iw) || e[2] != ow)
455
+ var n = e2.length;
456
+ if (n < 4 || !(e2[0] == aw && e2[1] == iw) || e2[2] != ow)
444
457
  return null;
445
- for (var t = e[3], a = textEncode(r), i = a.length, o = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
446
- o[s] = e[c] + t - a[s % i];
458
+ for (var t = e2[3], a = textEncode(r), i = a.length, o = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
459
+ o[s] = e2[c] + t - a[s % i];
447
460
  return o;
448
461
  }
449
462
  function decryptData(buf) {
@@ -451,7 +464,7 @@ function decryptData(buf) {
451
464
  try {
452
465
  const data = p ? JSON.parse(p) : null;
453
466
  return data;
454
- } catch (e) {
467
+ } catch (e2) {
455
468
  return null;
456
469
  }
457
470
  ;
@@ -477,8 +490,8 @@ var getUrlH5V24 = async (contentId, copyrightId, toneFlag = "PQ") => {
477
490
  return await decryptData2(res.data);
478
491
  };
479
492
  var SECURE2 = ["Jk8qzuePiJ1qE3mDYhLQ3T73DtDoAhLP"];
480
- function strToUtf8Bytes(e) {
481
- return new TextEncoder().encode(e);
493
+ function strToUtf8Bytes(e2) {
494
+ return new TextEncoder().encode(e2);
482
495
  }
483
496
  function utf8Bytes2str(bytes) {
484
497
  const result = [];
@@ -492,18 +505,18 @@ function utf8Bytes2str(bytes) {
492
505
  }
493
506
  return decodeURIComponent(result.join(""));
494
507
  }
495
- function decode(e, t) {
508
+ function decode(e2, t) {
496
509
  if (0 == t.length)
497
510
  return null;
498
- var n = e.length;
511
+ var n = e2.length;
499
512
  if (n < 4)
500
513
  return null;
501
- if (171 != e[0] || 205 != e[1])
514
+ if (171 != e2[0] || 205 != e2[1])
502
515
  return null;
503
- if (1 != e[2])
516
+ if (1 != e2[2])
504
517
  return null;
505
- for (var r = e[3], o = strToUtf8Bytes(t), a = o.length, i = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
506
- i[s] = e[c] + r - o[s % a];
518
+ for (var r = e2[3], o = strToUtf8Bytes(t), a = o.length, i = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
519
+ i[s] = e2[c] + r - o[s % a];
507
520
  return i;
508
521
  }
509
522
  var decryptData2 = (ab) => {
@@ -702,8 +715,8 @@ var getPacmToken = async (token = "", type = "2", sourceId = "220029", activityI
702
715
  };
703
716
 
704
717
  // src/modules/ticket.ts
705
- var getTicketInfo = async (page = 1, pageCount = 20) => {
706
- return await h5fetch(`https://app.c.nf.migu.cn/MIGUM3.0/v1.0/ticket/home/ticket?pageNum=${page}&pageCount=${pageCount}`);
718
+ var getTicketInfo = async (page = 1, size = 20) => {
719
+ return await h5fetch(`https://app.c.nf.migu.cn/MIGUM3.0/v1.0/ticket/home/ticket?pageNum=${page}&pageCount=${size}`);
707
720
  };
708
721
 
709
722
  // src/modules/user_badge.ts
@@ -993,9 +1006,9 @@ function md5(s) {
993
1006
  return crypto2.createHash("md5").update(s, "utf-8").digest("hex");
994
1007
  }
995
1008
  var genInternetSign = async () => {
996
- const time = yTime(), e = time, c = "220029", msgId = getDeviceId(), d = msgId;
1009
+ const time = yTime(), e2 = time, c = "220029", msgId = getDeviceId(), d = msgId;
997
1010
  const preSign = YDRZ.getSign("300012033963", "1.2"), b = preSign;
998
- let key = "interfacename=genInternetSign&sourceid=" + c + "&systemtime=" + e + "&msgid=" + d + "&preSign=" + b;
1011
+ let key = "interfacename=genInternetSign&sourceid=" + c + "&systemtime=" + e2 + "&msgid=" + d + "&preSign=" + b;
999
1012
  key = encodeURIComponent(key);
1000
1013
  const signature = md5(key);
1001
1014
  const url = `https://passport.migu.cn/api/genInternetSign?preSign=${preSign}&msgid=${msgId}&systemtime=${time}&sourceid=220029&signature=${signature}`;
@@ -1259,19 +1272,57 @@ var getLyric = async (contentId) => {
1259
1272
  };
1260
1273
 
1261
1274
  // src/modules/user_collect_add.ts
1262
- var addUserCollect = async (pacmtoken, playlistId, title) => {
1263
- title = encodeURIComponent(title);
1264
- const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/v1.0/user/add_collection.do?outOPType=03&outResourceName=${title}&outResourceType=2021&outResourceId=${playlistId}`, {
1265
- cookie: { pacmtoken }
1266
- });
1275
+ var addUserCollect = async (pacmtoken, params) => {
1276
+ let jsonParams = {};
1277
+ if (params.type === "playlist") {
1278
+ jsonParams = {
1279
+ outOPType: "03",
1280
+ outResourceType: "2021",
1281
+ outResourceId: params.playlistId,
1282
+ outResourceName: encodeURIComponent(params.title)
1283
+ };
1284
+ } else if (params.type === "comment") {
1285
+ jsonParams = {
1286
+ outOPType: "08",
1287
+ outResourceType: "3002",
1288
+ outOwner: params.userId,
1289
+ outResourceId: params.commentId,
1290
+ outResourceName: "%E8%AF%84%E8%AE%BA"
1291
+ //=评论
1292
+ };
1293
+ } else {
1294
+ return { success: false, err: "\u672A\u77E5type\u7C7B\u578B -playlist\u6216comment" };
1295
+ }
1296
+ const { data, cookies } = await ckfetch(
1297
+ `https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/add_collection.do`,
1298
+ { params: jsonParams, cookie: { pacmtoken } }
1299
+ );
1267
1300
  return { data, newPacmToken: cookies.pacmtoken || "" };
1268
1301
  };
1269
1302
 
1270
1303
  // src/modules/user_collect_remove.ts
1271
- var removeUserCollect = async (pacmtoken, playlistId) => {
1272
- const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/v1.0/user/del_collection.do?oPType=03&resourceType=2021&resourceId=${playlistId}`, {
1273
- cookie: { pacmtoken }
1274
- });
1304
+ var removeUserCollect = async (pacmtoken, params) => {
1305
+ let jsonParams = {};
1306
+ if (params.type === "playlist") {
1307
+ jsonParams = {
1308
+ OPType: "03",
1309
+ resourceType: "2021",
1310
+ resourceId: params.playlistId
1311
+ };
1312
+ } else if (params.type === "comment") {
1313
+ jsonParams = {
1314
+ OPType: "08",
1315
+ resourceType: "3002",
1316
+ outOwner: params.userId,
1317
+ resourceId: params.commentId
1318
+ };
1319
+ } else {
1320
+ return { success: false, err: "\u672A\u77E5type\u7C7B\u578B -playlist\u6216comment" };
1321
+ }
1322
+ const { data, cookies } = await ckfetch(
1323
+ `https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/del_collection.do`,
1324
+ { params: jsonParams, cookie: { pacmtoken } }
1325
+ );
1275
1326
  return { data, newPacmToken: cookies.pacmtoken || "" };
1276
1327
  };
1277
1328
 
@@ -1494,20 +1545,74 @@ var signNinan = async (pacmtoken) => {
1494
1545
 
1495
1546
  // src/modules/url_redirect.ts
1496
1547
  import axios9 from "axios";
1548
+
1549
+ // src/utils/quality.ts
1550
+ var qualityList = [
1551
+ "PQ",
1552
+ "HQ",
1553
+ "SQ",
1554
+ "ZQ24",
1555
+ "ZQ32",
1556
+ "Z3D"
1557
+ ];
1558
+ var e = encodeURI;
1559
+ var toneUrl = {
1560
+ "PQ": e("\u6807\u6E05\u9AD8\u6E05/MP3_128_16_Stero"),
1561
+ "HQ": e("\u6807\u6E05\u9AD8\u6E05/MP3_320_16_Stero"),
1562
+ "SQ": e("\u6B4C\u66F2\u4E0B\u8F7D/flac"),
1563
+ "ZQ24": e("\u6B4C\u66F2\u4E0B\u8F7D/flac_24bit"),
1564
+ "ZQ32": e("\u6B4C\u66F2\u4E0B\u8F7D/wav_32bit"),
1565
+ "Z3D": e("\u6B4C\u66F2\u4E0B\u8F7D/wav_3d")
1566
+ };
1567
+ var toneUrlList = Object.entries(toneUrl);
1568
+ var toneFormat = {
1569
+ "PQ": ".mp3",
1570
+ "HQ": ".mp3",
1571
+ "SQ": ".flac",
1572
+ "ZQ24": ".flac",
1573
+ "ZQ32": ".wav",
1574
+ "Z3D": ".wav"
1575
+ };
1576
+ function isQuality(quality) {
1577
+ return qualityList.includes(quality);
1578
+ }
1579
+ function getQuality(url) {
1580
+ let tone = "";
1581
+ if (!tone) {
1582
+ for (let i = 0; i < toneUrlList.length; i++) {
1583
+ const [key, value] = toneUrlList[i];
1584
+ if (url.includes(value)) {
1585
+ tone = key;
1586
+ break;
1587
+ }
1588
+ }
1589
+ }
1590
+ return tone;
1591
+ }
1592
+ function changeQuality(url, quality, originalQuality) {
1593
+ const originalTone = isQuality(originalQuality) ? originalQuality : getQuality(url);
1594
+ if (!isQuality(quality) || !isQuality(originalTone)) {
1595
+ return url;
1596
+ } else {
1597
+ return url.replace(toneUrl[originalTone], toneUrl[quality]).replace(toneFormat[originalTone], toneFormat[quality]);
1598
+ }
1599
+ }
1600
+
1601
+ // src/modules/url_redirect.ts
1497
1602
  var getRedirectUrl = async (contentId, toneFlag = "PQ") => {
1498
1603
  return await axios9.head(
1499
1604
  `http://app.pd.nf.migu.cn/MIGUM2.0/v1.0/content/sub/listenSong.do`,
1500
1605
  {
1501
1606
  maxRedirects: 0,
1502
1607
  params: {
1503
- "toneFlag": toneFlag,
1608
+ "toneFlag": "PQ",
1504
1609
  "copyrightId": "0",
1505
1610
  "contentId": contentId,
1506
1611
  "resourceType": "2",
1507
1612
  "channel": "0"
1508
1613
  }
1509
1614
  }
1510
- ).catch((err) => err.response).then((res) => res?.headers?.location?.split("?")[0] ?? "");
1615
+ ).catch((err) => err.response).then((res) => res?.headers?.location?.split("?")[0] ?? "").then((url) => changeQuality(url, toneFlag, "PQ"));
1511
1616
  };
1512
1617
 
1513
1618
  // src/modules/concert_mv.ts
@@ -1559,15 +1664,217 @@ var getVipPlaylist = async (size = 10) => {
1559
1664
  return await h5fetch(`http://app.c.nf.migu.cn/bmw/vip-exclusive/auditions-list/v1.0?pageSize=${size}`);
1560
1665
  };
1561
1666
 
1667
+ // src/modules/user_header.ts
1668
+ var getUserHeader = async (userId) => {
1669
+ return await h5fetch(
1670
+ `https://app.c.nf.migu.cn/user/api/my-page-header/v1.0`,
1671
+ { params: { userId } }
1672
+ );
1673
+ };
1674
+
1675
+ // src/modules/user_songPage.ts
1676
+ var getUserSongPage = async (userId, videoUserId) => {
1677
+ if (!userId && !videoUserId) {
1678
+ return { data: { error: "userId or videoUserId is required" } };
1679
+ }
1680
+ return await h5fetch(
1681
+ `https://app.c.nf.migu.cn/user/api/my-page-music/v1.0`,
1682
+ {
1683
+ params: { userId, videoUserId },
1684
+ headers: { "channel": "0146931" }
1685
+ }
1686
+ );
1687
+ };
1688
+
1689
+ // src/modules/page_view.ts
1690
+ var getPageInfo = async (pageId, sceneId) => {
1691
+ if (!pageId && !sceneId) {
1692
+ return { success: false, data: { error: "pageId or sceneId is required" } };
1693
+ }
1694
+ if (pageId && sceneId) {
1695
+ return { success: false, data: { error: "choose pageId or sceneId to get page info" } };
1696
+ }
1697
+ const base = "https://app.c.nf.migu.cn/bmw";
1698
+ if (pageId) return await h5fetch(`${base}/page-info/v1.0?pageId=${pageId}`);
1699
+ if (sceneId) return await h5fetch(`${base}/page/view/v1.0?columnId=${sceneId}`);
1700
+ };
1701
+
1702
+ // src/modules/page_tab.ts
1703
+ var getPageTab = async () => {
1704
+ return await h5fetch(`https://app.c.nf.migu.cn/bmw/music/nav-bar/v1.0`);
1705
+ };
1706
+
1707
+ // src/modules/svideo_recommend.ts
1708
+ var getSVideoRecommend = async (pacmtoken) => {
1709
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/resource-dataloader/recommend-video/v2.0", {
1710
+ method: "GET",
1711
+ cookie: { pacmtoken },
1712
+ params: {
1713
+ currentScreen: 1,
1714
+ scene: "home_selected"
1715
+ },
1716
+ headers: { "Content-Type": "application/json" }
1717
+ });
1718
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1719
+ };
1720
+
1721
+ // src/modules/follow_following_vra.ts
1722
+ var getFollowingVra = async (userId, page = 1) => {
1723
+ return await h5fetch(
1724
+ `https://app.c.nf.migu.cn/bmw/page-data/vrbt/follow-videouserlist/v2.0`,
1725
+ { params: {
1726
+ offset: page - 1,
1727
+ templateVersion: 1,
1728
+ uid: userId
1729
+ } }
1730
+ );
1731
+ };
1732
+
1733
+ // src/modules/follow_follower.ts
1734
+ var getFollowerList = async (params) => {
1735
+ if (params.type === "music") return await h5fetch(
1736
+ `https://app.c.nf.migu.cn/MIGUM2.0/v1.0/user/follower.do`,
1737
+ { params: {
1738
+ pageNo: params.page || 1,
1739
+ pageSize: params.size || 20,
1740
+ userId: params.userId
1741
+ } }
1742
+ );
1743
+ if (params.type === "vrbt") {
1744
+ if (!params.userId && !params.videoUserId) return {
1745
+ success: false,
1746
+ error: "userId or videoUserId is required"
1747
+ };
1748
+ return await h5fetch(
1749
+ `https://app.c.nf.migu.cn/user/i/social/fans-list/v1.0`,
1750
+ { params: {
1751
+ userId: params.userId,
1752
+ videoUserId: params.videoUserId
1753
+ } }
1754
+ );
1755
+ }
1756
+ };
1757
+
1758
+ // src/modules/follow_following.ts
1759
+ var getFollowingList = async (userId, type, page = 1, size = 20) => {
1760
+ if (!userId) return { success: false, error: "userId is required" };
1761
+ if (type !== "user" && type !== "singer") return { success: false, error: "type is invalid" };
1762
+ return await h5fetch(
1763
+ `https://app.c.nf.migu.cn/MIGUM2.0/v1.0/user/followingSingers.do`,
1764
+ { params: {
1765
+ "pageNo": page,
1766
+ "pageSize": size,
1767
+ "userId": userId,
1768
+ "userType": type === "singer" ? "1" : "2"
1769
+ } }
1770
+ );
1771
+ };
1772
+
1773
+ // src/modules/follow_add.ts
1774
+ var addFollower = async (pacmtoken, singerId) => {
1775
+ const { data, cookies } = await ckfetch(
1776
+ `https://app.u.nf.migu.cn/user/social/api/add-follow/v1.0`,
1777
+ {
1778
+ params: {
1779
+ "followId": singerId,
1780
+ "type": "1"
1781
+ },
1782
+ cookie: { pacmtoken }
1783
+ }
1784
+ );
1785
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1786
+ };
1787
+
1788
+ // src/modules/follow_remove.ts
1789
+ var removeFollower = async (pacmtoken, singerId) => {
1790
+ const { data, cookies } = await ckfetch(
1791
+ `https://app.u.nf.migu.cn/user/social/api/delete-follow/v1.0?followId=${singerId}`,
1792
+ { cookie: { pacmtoken } }
1793
+ );
1794
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1795
+ };
1796
+
1797
+ // src/modules/passport_logout.ts
1798
+ var logout = async (pacmtoken) => {
1799
+ const { data } = await ckfetch(`https://c.musicapp.migu.cn/mgateway/api/clearPacMtoken`, {
1800
+ cookie: { pacmtoken }
1801
+ });
1802
+ return data;
1803
+ };
1804
+
1805
+ // src/modules/share_video.ts
1806
+ var shareVideo = async (resourceType, contentId, userId) => {
1807
+ return await h5fetch(
1808
+ `https://app.c.nf.migu.cn/resource/share-info/v2.0`,
1809
+ { params: {
1810
+ "appId": "music",
1811
+ contentId,
1812
+ shareType: resourceType,
1813
+ uid: userId || void 0
1814
+ } }
1815
+ );
1816
+ };
1817
+
1818
+ // src/modules/share_common.ts
1819
+ var shareCommon = async (resourceType, contentId, contentName, targetUserName, copyrightId) => {
1820
+ return await h5fetch(
1821
+ `https://app.c.nf.migu.cn/MIGUM2.0/v1.0/content/shareInfo.do`,
1822
+ { params: {
1823
+ "appId": "music",
1824
+ resourceType,
1825
+ contentId,
1826
+ contentName,
1827
+ targetUserName,
1828
+ copyrightId: copyrightId || void 0,
1829
+ specialType: resourceType === "2003" ? "2" : void 0
1830
+ } }
1831
+ );
1832
+ };
1833
+
1562
1834
  // src/utils/index.ts
1563
1835
  var utils_exports = {};
1564
1836
  __export(utils_exports, {
1565
1837
  RSAKey: () => RSAKey,
1566
1838
  URLParams: () => URLParams,
1839
+ changeQuality: () => changeQuality,
1567
1840
  getDeviceId: () => getDeviceId,
1568
- getPublicKey: () => getPublicKey
1841
+ getPublicKey: () => getPublicKey,
1842
+ getQuality: () => getQuality,
1843
+ getResourceId: () => getResourceId,
1844
+ isQuality: () => isQuality,
1845
+ qualityList: () => qualityList,
1846
+ toneFormat: () => toneFormat,
1847
+ toneUrl: () => toneUrl
1569
1848
  });
1570
1849
 
1850
+ // src/utils/resourceType.ts
1851
+ var getResourceId = (name) => {
1852
+ name = name.toLowerCase().trim();
1853
+ switch (name) {
1854
+ case "song":
1855
+ return "2";
1856
+ case "album":
1857
+ return "2003";
1858
+ case "singer":
1859
+ case "artist":
1860
+ return "2002";
1861
+ case "playlist":
1862
+ return "2021";
1863
+ case "radio":
1864
+ return "2016";
1865
+ case "comment":
1866
+ return "3002";
1867
+ case "svideo":
1868
+ return "6000";
1869
+ case "mv":
1870
+ return "D";
1871
+ case "vrbt":
1872
+ return "M";
1873
+ default:
1874
+ return "";
1875
+ }
1876
+ };
1877
+
1571
1878
  // src/index.ts
1572
1879
  function createClient() {
1573
1880
  return modules_exports;
@@ -1577,9 +1884,11 @@ export {
1577
1884
  RSAKey,
1578
1885
  URLParams,
1579
1886
  YDRZ,
1887
+ addFollower,
1580
1888
  addSongToMyList,
1581
1889
  addUserCollect,
1582
1890
  addUserMyList,
1891
+ changeQuality,
1583
1892
  checkCanListen,
1584
1893
  checkToken,
1585
1894
  createClient,
@@ -1595,6 +1904,9 @@ export {
1595
1904
  getConcertRecommendMv,
1596
1905
  getConcertUrl,
1597
1906
  getDeviceId,
1907
+ getFollowerList,
1908
+ getFollowingList,
1909
+ getFollowingVra,
1598
1910
  getLyric,
1599
1911
  getMVRecommend,
1600
1912
  getMvBySong,
@@ -1607,10 +1919,13 @@ export {
1607
1919
  getNinanSong,
1608
1920
  getOpNum,
1609
1921
  getPacmToken,
1922
+ getPageInfo,
1923
+ getPageTab,
1610
1924
  getPlaylistInfo,
1611
1925
  getPlaylistSong,
1612
1926
  getPlaylistSquarePage,
1613
1927
  getPublicKey,
1928
+ getQuality,
1614
1929
  getRadioRecommend,
1615
1930
  getRadioRecommendAll,
1616
1931
  getRadioSong,
@@ -1618,8 +1933,10 @@ export {
1618
1933
  getRankInfo,
1619
1934
  getRecommendPlaylist,
1620
1935
  getRedirectUrl,
1936
+ getResourceId,
1621
1937
  getResourceInfo,
1622
1938
  getSVideoInfo,
1939
+ getSVideoRecommend,
1623
1940
  getSVideoSearchSuggest,
1624
1941
  getSVideoUrl,
1625
1942
  getSVideoUserContent,
@@ -1641,21 +1958,27 @@ export {
1641
1958
  getUrlV2,
1642
1959
  getUserBadge,
1643
1960
  getUserCollectList,
1961
+ getUserHeader,
1644
1962
  getUserHomePage,
1645
1963
  getUserMyList,
1964
+ getUserSongPage,
1646
1965
  getVersion,
1647
1966
  getVipPlaylist,
1648
1967
  getVrbtOpNum,
1649
1968
  getVrbtUrl,
1650
1969
  isFollowAuthor,
1970
+ isQuality,
1651
1971
  likeSong,
1652
1972
  loginNP,
1653
1973
  loginOneClick,
1654
1974
  loginPhone,
1655
1975
  loginSim,
1976
+ logout,
1656
1977
  matchPlaylist,
1657
1978
  modules_exports as modules,
1979
+ qualityList,
1658
1980
  queryUserInfo,
1981
+ removeFollower,
1659
1982
  removeSongFromMyList,
1660
1983
  removeUserCollect,
1661
1984
  removeUserMyList,
@@ -1669,6 +1992,10 @@ export {
1669
1992
  searchSong,
1670
1993
  searchSuggest,
1671
1994
  searchTicket,
1672
- signNinan
1995
+ shareCommon,
1996
+ shareVideo,
1997
+ signNinan,
1998
+ toneFormat,
1999
+ toneUrl
1673
2000
  };
1674
2001
  //# sourceMappingURL=index.js.map