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 1
1
import extra from '@mx-space/extra'
2
2
3
3
async function handler ( ) {
4
- const { NeteaseMusic } = extra
4
+ const { NeteaseMusic, NeteaseCloudMusicApi } = extra
5
5
6
6
const client = new NeteaseMusic ( phone , password )
7
7
await client . Login ( )
8
8
9
+ const uid = await client . getAccount ( )
10
+
9
11
const weekdata = await client . getWeekData ( )
10
12
const alldata = await client . getAllData ( )
11
13
const playlist = await client . getFavorite ( )
12
14
15
+ const detail = await NeteaseCloudMusicApi . user_detail ( {
16
+ uid,
17
+ } ) . then ( ( res ) => ( res . body . code === 200 ? res . body . profile : null ) )
18
+
13
19
const responsePayload = {
14
20
playlist,
15
21
weekdata,
16
22
alldata,
23
+ detail,
17
24
}
18
25
19
26
return responsePayload
20
27
}
21
28
29
+ /// CONFIGS ///
22
30
const phone = ''
23
31
const password = ''
32
+ /// CONFIGS END ///
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " kami" ,
3
3
"dependencies" : {
4
- "@mx-space/extra" : " latest "
4
+ "@mx-space/extra" : " 0.5.5 "
5
5
}
6
6
}
Original file line number Diff line number Diff line change 2
2
"compilerOptions" : {
3
3
"target" : " ES2017" ,
4
4
"allowJs" : true ,
5
- "noEmit" : true
5
+ "noEmit" : true ,
6
+ "moduleResolution" : " node" ,
7
+ "esModuleInterop" : true ,
8
+ "module" : " CommonJS"
6
9
}
7
10
}
You can’t perform that action at this time.
0 commit comments