File tree Expand file tree Collapse file tree 5 files changed +453
-0
lines changed Expand file tree Collapse file tree 5 files changed +453
-0
lines changed Original file line number Diff line number Diff line change
1
+ async function handler ( ) {
2
+ const extra = await require ( '@mx-space/extra' )
3
+ const { BiliClient } = extra
4
+ const bl = await context . getMaster ( ) . then ( ( user ) => user . socialIds . bilibili )
5
+ const client = new BiliClient ( parseInt ( bl || uid ) )
6
+ const bangumi = await client . getFavoriteBangumi ( parseInt ( len ) )
7
+ return bangumi
8
+ }
9
+
10
+ const uid = 26578164
11
+ const len = 10
Original file line number Diff line number Diff line change
1
+ async function handler ( ctx , require ) {
2
+ const extra = await require ( '@mx-space/extra' )
3
+ const { NeteaseMusic } = extra
4
+
5
+ const client = new NeteaseMusic ( phone , password )
6
+ await client . Login ( )
7
+
8
+ const weekdata = await client . getWeekData ( )
9
+ const alldata = await client . getAllData ( )
10
+ const playlist = await client . getFavorite ( )
11
+
12
+ const responsePayload = {
13
+ playlist,
14
+ weekdata,
15
+ alldata,
16
+ }
17
+
18
+ return responsePayload
19
+ }
20
+
21
+ const phone = ''
22
+ const password = ''
Original file line number Diff line number Diff line change
1
+ async function handler ( ctx , require ) {
2
+ const { NeteaseCloudMusicApi } = await require ( '@mx-space/extra' )
3
+ const { song_url } = NeteaseCloudMusicApi
4
+ const id = ctx . req . query . id
5
+ if ( ! id ) {
6
+ return { message : 'id must be not empty stringnumber' }
7
+ }
8
+ const data = await song_url ( {
9
+ id : + id ,
10
+ } )
11
+
12
+ return data . body . data
13
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " kami" ,
3
+ "dependencies" : {
4
+ "@mx-space/extra" : " latest"
5
+ }
6
+ }
You can’t perform that action at this time.
0 commit comments