File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed
Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1+ * .lock.json
2+ pnpm-lock.yaml
3+ yarn.lock
Original file line number Diff line number Diff line change 11import extra from '@mx-space/extra'
22
33async function handler ( ) {
4- const { NeteaseMusic } = extra
4+ const { NeteaseMusic, NeteaseCloudMusicApi } = extra
55
66 const client = new NeteaseMusic ( phone , password )
77 await client . Login ( )
88
9+ const uid = await client . getAccount ( )
10+
911 const weekdata = await client . getWeekData ( )
1012 const alldata = await client . getAllData ( )
1113 const playlist = await client . getFavorite ( )
1214
15+ const detail = await NeteaseCloudMusicApi . user_detail ( {
16+ uid,
17+ } ) . then ( ( res ) => ( res . body . code === 200 ? res . body . profile : null ) )
18+
1319 const responsePayload = {
1420 playlist,
1521 weekdata,
1622 alldata,
23+ detail,
1724 }
1825
1926 return responsePayload
2027}
2128
29+ /// CONFIGS ///
2230const phone = ''
2331const password = ''
32+ /// CONFIGS END ///
Original file line number Diff line number Diff line change 11{
22 "name" : " kami" ,
33 "dependencies" : {
4- "@mx-space/extra" : " latest "
4+ "@mx-space/extra" : " 0.5.5 "
55 }
66}
Original file line number Diff line number Diff line change 22 "compilerOptions" : {
33 "target" : " ES2017" ,
44 "allowJs" : true ,
5- "noEmit" : true
5+ "noEmit" : true ,
6+ "moduleResolution" : " node" ,
7+ "esModuleInterop" : true ,
8+ "module" : " CommonJS"
69 }
710}
You can’t perform that action at this time.
0 commit comments