@@ -2533,6 +2533,56 @@ QVariantMap Api::user_binding(QVariantMap query) {
2533
2533
);
2534
2534
}
2535
2535
2536
+ // 云盘歌曲删除
2537
+ QVariantMap Api::user_cloud_del (QVariantMap query) {
2538
+ const QVariantMap data {
2539
+ { " songIds" , QVariantList{ query[" id" ] } }
2540
+ };
2541
+ return request (
2542
+ POST,
2543
+ " https://music.163.com/weapi/cloud/del" ,
2544
+ data,
2545
+ {
2546
+ { " crypto" , " weapi" },
2547
+ _PARAM
2548
+ }
2549
+ );
2550
+ }
2551
+
2552
+ // 云盘数据详情
2553
+ QVariantMap Api::user_cloud_detail (QVariantMap query) {
2554
+ const auto id = query[" id" ].toString ().replace (" \s" , " " ).split (" ," );
2555
+ const QVariantMap data {
2556
+ { " songIds" , id }
2557
+ };
2558
+ return request (
2559
+ POST,
2560
+ " https://music.163.com/weapi/v1/cloud/get/byids" ,
2561
+ data,
2562
+ {
2563
+ { " crypto" , " weapi" },
2564
+ _PARAM
2565
+ }
2566
+ );
2567
+ }
2568
+
2569
+ // 云盘数据
2570
+ QVariantMap Api::user_cloud (QVariantMap query) {
2571
+ const QVariantMap data {
2572
+ { " limit" , query.value (" limit" , 30 ) },
2573
+ { " offset" , query.value (" offset" , 0 ) }
2574
+ };
2575
+ return request (
2576
+ POST,
2577
+ " https://music.163.com/api/v1/cloud/get" ,
2578
+ data,
2579
+ {
2580
+ { " crypto" , " weapi" },
2581
+ _PARAM
2582
+ }
2583
+ );
2584
+ }
2585
+
2536
2586
// 获取用户历史评论
2537
2587
QVariantMap Api::user_comment_history (QVariantMap query) {
2538
2588
QVariantMap cookie = query[" cookie" ].toMap ();
@@ -2570,6 +2620,99 @@ QVariantMap Api::user_detail(QVariantMap query) {
2570
2620
);
2571
2621
}
2572
2622
2623
+ // 用户电台节目
2624
+ QVariantMap Api::user_dj (QVariantMap query) {
2625
+ const QVariantMap data {
2626
+ { " limit" , query.value (" limit" , 30 ) },
2627
+ { " offset" , query.value (" offset" , 0 ) }
2628
+ };
2629
+ return request (
2630
+ POST,
2631
+ " https://music.163.com/weapi/dj/program/" + query[" uid" ].toString (),
2632
+ data,
2633
+ {
2634
+ { " crypto" , " weapi" },
2635
+ _PARAM
2636
+ }
2637
+ );
2638
+ }
2639
+
2640
+ // 用户动态
2641
+ QVariantMap Api::user_event (QVariantMap query) {
2642
+ QVariantMap cookie = query[" cookie" ].toMap ();
2643
+ cookie[" os" ] = " ios" ;
2644
+ cookie[" appver" ] = " 8.10.90" ;
2645
+ query[" cookie" ] = cookie;
2646
+ const QVariantMap data {
2647
+ { " getcounts" , true },
2648
+ { " time" , query.value (" lasttime" , -1 ) },
2649
+ { " limit" , query.value (" limit" , 30 ) },
2650
+ { " total" , false }
2651
+ };
2652
+ return request (
2653
+ POST,
2654
+ " https://music.163.com/api/event/get/" + query[" uid" ].toString (),
2655
+ data,
2656
+ {
2657
+ { " crypto" , " api" },
2658
+ _PARAM
2659
+ }
2660
+ );
2661
+ }
2662
+
2663
+ // 关注TA的人(粉丝)
2664
+ QVariantMap Api::user_followeds (QVariantMap query) {
2665
+ const QVariantMap data {
2666
+ { " userId" , query[" uid" ] },
2667
+ { " time" , " 0" },
2668
+ { " limit" , query.value (" limit" , 30 ) },
2669
+ { " offset" , query.value (" offset" , 0 ) },
2670
+ { " getcounts" , " true" }
2671
+ };
2672
+ return request (
2673
+ POST,
2674
+ " https://music.163.com/eapi/user/getfolloweds/" + query[" uid" ].toString (),
2675
+ data,
2676
+ {
2677
+ { " crypto" , " eapi" },
2678
+ _PARAM,
2679
+ { " url" , " /api/user/getfolloweds" }
2680
+ }
2681
+ );
2682
+ }
2683
+
2684
+ // TA关注的人(关注)
2685
+ QVariantMap Api::user_follows (QVariantMap query) {
2686
+ const QVariantMap data {
2687
+ { " offset" , query.value (" offset" , 0 ) },
2688
+ { " limit" , query.value (" limit" , 30 ) },
2689
+ { " order" , true }
2690
+ };
2691
+ return request (
2692
+ POST,
2693
+ " https://music.163.com/weapi/user/getfollows/" + query[" uid" ].toString (),
2694
+ data,
2695
+ {
2696
+ { " crypto" , " weapi" },
2697
+ _PARAM
2698
+ }
2699
+ );
2700
+ }
2701
+
2702
+ // 获取用户等级信息
2703
+ QVariantMap Api::user_level (QVariantMap query) {
2704
+ const QVariantMap data { };
2705
+ return request (
2706
+ POST,
2707
+ " https://music.163.com/weapi/user/level" ,
2708
+ data,
2709
+ {
2710
+ { " crypto" , " weapi" },
2711
+ _PARAM
2712
+ }
2713
+ );
2714
+ }
2715
+
2573
2716
// 用户歌单
2574
2717
QVariantMap Api::user_playlist (QVariantMap query) {
2575
2718
const QVariantMap data {
@@ -2589,6 +2732,80 @@ QVariantMap Api::user_playlist(QVariantMap query) {
2589
2732
);
2590
2733
}
2591
2734
2735
+ // 听歌排行
2736
+ QVariantMap Api::user_record (QVariantMap query) {
2737
+ const QVariantMap data {
2738
+ { " uid" , query[" uid" ] },
2739
+ { " type" , query.value (" type" , 0 ) } // 1: 最近一周, 0: 所有时间
2740
+ };
2741
+ return request (
2742
+ POST,
2743
+ " https://music.163.com/weapi/v1/play/record" ,
2744
+ data,
2745
+ {
2746
+ { " crypto" , " weapi" },
2747
+ _PARAM
2748
+ }
2749
+ );
2750
+ }
2751
+
2752
+ // 用户绑定手机
2753
+ QVariantMap Api::user_replacephone (QVariantMap query) {
2754
+ const QVariantMap data {
2755
+ { " phone" , query[" phone" ] },
2756
+ { " captcha" , query[" captcha" ] },
2757
+ { " oldcaptcha" , query[" oldcaptcha" ] },
2758
+ { " countrycode" , query.value (" countrycode" , 86 ) }
2759
+ };
2760
+ return request (
2761
+ POST,
2762
+ " https://music.163.com/api/user/replaceCellphone" ,
2763
+ data,
2764
+ {
2765
+ { " crypto" , " weapi" },
2766
+ _PARAM
2767
+ }
2768
+ );
2769
+ }
2770
+
2771
+ // 收藏计数
2772
+ QVariantMap Api::user_subcount (QVariantMap query) {
2773
+ return request (
2774
+ POST,
2775
+ " https://music.163.com/weapi/subcount" ,
2776
+ {},
2777
+ {
2778
+ { " crypto" , " weapi" },
2779
+ _PARAM
2780
+ }
2781
+ );
2782
+ }
2783
+
2784
+ // 编辑用户信息
2785
+ QVariantMap Api::user_update (QVariantMap query) {
2786
+ QVariantMap cookie = query[" cookie" ].toMap ();
2787
+ cookie[" os" ] = " ios" ;
2788
+ cookie[" appver" ] = " 8.10.90" ;
2789
+ query[" cookie" ] = cookie;
2790
+ const QVariantMap data {
2791
+ { " birthday" , query[" birthday" ] },
2792
+ { " city" , query[" city" ] },
2793
+ { " gender" , query[" gender" ] },
2794
+ { " nickname" , query[" nickname" ] },
2795
+ { " province" , query[" province" ] },
2796
+ { " signature" , query[" signature" ] },
2797
+ };
2798
+ return request (
2799
+ POST,
2800
+ " https://music.163.com/api/user/profile/update" ,
2801
+ data,
2802
+ {
2803
+ { " crypto" , " weapi" },
2804
+ _PARAM
2805
+ }
2806
+ );
2807
+ }
2808
+
2592
2809
// 云贝 todo 任务
2593
2810
QVariantMap Api::yunbei_tasks_todo (QVariantMap query) {
2594
2811
const QVariantMap data {};
0 commit comments