@ikenxuan/amagi 4.4.8 → 4.4.10
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/README.md +155 -81
- package/dist/default/cjs/index.cjs +1107 -672
- package/dist/default/esm/index.mjs +1096 -668
- package/dist/default/index.d.ts +532 -452
- package/package.json +4 -6
package/dist/default/index.d.ts
CHANGED
|
@@ -1076,7 +1076,7 @@ type AwemeDetail$2 = {
|
|
|
1076
1076
|
statistics: Statistics$4;
|
|
1077
1077
|
status: Status$3;
|
|
1078
1078
|
suggest_words: SuggestWords$4;
|
|
1079
|
-
text_extra: TextExtra$
|
|
1079
|
+
text_extra: TextExtra$3[];
|
|
1080
1080
|
uniqid_position: null;
|
|
1081
1081
|
user_digged: number;
|
|
1082
1082
|
user_recommend_status: number;
|
|
@@ -1499,7 +1499,7 @@ type Word$5 = {
|
|
|
1499
1499
|
word_id?: string;
|
|
1500
1500
|
[property: string]: any;
|
|
1501
1501
|
};
|
|
1502
|
-
type TextExtra$
|
|
1502
|
+
type TextExtra$3 = {
|
|
1503
1503
|
caption_end: number;
|
|
1504
1504
|
caption_start: number;
|
|
1505
1505
|
end: number;
|
|
@@ -1981,7 +1981,7 @@ type AwemeInfo = {
|
|
|
1981
1981
|
statistics: Statistics$3;
|
|
1982
1982
|
status: AwemeInfoStatus;
|
|
1983
1983
|
suggest_words: SuggestWords$3;
|
|
1984
|
-
text_extra: TextExtra$
|
|
1984
|
+
text_extra: TextExtra$2[];
|
|
1985
1985
|
trends_infos: null;
|
|
1986
1986
|
tts_id_list: null;
|
|
1987
1987
|
uniqid_position: null;
|
|
@@ -2278,7 +2278,7 @@ type Word$4 = {
|
|
|
2278
2278
|
word_id: string;
|
|
2279
2279
|
[property: string]: any;
|
|
2280
2280
|
};
|
|
2281
|
-
type TextExtra$
|
|
2281
|
+
type TextExtra$2 = {
|
|
2282
2282
|
end: number;
|
|
2283
2283
|
hashtag_id: string;
|
|
2284
2284
|
hashtag_name: string;
|
|
@@ -2823,7 +2823,7 @@ type AwemeDetail$1 = {
|
|
|
2823
2823
|
statistics: Statistics$2;
|
|
2824
2824
|
status: Status$2;
|
|
2825
2825
|
suggest_words: SuggestWords$2;
|
|
2826
|
-
text_extra: TextExtra$
|
|
2826
|
+
text_extra: TextExtra$1[];
|
|
2827
2827
|
uniqid_position: null;
|
|
2828
2828
|
user_digged: number;
|
|
2829
2829
|
user_recommend_status: number;
|
|
@@ -3343,7 +3343,7 @@ type Word$3 = {
|
|
|
3343
3343
|
word_id?: string;
|
|
3344
3344
|
[property: string]: any;
|
|
3345
3345
|
};
|
|
3346
|
-
type TextExtra$
|
|
3346
|
+
type TextExtra$1 = {
|
|
3347
3347
|
caption_end: number;
|
|
3348
3348
|
caption_start: number;
|
|
3349
3349
|
end: number;
|
|
@@ -6079,7 +6079,7 @@ type AwemeList = {
|
|
|
6079
6079
|
statistics: Statistics$1;
|
|
6080
6080
|
status: Status$1;
|
|
6081
6081
|
suggest_words: SuggestWords$1;
|
|
6082
|
-
text_extra: TextExtra
|
|
6082
|
+
text_extra: TextExtra[];
|
|
6083
6083
|
trends_infos: null;
|
|
6084
6084
|
tts_id_list: null;
|
|
6085
6085
|
uniqid_position: null;
|
|
@@ -6596,7 +6596,7 @@ type Word$1 = {
|
|
|
6596
6596
|
word_id: string;
|
|
6597
6597
|
[property: string]: any;
|
|
6598
6598
|
};
|
|
6599
|
-
type TextExtra
|
|
6599
|
+
type TextExtra = {
|
|
6600
6600
|
caption_end: number;
|
|
6601
6601
|
caption_start: number;
|
|
6602
6602
|
end: number;
|
|
@@ -7634,15 +7634,16 @@ type Comment$2 = {
|
|
|
7634
7634
|
create_time: number;
|
|
7635
7635
|
digg_count: number;
|
|
7636
7636
|
enter_from: string;
|
|
7637
|
-
image_list: ImageList[];
|
|
7637
|
+
image_list: ImageList[] | null;
|
|
7638
7638
|
ip_label: string;
|
|
7639
7639
|
is_author_digged: boolean;
|
|
7640
|
+
is_first_visitor_cmt?: boolean;
|
|
7640
7641
|
is_folded: boolean;
|
|
7641
7642
|
is_hot: boolean;
|
|
7642
7643
|
is_note_comment: number;
|
|
7643
7644
|
is_user_tend_to_reply: boolean;
|
|
7644
7645
|
item_comment_total: number;
|
|
7645
|
-
label_list: null;
|
|
7646
|
+
label_list: LabelList[] | null;
|
|
7646
7647
|
label_text: string;
|
|
7647
7648
|
label_type: number;
|
|
7648
7649
|
level: number;
|
|
@@ -7654,7 +7655,7 @@ type Comment$2 = {
|
|
|
7654
7655
|
status: number;
|
|
7655
7656
|
stick_position: number;
|
|
7656
7657
|
text: string;
|
|
7657
|
-
text_extra:
|
|
7658
|
+
text_extra: string[];
|
|
7658
7659
|
text_music_info: null;
|
|
7659
7660
|
user: CommentUser;
|
|
7660
7661
|
user_buried: boolean;
|
|
@@ -7705,57 +7706,49 @@ type Thumburl = {
|
|
|
7705
7706
|
width: number;
|
|
7706
7707
|
[property: string]: any;
|
|
7707
7708
|
};
|
|
7708
|
-
type
|
|
7709
|
-
aweme_id?: string;
|
|
7710
|
-
can_share?: boolean;
|
|
7711
|
-
cid?: string;
|
|
7712
|
-
content_type?: number;
|
|
7713
|
-
create_time?: number;
|
|
7714
|
-
digg_count?: number;
|
|
7715
|
-
image_list?: null;
|
|
7716
|
-
ip_label?: string;
|
|
7717
|
-
is_author_digged?: boolean;
|
|
7718
|
-
is_folded?: boolean;
|
|
7719
|
-
is_hot?: boolean;
|
|
7720
|
-
is_note_comment?: number;
|
|
7721
|
-
label_list?: null;
|
|
7722
|
-
label_text?: string;
|
|
7723
|
-
label_type?: number;
|
|
7724
|
-
level?: number;
|
|
7725
|
-
reply_comment?: null;
|
|
7726
|
-
reply_id?: string;
|
|
7727
|
-
reply_to_reply_id?: string;
|
|
7728
|
-
status?: number;
|
|
7709
|
+
type LabelList = {
|
|
7729
7710
|
text?: string;
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7711
|
+
type?: number;
|
|
7712
|
+
[property: string]: any;
|
|
7713
|
+
};
|
|
7714
|
+
type ReplyComment = {
|
|
7715
|
+
aweme_id: string;
|
|
7716
|
+
can_share: boolean;
|
|
7717
|
+
cid: string;
|
|
7718
|
+
content_type: number;
|
|
7719
|
+
create_time: number;
|
|
7720
|
+
digg_count: number;
|
|
7721
|
+
image_list: null;
|
|
7722
|
+
ip_label: string;
|
|
7723
|
+
is_author_digged: boolean;
|
|
7724
|
+
is_folded: boolean;
|
|
7725
|
+
is_hot: boolean;
|
|
7726
|
+
is_note_comment: number;
|
|
7727
|
+
label_list: null;
|
|
7728
|
+
label_text: string;
|
|
7729
|
+
label_type: number;
|
|
7730
|
+
level: number;
|
|
7731
|
+
reply_comment: null;
|
|
7732
|
+
reply_id: string;
|
|
7733
|
+
reply_to_reply_id: string;
|
|
7734
|
+
status: number;
|
|
7735
|
+
text: string;
|
|
7736
|
+
text_extra: any[];
|
|
7737
|
+
text_music_info: null;
|
|
7738
|
+
user: ReplyCommentUser;
|
|
7739
|
+
user_buried: boolean;
|
|
7740
|
+
user_digged: number;
|
|
7741
|
+
video_list: null;
|
|
7736
7742
|
[property: string]: any;
|
|
7737
7743
|
};
|
|
7738
7744
|
type ReplyCommentUser = {
|
|
7739
|
-
accept_private_policy: boolean;
|
|
7740
|
-
account_region: string;
|
|
7741
7745
|
ad_cover_url: null;
|
|
7742
|
-
apple_account: number;
|
|
7743
|
-
authority_status: number;
|
|
7744
|
-
avatar_168x168: PurpleAvatar168X168;
|
|
7745
|
-
avatar_300x300: PurpleAvatar300X300;
|
|
7746
|
-
avatar_larger: PurpleAvatarLarger;
|
|
7747
|
-
avatar_medium: PurpleAvatarMedium;
|
|
7748
7746
|
avatar_schema_list: null;
|
|
7749
7747
|
avatar_thumb: PurpleAvatarThumb;
|
|
7750
|
-
avatar_uri: string;
|
|
7751
7748
|
aweme_control: PurpleAwemeControl;
|
|
7752
|
-
|
|
7753
|
-
aweme_hotsoon_auth: number;
|
|
7754
|
-
awemehts_greet_info: string;
|
|
7755
|
-
ban_user_functions: any[];
|
|
7749
|
+
ban_user_functions: null;
|
|
7756
7750
|
batch_unfollow_contain_tabs: null;
|
|
7757
7751
|
batch_unfollow_relation_desc: null;
|
|
7758
|
-
bind_phone: string;
|
|
7759
7752
|
can_set_geofencing: null;
|
|
7760
7753
|
card_entries: null;
|
|
7761
7754
|
card_entries_not_display: null;
|
|
@@ -7763,82 +7756,34 @@ type ReplyCommentUser = {
|
|
|
7763
7756
|
cf_list: null;
|
|
7764
7757
|
cha_list: null;
|
|
7765
7758
|
close_friend_type: number;
|
|
7766
|
-
comment_filter_status: number;
|
|
7767
7759
|
comment_setting: number;
|
|
7768
7760
|
commerce_user_level: number;
|
|
7769
|
-
constellation: number;
|
|
7770
|
-
contacts_status: number;
|
|
7771
7761
|
contrail_list: null;
|
|
7772
|
-
cover_url:
|
|
7762
|
+
cover_url: null;
|
|
7773
7763
|
creator_tag_list: null;
|
|
7774
7764
|
custom_verify: string;
|
|
7775
|
-
cv_level: string;
|
|
7776
7765
|
data_label_list: null;
|
|
7777
7766
|
disable_image_comment_saved: number;
|
|
7778
7767
|
display_info: null;
|
|
7779
|
-
download_prompt_ts: number;
|
|
7780
|
-
download_setting: number;
|
|
7781
|
-
duet_setting: number;
|
|
7782
|
-
enable_nearby_visible: boolean;
|
|
7783
7768
|
endorsement_info_list: null;
|
|
7784
7769
|
enterprise_verify_reason: string;
|
|
7785
|
-
familiar_confidence: number;
|
|
7786
7770
|
familiar_visitor_user: null;
|
|
7787
|
-
favoriting_count: number;
|
|
7788
|
-
fb_expire_time: number;
|
|
7789
7771
|
follow_status: number;
|
|
7790
|
-
follower_count: number;
|
|
7791
7772
|
follower_list_secondary_information_struct: null;
|
|
7792
|
-
follower_request_status: number;
|
|
7793
7773
|
follower_status: number;
|
|
7794
7774
|
followers_detail: null;
|
|
7795
|
-
|
|
7796
|
-
geofencing: any[];
|
|
7797
|
-
google_account: string;
|
|
7798
|
-
has_email: boolean;
|
|
7799
|
-
has_facebook_token: boolean;
|
|
7800
|
-
has_insights: boolean;
|
|
7801
|
-
has_orders: boolean;
|
|
7802
|
-
has_twitter_token: boolean;
|
|
7803
|
-
has_unread_story: boolean;
|
|
7804
|
-
has_youtube_token: boolean;
|
|
7805
|
-
hide_location: boolean;
|
|
7806
|
-
hide_search: boolean;
|
|
7775
|
+
geofencing: null;
|
|
7807
7776
|
homepage_bottom_toast: null;
|
|
7808
7777
|
im_role_ids: null;
|
|
7809
|
-
ins_id: string;
|
|
7810
7778
|
interest_tags: null;
|
|
7811
7779
|
is_ad_fake: boolean;
|
|
7812
|
-
is_ban: boolean;
|
|
7813
|
-
is_binded_weibo: boolean;
|
|
7814
7780
|
is_block: boolean;
|
|
7815
7781
|
is_blocked_v2: boolean;
|
|
7816
7782
|
is_blocking_v2: boolean;
|
|
7817
|
-
is_cf: number;
|
|
7818
|
-
is_discipline_member: boolean;
|
|
7819
|
-
is_gov_media_vip: boolean;
|
|
7820
|
-
is_mix_user: boolean;
|
|
7821
|
-
is_not_show: boolean;
|
|
7822
|
-
is_phone_binded: boolean;
|
|
7823
7783
|
is_star: boolean;
|
|
7824
|
-
is_verified: boolean;
|
|
7825
7784
|
item_list: null;
|
|
7826
|
-
ky_only_predict: number;
|
|
7827
|
-
language: string;
|
|
7828
7785
|
link_item_list: null;
|
|
7829
|
-
live_agreement: number;
|
|
7830
|
-
live_agreement_time: number;
|
|
7831
|
-
live_commerce: boolean;
|
|
7832
|
-
live_high_value: number;
|
|
7833
|
-
live_status: number;
|
|
7834
|
-
live_verify: number;
|
|
7835
|
-
location: string;
|
|
7836
|
-
mate_add_permission: number;
|
|
7837
|
-
max_follower_count: number;
|
|
7838
7786
|
need_points: null;
|
|
7839
|
-
need_recommend: number;
|
|
7840
|
-
neiguang_shield: number;
|
|
7841
|
-
new_friend_type: number;
|
|
7842
7787
|
new_story_cover: null;
|
|
7843
7788
|
nickname: string;
|
|
7844
7789
|
not_seen_item_id_list: null;
|
|
@@ -7846,105 +7791,25 @@ type ReplyCommentUser = {
|
|
|
7846
7791
|
offline_info_list: null;
|
|
7847
7792
|
personal_tag_list: null;
|
|
7848
7793
|
platform_sync_info: null;
|
|
7849
|
-
prevent_download: boolean;
|
|
7850
7794
|
private_relation_list: null;
|
|
7851
7795
|
profile_mob_params: null;
|
|
7852
|
-
react_setting: number;
|
|
7853
|
-
reflow_page_gid: number;
|
|
7854
|
-
reflow_page_uid: number;
|
|
7855
7796
|
region: string;
|
|
7856
7797
|
relative_users: null;
|
|
7857
|
-
risk_notice_text: string;
|
|
7858
|
-
room_id: number;
|
|
7859
|
-
room_id_str: string;
|
|
7860
|
-
school_category: number;
|
|
7861
|
-
school_name: string;
|
|
7862
|
-
school_poi_id: string;
|
|
7863
|
-
school_type: number;
|
|
7864
|
-
search_impr: PurpleSearchImpr;
|
|
7865
7798
|
sec_uid: string;
|
|
7866
7799
|
secret: number;
|
|
7867
|
-
shield_comment_notice: number;
|
|
7868
|
-
shield_digg_notice: number;
|
|
7869
|
-
shield_follow_notice: number;
|
|
7870
7800
|
short_id: string;
|
|
7871
|
-
show_gender_strategy: number;
|
|
7872
|
-
show_image_bubble: boolean;
|
|
7873
|
-
show_nearby_active: boolean;
|
|
7874
|
-
signature: string;
|
|
7875
|
-
signature_display_lines: number;
|
|
7876
7801
|
signature_extra: null;
|
|
7877
|
-
special_follow_status: number;
|
|
7878
|
-
special_lock: number;
|
|
7879
7802
|
special_people_labels: null;
|
|
7880
7803
|
status: number;
|
|
7881
|
-
stitch_setting: number;
|
|
7882
|
-
story_count: number;
|
|
7883
|
-
story_open: boolean;
|
|
7884
|
-
sync_to_toutiao: number;
|
|
7885
7804
|
text_extra: null;
|
|
7886
|
-
total_favorited: number;
|
|
7887
|
-
tw_expire_time: number;
|
|
7888
|
-
twitter_id: string;
|
|
7889
|
-
twitter_name: string;
|
|
7890
7805
|
type_label: null;
|
|
7891
7806
|
uid: string;
|
|
7892
7807
|
unique_id: string;
|
|
7893
|
-
unique_id_modify_time: number;
|
|
7894
|
-
urge_detail: PurpleUrgeDetail;
|
|
7895
|
-
user_age: number;
|
|
7896
7808
|
user_canceled: boolean;
|
|
7897
|
-
user_mode: number;
|
|
7898
|
-
user_not_see: number;
|
|
7899
|
-
user_not_show: number;
|
|
7900
|
-
user_period: number;
|
|
7901
7809
|
user_permissions: null;
|
|
7902
|
-
user_rate: number;
|
|
7903
7810
|
user_tags: null;
|
|
7904
7811
|
verification_permission_ids: null;
|
|
7905
|
-
verification_type: number;
|
|
7906
|
-
verify_info: string;
|
|
7907
|
-
video_icon: PurpleVideoIcon;
|
|
7908
|
-
weibo_name: string;
|
|
7909
|
-
weibo_schema: string;
|
|
7910
|
-
weibo_url: string;
|
|
7911
|
-
weibo_verify: string;
|
|
7912
7812
|
white_cover_url: null;
|
|
7913
|
-
with_commerce_entry: boolean;
|
|
7914
|
-
with_dou_entry: boolean;
|
|
7915
|
-
with_fusion_shop_entry: boolean;
|
|
7916
|
-
with_shop_entry: boolean;
|
|
7917
|
-
youtube_channel_id: string;
|
|
7918
|
-
youtube_channel_title: string;
|
|
7919
|
-
youtube_expire_time: number;
|
|
7920
|
-
[property: string]: any;
|
|
7921
|
-
};
|
|
7922
|
-
type PurpleAvatar168X168 = {
|
|
7923
|
-
height: number;
|
|
7924
|
-
uri: string;
|
|
7925
|
-
url_list: string[];
|
|
7926
|
-
width: number;
|
|
7927
|
-
[property: string]: any;
|
|
7928
|
-
};
|
|
7929
|
-
type PurpleAvatar300X300 = {
|
|
7930
|
-
height: number;
|
|
7931
|
-
uri: string;
|
|
7932
|
-
url_list: string[];
|
|
7933
|
-
width: number;
|
|
7934
|
-
[property: string]: any;
|
|
7935
|
-
};
|
|
7936
|
-
type PurpleAvatarLarger = {
|
|
7937
|
-
height: number;
|
|
7938
|
-
uri: string;
|
|
7939
|
-
url_list: string[];
|
|
7940
|
-
width: number;
|
|
7941
|
-
[property: string]: any;
|
|
7942
|
-
};
|
|
7943
|
-
type PurpleAvatarMedium = {
|
|
7944
|
-
height: number;
|
|
7945
|
-
uri: string;
|
|
7946
|
-
url_list: string[];
|
|
7947
|
-
width: number;
|
|
7948
7813
|
[property: string]: any;
|
|
7949
7814
|
};
|
|
7950
7815
|
type PurpleAvatarThumb = {
|
|
@@ -7961,56 +7826,11 @@ type PurpleAwemeControl = {
|
|
|
7961
7826
|
can_show_comment: boolean;
|
|
7962
7827
|
[property: string]: any;
|
|
7963
7828
|
};
|
|
7964
|
-
type PurpleCoverurl = {
|
|
7965
|
-
height?: number;
|
|
7966
|
-
uri?: string;
|
|
7967
|
-
url_list?: string[];
|
|
7968
|
-
width?: number;
|
|
7969
|
-
[property: string]: any;
|
|
7970
|
-
};
|
|
7971
|
-
type PurpleSearchImpr = {
|
|
7972
|
-
entity_id: string;
|
|
7973
|
-
[property: string]: any;
|
|
7974
|
-
};
|
|
7975
|
-
type PurpleUrgeDetail = {
|
|
7976
|
-
user_urged: number;
|
|
7977
|
-
[property: string]: any;
|
|
7978
|
-
};
|
|
7979
|
-
type PurpleVideoIcon = {
|
|
7980
|
-
height: number;
|
|
7981
|
-
uri: string;
|
|
7982
|
-
url_list: any[];
|
|
7983
|
-
width: number;
|
|
7984
|
-
[property: string]: any;
|
|
7985
|
-
};
|
|
7986
|
-
type TextExtra = {
|
|
7987
|
-
end?: number;
|
|
7988
|
-
hashtag_id?: string;
|
|
7989
|
-
hashtag_name?: string;
|
|
7990
|
-
sec_uid?: string;
|
|
7991
|
-
start?: number;
|
|
7992
|
-
type?: number;
|
|
7993
|
-
user_id?: string;
|
|
7994
|
-
[property: string]: any;
|
|
7995
|
-
};
|
|
7996
7829
|
type CommentUser = {
|
|
7997
|
-
accept_private_policy: boolean;
|
|
7998
|
-
account_region: string;
|
|
7999
7830
|
ad_cover_url: null;
|
|
8000
|
-
apple_account: number;
|
|
8001
|
-
authority_status: number;
|
|
8002
|
-
avatar_168x168: FluffyAvatar168X168;
|
|
8003
|
-
avatar_300x300: FluffyAvatar300X300;
|
|
8004
|
-
avatar_larger: FluffyAvatarLarger;
|
|
8005
|
-
avatar_medium: FluffyAvatarMedium;
|
|
8006
7831
|
avatar_schema_list: null;
|
|
8007
7832
|
avatar_thumb: FluffyAvatarThumb;
|
|
8008
|
-
avatar_uri: string;
|
|
8009
7833
|
aweme_control: FluffyAwemeControl;
|
|
8010
|
-
aweme_count: number;
|
|
8011
|
-
aweme_hotsoon_auth: number;
|
|
8012
|
-
aweme_hotsoon_auth_relation: number;
|
|
8013
|
-
awemehts_greet_info: string;
|
|
8014
7834
|
ban_user_functions: number[];
|
|
8015
7835
|
batch_unfollow_contain_tabs: null;
|
|
8016
7836
|
batch_unfollow_relation_desc: null;
|
|
@@ -8021,80 +7841,33 @@ type CommentUser = {
|
|
|
8021
7841
|
cf_list: null;
|
|
8022
7842
|
cha_list: null;
|
|
8023
7843
|
close_friend_type: number;
|
|
8024
|
-
comment_filter_status: number;
|
|
8025
7844
|
comment_setting: number;
|
|
8026
7845
|
commerce_user_level: number;
|
|
8027
|
-
constellation: number;
|
|
8028
|
-
contacts_status: number;
|
|
8029
7846
|
contrail_list: null;
|
|
8030
|
-
cover_url:
|
|
7847
|
+
cover_url: null;
|
|
8031
7848
|
creator_tag_list: null;
|
|
8032
7849
|
custom_verify: string;
|
|
8033
|
-
cv_level: string;
|
|
8034
7850
|
data_label_list: null;
|
|
8035
7851
|
disable_image_comment_saved: number;
|
|
8036
7852
|
display_info: null;
|
|
8037
|
-
download_prompt_ts: number;
|
|
8038
|
-
download_setting: number;
|
|
8039
|
-
duet_setting: number;
|
|
8040
|
-
enable_nearby_visible: boolean;
|
|
8041
7853
|
endorsement_info_list: null;
|
|
8042
7854
|
enterprise_verify_reason: string;
|
|
8043
|
-
familiar_confidence: number;
|
|
8044
7855
|
familiar_visitor_user: null;
|
|
8045
|
-
favoriting_count: number;
|
|
8046
|
-
fb_expire_time: number;
|
|
8047
7856
|
follow_status: number;
|
|
8048
|
-
follower_count: number;
|
|
8049
7857
|
follower_list_secondary_information_struct: null;
|
|
8050
|
-
follower_request_status: number;
|
|
8051
7858
|
follower_status: number;
|
|
8052
|
-
|
|
8053
|
-
geofencing: string[];
|
|
8054
|
-
google_account: string;
|
|
8055
|
-
has_email: boolean;
|
|
8056
|
-
has_facebook_token: boolean;
|
|
8057
|
-
has_insights: boolean;
|
|
8058
|
-
has_orders: boolean;
|
|
8059
|
-
has_twitter_token: boolean;
|
|
8060
|
-
has_unread_story: boolean;
|
|
8061
|
-
has_youtube_token: boolean;
|
|
8062
|
-
hide_location: boolean;
|
|
8063
|
-
hide_search: boolean;
|
|
7859
|
+
geofencing: null;
|
|
8064
7860
|
homepage_bottom_toast: null;
|
|
8065
7861
|
im_role_ids: null;
|
|
8066
|
-
ins_id: string;
|
|
8067
7862
|
interest_tags: null;
|
|
8068
7863
|
is_ad_fake: boolean;
|
|
8069
|
-
is_ban: boolean;
|
|
8070
|
-
is_binded_weibo: boolean;
|
|
8071
7864
|
is_block: boolean;
|
|
8072
7865
|
is_blocked_v2: boolean;
|
|
8073
7866
|
is_blocking_v2: boolean;
|
|
8074
|
-
is_cf: number;
|
|
8075
|
-
is_discipline_member: boolean;
|
|
8076
|
-
is_gov_media_vip: boolean;
|
|
8077
|
-
is_mix_user: boolean;
|
|
8078
|
-
is_not_show: boolean;
|
|
8079
|
-
is_phone_binded: boolean;
|
|
8080
7867
|
is_star: boolean;
|
|
8081
|
-
is_verified: boolean;
|
|
8082
7868
|
item_list: null;
|
|
8083
|
-
ky_only_predict: number;
|
|
8084
|
-
language: string;
|
|
8085
7869
|
link_item_list: null;
|
|
8086
|
-
live_agreement: number;
|
|
8087
|
-
live_agreement_time: number;
|
|
8088
|
-
live_commerce: boolean;
|
|
8089
|
-
live_high_value: number;
|
|
8090
|
-
live_status: number;
|
|
8091
|
-
live_verify: number;
|
|
8092
|
-
mate_add_permission: number;
|
|
8093
|
-
max_follower_count: number;
|
|
8094
7870
|
need_points: null;
|
|
8095
|
-
need_recommend: number;
|
|
8096
|
-
neiguang_shield: number;
|
|
8097
|
-
new_friend_type: number;
|
|
8098
7871
|
new_story_cover: null;
|
|
8099
7872
|
nickname: string;
|
|
8100
7873
|
not_seen_item_id_list: null;
|
|
@@ -8102,101 +7875,25 @@ type CommentUser = {
|
|
|
8102
7875
|
offline_info_list: null;
|
|
8103
7876
|
personal_tag_list: null;
|
|
8104
7877
|
platform_sync_info: null;
|
|
8105
|
-
prevent_download: boolean;
|
|
8106
7878
|
private_relation_list: null;
|
|
8107
7879
|
profile_mob_params: null;
|
|
8108
|
-
react_setting: number;
|
|
8109
|
-
reflow_page_gid: number;
|
|
8110
|
-
reflow_page_uid: number;
|
|
8111
7880
|
region: string;
|
|
8112
7881
|
relative_users: null;
|
|
8113
|
-
risk_notice_text: string;
|
|
8114
|
-
room_id: number;
|
|
8115
|
-
room_id_str: string;
|
|
8116
|
-
school_category: number;
|
|
8117
|
-
search_impr: FluffySearchImpr;
|
|
8118
7882
|
sec_uid: string;
|
|
8119
7883
|
secret: number;
|
|
8120
|
-
shield_comment_notice: number;
|
|
8121
|
-
shield_digg_notice: number;
|
|
8122
|
-
shield_follow_notice: number;
|
|
8123
7884
|
short_id: string;
|
|
8124
|
-
show_gender_strategy: number;
|
|
8125
|
-
show_image_bubble: boolean;
|
|
8126
|
-
show_nearby_active: boolean;
|
|
8127
|
-
signature: string;
|
|
8128
|
-
signature_display_lines: number;
|
|
8129
7885
|
signature_extra: null;
|
|
8130
|
-
special_follow_status: number;
|
|
8131
|
-
special_lock: number;
|
|
8132
7886
|
special_people_labels: null;
|
|
8133
7887
|
status: number;
|
|
8134
|
-
stitch_setting: number;
|
|
8135
|
-
story_count: number;
|
|
8136
|
-
story_open: boolean;
|
|
8137
|
-
sync_to_toutiao: number;
|
|
8138
7888
|
text_extra: null;
|
|
8139
|
-
total_favorited: number;
|
|
8140
|
-
tw_expire_time: number;
|
|
8141
|
-
twitter_id: string;
|
|
8142
|
-
twitter_name: string;
|
|
8143
7889
|
type_label: null;
|
|
8144
7890
|
uid: string;
|
|
8145
7891
|
unique_id: string;
|
|
8146
|
-
unique_id_modify_time: number;
|
|
8147
|
-
urge_detail: FluffyUrgeDetail;
|
|
8148
7892
|
user_canceled: boolean;
|
|
8149
|
-
user_mode: number;
|
|
8150
|
-
user_not_see: number;
|
|
8151
|
-
user_not_show: number;
|
|
8152
|
-
user_period: number;
|
|
8153
7893
|
user_permissions: null;
|
|
8154
|
-
user_rate: number;
|
|
8155
7894
|
user_tags: null;
|
|
8156
7895
|
verification_permission_ids: null;
|
|
8157
|
-
verification_type: number;
|
|
8158
|
-
verify_info: string;
|
|
8159
|
-
video_icon: FluffyVideoIcon;
|
|
8160
|
-
weibo_name: string;
|
|
8161
|
-
weibo_schema: string;
|
|
8162
|
-
weibo_url: string;
|
|
8163
|
-
weibo_verify: string;
|
|
8164
7896
|
white_cover_url: null;
|
|
8165
|
-
with_commerce_entry: boolean;
|
|
8166
|
-
with_dou_entry: boolean;
|
|
8167
|
-
with_fusion_shop_entry: boolean;
|
|
8168
|
-
with_shop_entry: boolean;
|
|
8169
|
-
youtube_channel_id: string;
|
|
8170
|
-
youtube_channel_title: string;
|
|
8171
|
-
youtube_expire_time: number;
|
|
8172
|
-
[property: string]: any;
|
|
8173
|
-
};
|
|
8174
|
-
type FluffyAvatar168X168 = {
|
|
8175
|
-
height: number;
|
|
8176
|
-
uri: string;
|
|
8177
|
-
url_list: string[];
|
|
8178
|
-
width: number;
|
|
8179
|
-
[property: string]: any;
|
|
8180
|
-
};
|
|
8181
|
-
type FluffyAvatar300X300 = {
|
|
8182
|
-
height: number;
|
|
8183
|
-
uri: string;
|
|
8184
|
-
url_list: string[];
|
|
8185
|
-
width: number;
|
|
8186
|
-
[property: string]: any;
|
|
8187
|
-
};
|
|
8188
|
-
type FluffyAvatarLarger = {
|
|
8189
|
-
height: number;
|
|
8190
|
-
uri: string;
|
|
8191
|
-
url_list: string[];
|
|
8192
|
-
width: number;
|
|
8193
|
-
[property: string]: any;
|
|
8194
|
-
};
|
|
8195
|
-
type FluffyAvatarMedium = {
|
|
8196
|
-
height: number;
|
|
8197
|
-
uri: string;
|
|
8198
|
-
url_list: string[];
|
|
8199
|
-
width: number;
|
|
8200
7897
|
[property: string]: any;
|
|
8201
7898
|
};
|
|
8202
7899
|
type FluffyAvatarThumb = {
|
|
@@ -8213,28 +7910,6 @@ type FluffyAwemeControl = {
|
|
|
8213
7910
|
can_show_comment: boolean;
|
|
8214
7911
|
[property: string]: any;
|
|
8215
7912
|
};
|
|
8216
|
-
type FluffyCoverurl = {
|
|
8217
|
-
height: number;
|
|
8218
|
-
uri: string;
|
|
8219
|
-
url_list: string[];
|
|
8220
|
-
width: number;
|
|
8221
|
-
[property: string]: any;
|
|
8222
|
-
};
|
|
8223
|
-
type FluffySearchImpr = {
|
|
8224
|
-
entity_id: string;
|
|
8225
|
-
[property: string]: any;
|
|
8226
|
-
};
|
|
8227
|
-
type FluffyUrgeDetail = {
|
|
8228
|
-
user_urged: number;
|
|
8229
|
-
[property: string]: any;
|
|
8230
|
-
};
|
|
8231
|
-
type FluffyVideoIcon = {
|
|
8232
|
-
height: number;
|
|
8233
|
-
uri: string;
|
|
8234
|
-
url_list: string[];
|
|
8235
|
-
width: number;
|
|
8236
|
-
[property: string]: any;
|
|
8237
|
-
};
|
|
8238
7913
|
type Extra = {
|
|
8239
7914
|
fatal_item_ids: null;
|
|
8240
7915
|
now: number;
|
|
@@ -13564,25 +13239,12 @@ type TypeControl = {
|
|
|
13564
13239
|
* - `loose` 或 `未指定`: 返回宽松的 any 类型(默认)
|
|
13565
13240
|
*
|
|
13566
13241
|
* @default 'loose'
|
|
13567
|
-
* @example
|
|
13568
|
-
* ```ts
|
|
13569
|
-
* // 严格模式
|
|
13570
|
-
* const data = await amagi.getDouyinData('视频作品数据', {
|
|
13571
|
-
* aweme_id: '123',
|
|
13572
|
-
* typeMode: 'strict' // 返回精确的 VideoWork 类型
|
|
13573
|
-
* });
|
|
13574
|
-
*
|
|
13575
|
-
* // 宽松模式
|
|
13576
|
-
* const data = await amagi.getDouyinData('视频作品数据', {
|
|
13577
|
-
* aweme_id: '123' // 返回 any 类型
|
|
13578
|
-
* });
|
|
13579
|
-
* ```
|
|
13580
13242
|
*/
|
|
13581
13243
|
typeMode?: 'strict' | 'loose';
|
|
13582
13244
|
};
|
|
13583
13245
|
|
|
13584
13246
|
/**
|
|
13585
|
-
*
|
|
13247
|
+
* 快捷获取抖音数据
|
|
13586
13248
|
* @param type - 请求数据类型
|
|
13587
13249
|
* @param cookie - 有效的用户Cookie
|
|
13588
13250
|
* @param options - 请求参数,是一个对象
|
|
@@ -13592,7 +13254,7 @@ declare function getDouyinData<T extends keyof DouyinDataOptionsMap, R extends '
|
|
|
13592
13254
|
typeMode?: R;
|
|
13593
13255
|
}): Promise<R extends 'strict' ? DouyinDataOptionsMap[T]['data'] : any>;
|
|
13594
13256
|
/**
|
|
13595
|
-
*
|
|
13257
|
+
* 快捷获取抖音数据
|
|
13596
13258
|
* @param type - 请求数据类型
|
|
13597
13259
|
* @param options - 请求参数,是一个对象
|
|
13598
13260
|
* @param cookie - 有效的用户Cookie
|
|
@@ -13602,7 +13264,7 @@ declare function getDouyinData<T extends keyof DouyinDataOptionsMap, R extends '
|
|
|
13602
13264
|
typeMode?: R;
|
|
13603
13265
|
}, cookie?: string): Promise<R extends 'strict' ? DouyinDataOptionsMap[T]['data'] : any>;
|
|
13604
13266
|
/**
|
|
13605
|
-
*
|
|
13267
|
+
* 快捷获取B站数据
|
|
13606
13268
|
* @param type - 请求数据类型
|
|
13607
13269
|
* @param cookie - 有效的用户Cookie
|
|
13608
13270
|
* @param options - 请求参数,是一个对象
|
|
@@ -13612,7 +13274,7 @@ declare function getBilibiliData<T extends keyof BilibiliDataOptionsMap, R exten
|
|
|
13612
13274
|
typeMode?: R;
|
|
13613
13275
|
}): Promise<R extends 'strict' ? BilibiliDataOptionsMap[T]['data'] : any>;
|
|
13614
13276
|
/**
|
|
13615
|
-
*
|
|
13277
|
+
* 快捷获取B站数据
|
|
13616
13278
|
* @param type - 请求数据类型
|
|
13617
13279
|
* @param options - 请求参数,是一个对象
|
|
13618
13280
|
* @param cookie - 有效的用户Cookie
|
|
@@ -13622,7 +13284,7 @@ declare function getBilibiliData<T extends keyof BilibiliDataOptionsMap, R exten
|
|
|
13622
13284
|
typeMode?: R;
|
|
13623
13285
|
}, cookie?: string): Promise<R extends 'strict' ? BilibiliDataOptionsMap[T]['data'] : any>;
|
|
13624
13286
|
/**
|
|
13625
|
-
*
|
|
13287
|
+
* 快捷获取快手数据
|
|
13626
13288
|
* @param type - 请求数据类型
|
|
13627
13289
|
* @param cookie - 有效的用户Cookie
|
|
13628
13290
|
* @param options - 请求参数,是一个对象
|
|
@@ -13632,7 +13294,7 @@ declare function getKuaishouData<T extends keyof KuaishouDataOptionsMap, R exten
|
|
|
13632
13294
|
typeMode?: R;
|
|
13633
13295
|
}): Promise<R extends 'strict' ? KuaishouDataOptionsMap[T]['data'] : any>;
|
|
13634
13296
|
/**
|
|
13635
|
-
*
|
|
13297
|
+
* 快捷获取快手数据
|
|
13636
13298
|
* @param type - 请求数据类型
|
|
13637
13299
|
* @param options - 请求参数,是一个对象
|
|
13638
13300
|
* @param cookie - 有效的用户Cookie
|
|
@@ -13707,21 +13369,173 @@ declare class Networks {
|
|
|
13707
13369
|
* @param fields - 要对data进行检查的字段
|
|
13708
13370
|
* @param atLeastOne - 是否至少有一个字段存在即可通过检查,默认为false
|
|
13709
13371
|
*/
|
|
13710
|
-
declare const DouyinValidateData: <T extends keyof DouyinDataOptionsMap>(data: DouyinDataOptionsMap[T]["opt"],
|
|
13372
|
+
declare const DouyinValidateData: <T extends keyof DouyinDataOptionsMap>(data: DouyinDataOptionsMap[T]["opt"], // 根据 methodType 动态关联 opt 类型
|
|
13373
|
+
fields: (keyof Omit<DouyinDataOptionsMap[T]["opt"], "methodType" | "typeMode">)[], atLeastOne?: boolean) => void;
|
|
13711
13374
|
/**
|
|
13712
13375
|
* 参数检查
|
|
13713
13376
|
* @param data - 参数对象
|
|
13714
13377
|
* @param fields - 要对data进行检查的字段
|
|
13715
13378
|
* @param atLeastOne - 是否至少有一个字段存在即可通过检查,默认为false
|
|
13716
13379
|
*/
|
|
13717
|
-
declare const BilibiliValidateData: <T extends keyof BilibiliDataOptionsMap>(data: BilibiliDataOptionsMap[T]["opt"],
|
|
13380
|
+
declare const BilibiliValidateData: <T extends keyof BilibiliDataOptionsMap>(data: BilibiliDataOptionsMap[T]["opt"], // 根据 methodType 动态关联 opt 类型
|
|
13381
|
+
fields: (keyof Omit<BilibiliDataOptionsMap[T]["opt"], "methodType" | "typeMode">)[], atLeastOne?: boolean) => void;
|
|
13718
13382
|
/**
|
|
13719
13383
|
* 参数检查
|
|
13720
13384
|
* @param data - 参数对象
|
|
13721
13385
|
* @param fields - 要对data进行检查的字段
|
|
13722
13386
|
* @param atLeastOne - 是否至少有一个字段存在即可通过检查,默认为false
|
|
13723
13387
|
*/
|
|
13724
|
-
declare const KusiahouValidateData: <T extends keyof KuaishouDataOptionsMap>(data: KuaishouDataOptionsMap[T]["opt"],
|
|
13388
|
+
declare const KusiahouValidateData: <T extends keyof KuaishouDataOptionsMap>(data: KuaishouDataOptionsMap[T]["opt"], // 根据 methodType 动态关联 opt 类型
|
|
13389
|
+
fields: (keyof Omit<KuaishouDataOptionsMap[T]["opt"], "methodType" | "typeMode">)[], atLeastOne?: boolean) => void;
|
|
13390
|
+
|
|
13391
|
+
/**
|
|
13392
|
+
* 从 BilibiliMethodOptionsMap 中提取特定 API 的选项类型,并移除 methodType,添加 TypeControl。
|
|
13393
|
+
* @template K - BilibiliMethodOptionsMap 中的键名。
|
|
13394
|
+
*/
|
|
13395
|
+
type BilibiliApiOptions<K extends keyof BilibiliMethodOptionsMap> = Omit<BilibiliMethodOptionsMap[K], 'methodType'> & TypeControl;
|
|
13396
|
+
/**
|
|
13397
|
+
* 根据传入的选项中的 typeMode 决定 Bilibili API 的返回类型。
|
|
13398
|
+
* @template K - BilibiliDataOptionsMap 中的键名。
|
|
13399
|
+
* @template T - 包含可选 typeMode 的选项对象。
|
|
13400
|
+
*/
|
|
13401
|
+
type BilibiliApiReturn<K extends keyof BilibiliDataOptionsMap, T extends TypeControl> = T['typeMode'] extends 'strict' ? BilibiliDataOptionsMap[K]['data'] : any;
|
|
13402
|
+
/**
|
|
13403
|
+
* B站相关 API 的命名空间。
|
|
13404
|
+
*
|
|
13405
|
+
* 部分接口可能不需要 Cookie 但建议传递有效的用户 Cookie,以获取更多数据。
|
|
13406
|
+
*
|
|
13407
|
+
* 提供了一系列方法,用于与B站相关的 API 进行交互。
|
|
13408
|
+
*
|
|
13409
|
+
* 每个方法都接受参数和 Cookie,返回 Promise,解析为接口返回的原始数据。
|
|
13410
|
+
*/
|
|
13411
|
+
declare const bilibili: {
|
|
13412
|
+
/**
|
|
13413
|
+
* 获取单个视频作品数据
|
|
13414
|
+
* @param options 请求参数,包含 bvid 和可选的 typeMode
|
|
13415
|
+
* @param cookie 有效的用户 Cookie
|
|
13416
|
+
* @returns 接口返回的原始数据
|
|
13417
|
+
*/
|
|
13418
|
+
getVideoInfo<T extends BilibiliApiOptions<"VideoInfoParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E", T>>;
|
|
13419
|
+
/**
|
|
13420
|
+
* 获取单个视频下载信息数据
|
|
13421
|
+
* @param options 请求参数,包含 avid, cid 和可选的 typeMode
|
|
13422
|
+
* @param cookie 有效的用户 Cookie
|
|
13423
|
+
* @returns 接口返回的原始数据
|
|
13424
|
+
*/
|
|
13425
|
+
getVideoStream<T extends BilibiliApiOptions<"VideoStreamParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E", T>>;
|
|
13426
|
+
/**
|
|
13427
|
+
* 获取评论数据
|
|
13428
|
+
* @param options 请求参数,包含 type, oid, 可选的 number, pn 和 typeMode
|
|
13429
|
+
* @param cookie 有效的用户 Cookie
|
|
13430
|
+
* @returns 接口返回的原始数据
|
|
13431
|
+
*/
|
|
13432
|
+
getComments<T extends BilibiliApiOptions<"CommentParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u8BC4\u8BBA\u6570\u636E", T>>;
|
|
13433
|
+
/**
|
|
13434
|
+
* 获取用户主页数据
|
|
13435
|
+
* @param options 请求参数,包含 host_mid 和可选的 typeMode
|
|
13436
|
+
* @param cookie 有效的用户 Cookie
|
|
13437
|
+
* @returns 接口返回的原始数据
|
|
13438
|
+
*/
|
|
13439
|
+
getUserProfile<T extends BilibiliApiOptions<"UserParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u7528\u6237\u4E3B\u9875\u6570\u636E", T>>;
|
|
13440
|
+
/**
|
|
13441
|
+
* 获取用户主页动态列表数据
|
|
13442
|
+
* @param options 请求参数,包含 host_mid 和可选的 typeMode
|
|
13443
|
+
* @param cookie 有效的用户 Cookie
|
|
13444
|
+
* @returns 接口返回的原始数据
|
|
13445
|
+
*/
|
|
13446
|
+
getUserDynamic<T extends BilibiliApiOptions<"UserParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E", T>>;
|
|
13447
|
+
/**
|
|
13448
|
+
* 获取 Emoji 数据
|
|
13449
|
+
* @param options 可选的请求参数 (主要用于 typeMode)
|
|
13450
|
+
* @param cookie 有效的用户 Cookie
|
|
13451
|
+
* @returns 接口返回的原始数据
|
|
13452
|
+
*/
|
|
13453
|
+
getEmojiList<T extends BilibiliApiOptions<"EmojiParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"Emoji\u6570\u636E", T>>;
|
|
13454
|
+
/**
|
|
13455
|
+
* 获取番剧基本信息数据
|
|
13456
|
+
* @param options 请求参数,包含可选的 season_id, ep_id 和 typeMode
|
|
13457
|
+
* @param cookie 有效的用户 Cookie
|
|
13458
|
+
* @returns 接口返回的原始数据
|
|
13459
|
+
*/
|
|
13460
|
+
getBangumiInfo<T extends BilibiliApiOptions<"BangumiInfoParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u756A\u5267\u57FA\u672C\u4FE1\u606F\u6570\u636E", T>>;
|
|
13461
|
+
/**
|
|
13462
|
+
* 获取番剧下载信息数据
|
|
13463
|
+
* @param options 请求参数,包含 cid, ep_id 和可选的 typeMode
|
|
13464
|
+
* @param cookie 有效的用户 Cookie
|
|
13465
|
+
* @returns 接口返回的原始数据
|
|
13466
|
+
*/
|
|
13467
|
+
getBangumiStream<T extends BilibiliApiOptions<"BangumiStreamParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u756A\u5267\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E", T>>;
|
|
13468
|
+
/**
|
|
13469
|
+
* 获取动态详情数据
|
|
13470
|
+
* @param options 请求参数,包含 dynamic_id 和可选的 typeMode
|
|
13471
|
+
* @param cookie 有效的用户 Cookie
|
|
13472
|
+
* @returns 接口返回的原始数据
|
|
13473
|
+
*/
|
|
13474
|
+
getDynamicInfo<T extends BilibiliApiOptions<"DynamicParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u52A8\u6001\u8BE6\u60C5\u6570\u636E", T>>;
|
|
13475
|
+
/**
|
|
13476
|
+
* 获取动态卡片数据
|
|
13477
|
+
* @param options 请求参数,包含 dynamic_id 和可选的 typeMode
|
|
13478
|
+
* @param cookie 有效的用户 Cookie
|
|
13479
|
+
* @returns 接口返回的原始数据
|
|
13480
|
+
*/
|
|
13481
|
+
getDynamicCard<T extends BilibiliApiOptions<"DynamicParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u52A8\u6001\u5361\u7247\u6570\u636E", T>>;
|
|
13482
|
+
/**
|
|
13483
|
+
* 获取直播间信息
|
|
13484
|
+
* @param options 请求参数,包含 room_id 和可选的 typeMode
|
|
13485
|
+
* @param cookie 有效的用户 Cookie
|
|
13486
|
+
* @returns 接口返回的原始数据
|
|
13487
|
+
*/
|
|
13488
|
+
getLiveRoomDetail<T extends BilibiliApiOptions<"LiveRoomParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u76F4\u64AD\u95F4\u4FE1\u606F", T>>;
|
|
13489
|
+
/**
|
|
13490
|
+
* 获取直播间初始化信息
|
|
13491
|
+
* @param options 请求参数,包含 room_id 和可选的 typeMode
|
|
13492
|
+
* @param cookie 有效的用户 Cookie
|
|
13493
|
+
* @returns 接口返回的原始数据
|
|
13494
|
+
*/
|
|
13495
|
+
getLiveRoomInitInfo<T extends BilibiliApiOptions<"LiveRoomParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F", T>>;
|
|
13496
|
+
/**
|
|
13497
|
+
* 获取登录基本信息
|
|
13498
|
+
* @param options 可选的请求参数 (主要用于 typeMode)
|
|
13499
|
+
* @param cookie 有效的用户 Cookie
|
|
13500
|
+
* @returns 接口返回的原始数据
|
|
13501
|
+
*/
|
|
13502
|
+
getLoginBasicInfo<T extends BilibiliApiOptions<"LoginBaseInfoParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u767B\u5F55\u57FA\u672C\u4FE1\u606F", T>>;
|
|
13503
|
+
/**
|
|
13504
|
+
* 申请登录二维码
|
|
13505
|
+
* @param options 可选的请求参数 (主要用于 typeMode)
|
|
13506
|
+
* @param cookie 有效的用户 Cookie
|
|
13507
|
+
* @returns 接口返回的原始数据
|
|
13508
|
+
*/
|
|
13509
|
+
getLoginQrcode<T extends BilibiliApiOptions<"GetQrcodeParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u7533\u8BF7\u4E8C\u7EF4\u7801", T>>;
|
|
13510
|
+
/**
|
|
13511
|
+
* 检查二维码状态
|
|
13512
|
+
* @param options 请求参数,包含 qrcode_key 和可选的 typeMode
|
|
13513
|
+
* @param cookie 有效的用户 Cookie
|
|
13514
|
+
* @returns 接口返回的原始数据
|
|
13515
|
+
*/
|
|
13516
|
+
checkQrcodeStatus<T extends BilibiliApiOptions<"QrcodeParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u4E8C\u7EF4\u7801\u72B6\u6001", T>>;
|
|
13517
|
+
/**
|
|
13518
|
+
* 获取 UP 主总播放量
|
|
13519
|
+
* @param options 请求参数,包含 host_mid 和可选的 typeMode
|
|
13520
|
+
* @param cookie 有效的用户 Cookie
|
|
13521
|
+
* @returns 接口返回的原始数据
|
|
13522
|
+
*/
|
|
13523
|
+
getUserTotalPlayCount<T extends BilibiliApiOptions<"UserParams">>(options: T, cookie?: string): Promise<BilibiliApiReturn<"\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF", T>>;
|
|
13524
|
+
/**
|
|
13525
|
+
* 将 AV 号转换为 BV 号
|
|
13526
|
+
* @param options 请求参数,包含 avid
|
|
13527
|
+
* @param cookie 有效的用户 Cookie (此接口通常不需要)
|
|
13528
|
+
* @returns 接口返回的原始数据
|
|
13529
|
+
*/
|
|
13530
|
+
convertAvToBv<T extends BilibiliApiOptions<"Av2BvParams">>(options: T, cookie?: string): Promise<BilibiliDataOptionsMap["AV\u8F6CBV"]["data"]>;
|
|
13531
|
+
/**
|
|
13532
|
+
* 将 BV 号转换为 AV 号
|
|
13533
|
+
* @param options 请求参数,包含 bvid
|
|
13534
|
+
* @param cookie 有效的用户 Cookie (此接口通常不需要)
|
|
13535
|
+
* @returns 接口返回的原始数据
|
|
13536
|
+
*/
|
|
13537
|
+
convertBvToAv<T extends BilibiliApiOptions<"Bv2AvParams">>(options: T, cookie?: string): Promise<BilibiliDataOptionsMap["BV\u8F6CAV"]["data"]>;
|
|
13538
|
+
};
|
|
13725
13539
|
|
|
13726
13540
|
type BilibiliMethodOptionsWithoutMethodType = {
|
|
13727
13541
|
[K in keyof BilibiliMethodOptionsMap]: OmitMethodType<BilibiliMethodOptionsMap[K]>;
|
|
@@ -13746,10 +13560,34 @@ declare class BiLiBiLiAPI {
|
|
|
13746
13560
|
二维码状态(data: BilibiliMethodOptionsWithoutMethodType['QrcodeParams']): string;
|
|
13747
13561
|
获取UP主总播放量(data: BilibiliMethodOptionsWithoutMethodType['UserParams']): string;
|
|
13748
13562
|
}
|
|
13749
|
-
/**
|
|
13563
|
+
/**
|
|
13564
|
+
* 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据
|
|
13565
|
+
* @deprecated 即将废弃,请使用 bilibiliApiUrls
|
|
13566
|
+
*/
|
|
13750
13567
|
declare const bilibiliAPI: BiLiBiLiAPI;
|
|
13568
|
+
/** 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据 */
|
|
13569
|
+
declare const bilibiliApiUrls: BiLiBiLiAPI;
|
|
13751
13570
|
|
|
13752
|
-
|
|
13571
|
+
/**
|
|
13572
|
+
* av号转bv号
|
|
13573
|
+
* @param aid av号
|
|
13574
|
+
* @returns
|
|
13575
|
+
*/
|
|
13576
|
+
declare function av2bv(aid: number): `BV1${string}`;
|
|
13577
|
+
/**
|
|
13578
|
+
* bv号转av号
|
|
13579
|
+
* @param bvid bv号
|
|
13580
|
+
* @returns
|
|
13581
|
+
*/
|
|
13582
|
+
declare function bv2av(bvid: string): number;
|
|
13583
|
+
|
|
13584
|
+
/**
|
|
13585
|
+
* 对请求链接进行 wbi 签名
|
|
13586
|
+
* @param BASEURL 完整请求地址
|
|
13587
|
+
* @param cookie 有效的用户cookie
|
|
13588
|
+
* @returns
|
|
13589
|
+
*/
|
|
13590
|
+
declare function wbi_sign(BASEURL: string | URL, cookie: string): Promise<string>;
|
|
13753
13591
|
|
|
13754
13592
|
declare function qtparam(BASEURL: string, cookie: string): Promise<{
|
|
13755
13593
|
QUERY: string;
|
|
@@ -13765,8 +13603,6 @@ declare function qtparam(BASEURL: string, cookie: string): Promise<{
|
|
|
13765
13603
|
isvip: false;
|
|
13766
13604
|
}>;
|
|
13767
13605
|
|
|
13768
|
-
declare function wbi_sign(BASEURL: string | URL, cookie: string): Promise<string>;
|
|
13769
|
-
|
|
13770
13606
|
interface BilibiliRequest<T extends keyof BilibiliDataOptionsMap> extends Request {
|
|
13771
13607
|
query: {
|
|
13772
13608
|
[K in keyof OmitMethodType<BilibiliDataOptionsMap[T]['opt']>]: string;
|
|
@@ -13778,8 +13614,165 @@ interface BilibiliRequest<T extends keyof BilibiliDataOptionsMap> extends Reques
|
|
|
13778
13614
|
*/
|
|
13779
13615
|
declare const registerBilibiliRoutes: (cookie: string) => Router;
|
|
13780
13616
|
|
|
13781
|
-
|
|
13782
|
-
|
|
13617
|
+
type bilibiliUtilsModel = {
|
|
13618
|
+
/** 签名算法相关 */
|
|
13619
|
+
sign: {
|
|
13620
|
+
/** WBI签名算法 */
|
|
13621
|
+
wbi_sign: typeof wbi_sign;
|
|
13622
|
+
/** AV号转BV号 */
|
|
13623
|
+
av2bv: typeof av2bv;
|
|
13624
|
+
/** BV号转AV号 */
|
|
13625
|
+
bv2av: typeof bv2av;
|
|
13626
|
+
};
|
|
13627
|
+
/** 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据 */
|
|
13628
|
+
bilibiliApiUrls: typeof bilibiliApiUrls;
|
|
13629
|
+
/**
|
|
13630
|
+
* 快捷获取B站数据
|
|
13631
|
+
* @param type - 请求数据类型
|
|
13632
|
+
* @param cookie - 有效的用户Cookie
|
|
13633
|
+
* @param options - 请求参数,是一个对象
|
|
13634
|
+
* @returns 返回接口的原始数据
|
|
13635
|
+
*/
|
|
13636
|
+
getBilibiliData: typeof getBilibiliData;
|
|
13637
|
+
/**
|
|
13638
|
+
* B站相关 API 的命名空间。
|
|
13639
|
+
*
|
|
13640
|
+
* 部分接口可能不需要 Cookie 但建议传递有效的用户 Cookie,以获取更多数据。
|
|
13641
|
+
*
|
|
13642
|
+
* 提供了一系列方法,用于与B站相关的 API 进行交互。
|
|
13643
|
+
*
|
|
13644
|
+
* 每个方法都接受参数和 Cookie,返回 Promise,解析为接口返回的原始数据。
|
|
13645
|
+
*/
|
|
13646
|
+
api: typeof bilibili;
|
|
13647
|
+
};
|
|
13648
|
+
/** B站相关功能模块 (工具集) */
|
|
13649
|
+
declare const bilibiliUtils: bilibiliUtilsModel;
|
|
13650
|
+
|
|
13651
|
+
/**
|
|
13652
|
+
* 从 DouyinMethodOptionsMap 中提取特定 API 的选项类型,并移除 methodType,添加 TypeControl。
|
|
13653
|
+
* @template K - DouyinMethodOptionsMap 中的键名。
|
|
13654
|
+
*/
|
|
13655
|
+
type DouyinApiOptions<K extends keyof DouyinMethodOptionsMap> = Omit<DouyinMethodOptionsMap[K], 'methodType'> & TypeControl;
|
|
13656
|
+
/**
|
|
13657
|
+
* 根据传入的选项中的 typeMode 决定 Douyin API 的返回类型。
|
|
13658
|
+
* @template K - DouyinDataOptionsMap 中的键名。
|
|
13659
|
+
* @template T - 包含可选 typeMode 的选项对象。
|
|
13660
|
+
*/
|
|
13661
|
+
type DouyinApiReturn<K extends keyof DouyinDataOptionsMap, T extends TypeControl> = T['typeMode'] extends 'strict' ? DouyinDataOptionsMap[K]['data'] : any;
|
|
13662
|
+
/**
|
|
13663
|
+
* 封装了所有抖音相关的API请求,采用对象化的方式组织。
|
|
13664
|
+
*
|
|
13665
|
+
* 提供了一系列方法,用于与抖音相关的 API 进行交互。
|
|
13666
|
+
*
|
|
13667
|
+
* 每个方法都接受参数和 Cookie,返回 Promise,解析为接口返回的原始数据。
|
|
13668
|
+
*/
|
|
13669
|
+
declare const douyin: {
|
|
13670
|
+
/**
|
|
13671
|
+
* 聚合解析 (视频/图集/合辑)
|
|
13672
|
+
* @param options 请求参数,包含 aweme_id 和可选的 typeMode
|
|
13673
|
+
* @param cookie 有效的用户 Cookie
|
|
13674
|
+
* @returns 接口返回的原始数据
|
|
13675
|
+
*/
|
|
13676
|
+
getWorkInfo<T extends DouyinApiOptions<"WorkParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u805A\u5408\u89E3\u6790", T>>;
|
|
13677
|
+
/**
|
|
13678
|
+
* 获取视频作品数据
|
|
13679
|
+
* @param options 请求参数,包含 aweme_id 和可选的 typeMode
|
|
13680
|
+
* @param cookie 有效的用户 Cookie
|
|
13681
|
+
* @returns 接口返回的原始数据
|
|
13682
|
+
*/
|
|
13683
|
+
getVideoWorkInfo<T extends DouyinApiOptions<"VideoWorkParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u89C6\u9891\u4F5C\u54C1\u6570\u636E", T>>;
|
|
13684
|
+
/**
|
|
13685
|
+
* 获取图集作品数据
|
|
13686
|
+
* @param options 请求参数,包含 aweme_id 和可选的 typeMode
|
|
13687
|
+
* @param cookie 有效的用户 Cookie
|
|
13688
|
+
* @returns 接口返回的原始数据
|
|
13689
|
+
*/
|
|
13690
|
+
getImageAlbumWorkInfo<T extends DouyinApiOptions<"ImageAlbumWorkParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u56FE\u96C6\u4F5C\u54C1\u6570\u636E", T>>;
|
|
13691
|
+
/**
|
|
13692
|
+
* 获取合辑作品数据
|
|
13693
|
+
* @param options 请求参数,包含 aweme_id 和可选的 typeMode
|
|
13694
|
+
* @param cookie 有效的用户 Cookie
|
|
13695
|
+
* @returns 接口返回的原始数据
|
|
13696
|
+
*/
|
|
13697
|
+
getSlidesWorkInfo<T extends DouyinApiOptions<"SlidesWorkParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u5408\u8F91\u4F5C\u54C1\u6570\u636E", T>>;
|
|
13698
|
+
/**
|
|
13699
|
+
* 获取评论数据
|
|
13700
|
+
* @param options 请求参数,包含 aweme_id, 可选的 number, cursor 和 typeMode
|
|
13701
|
+
* @param cookie 有效的用户 Cookie
|
|
13702
|
+
* @returns 接口返回的原始数据
|
|
13703
|
+
*/
|
|
13704
|
+
getComments<T extends DouyinApiOptions<"CommentParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u8BC4\u8BBA\u6570\u636E", T>>;
|
|
13705
|
+
/**
|
|
13706
|
+
* 获取指定评论回复数据
|
|
13707
|
+
* @param options 请求参数,包含 aweme_id, comment_id, 可选的 number, cursor 和 typeMode
|
|
13708
|
+
* @param cookie 有效的用户 Cookie
|
|
13709
|
+
* @returns 接口返回的原始数据
|
|
13710
|
+
*/
|
|
13711
|
+
getCommentReplies<T extends DouyinApiOptions<"CommentReplyParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E", T>>;
|
|
13712
|
+
/**
|
|
13713
|
+
* 获取用户主页数据
|
|
13714
|
+
* @param options 请求参数,包含 sec_uid 和可选的 typeMode
|
|
13715
|
+
* @param cookie 有效的用户 Cookie
|
|
13716
|
+
* @returns 接口返回的原始数据
|
|
13717
|
+
*/
|
|
13718
|
+
getUserProfile<T extends DouyinApiOptions<"UserParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u7528\u6237\u4E3B\u9875\u6570\u636E", T>>;
|
|
13719
|
+
/**
|
|
13720
|
+
* 获取 Emoji 数据
|
|
13721
|
+
* @param options 可选的请求参数 (主要用于 typeMode)
|
|
13722
|
+
* @param cookie 可选的用户 Cookie
|
|
13723
|
+
* @returns 接口返回的原始数据
|
|
13724
|
+
*/
|
|
13725
|
+
getEmojiList<T extends DouyinApiOptions<"EmojiListParams">>(options: T, cookie?: string): Promise<DouyinApiReturn<"Emoji\u6570\u636E", T>>;
|
|
13726
|
+
/**
|
|
13727
|
+
* 获取动态表情数据
|
|
13728
|
+
* @param options 可选的请求参数 (主要用于 typeMode)
|
|
13729
|
+
* @param cookie 有效的用户 Cookie
|
|
13730
|
+
* @returns 接口返回的原始数据
|
|
13731
|
+
*/
|
|
13732
|
+
getEmojiProList<T extends DouyinApiOptions<"EmojiProParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u52A8\u6001\u8868\u60C5\u6570\u636E", T>>;
|
|
13733
|
+
/**
|
|
13734
|
+
* 获取用户主页视频列表数据
|
|
13735
|
+
* @param options 请求参数,包含 sec_uid, 可选的 number, max_cursor 和 typeMode
|
|
13736
|
+
* @param cookie 有效的用户 Cookie
|
|
13737
|
+
* @returns 接口返回的原始数据
|
|
13738
|
+
*/
|
|
13739
|
+
getUserVideos<T extends DouyinApiOptions<"UserParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E", T>>;
|
|
13740
|
+
/**
|
|
13741
|
+
* 获取音乐数据
|
|
13742
|
+
* @param options 请求参数,包含 music_id 和可选的 typeMode
|
|
13743
|
+
* @param cookie 有效的用户 Cookie
|
|
13744
|
+
* @returns 接口返回的原始数据
|
|
13745
|
+
*/
|
|
13746
|
+
getMusicInfo<T extends DouyinApiOptions<"MusicParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u97F3\u4E50\u6570\u636E", T>>;
|
|
13747
|
+
/**
|
|
13748
|
+
* 获取热点词数据
|
|
13749
|
+
* @param options 请求参数,包含 query, 可选的 number 和 typeMode
|
|
13750
|
+
* @param cookie 有效的用户 Cookie
|
|
13751
|
+
* @returns 接口返回的原始数据
|
|
13752
|
+
*/
|
|
13753
|
+
getSuggestWords<T extends DouyinApiOptions<"SearchParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u70ED\u70B9\u8BCD\u6570\u636E", T>>;
|
|
13754
|
+
/**
|
|
13755
|
+
* 获取搜索数据
|
|
13756
|
+
* @param options 请求参数,包含 query, 可选的 number, search_id, cursor 和 typeMode
|
|
13757
|
+
* @param cookie 有效的用户 Cookie
|
|
13758
|
+
* @returns 接口返回的原始数据
|
|
13759
|
+
*/
|
|
13760
|
+
search<T extends DouyinApiOptions<"SearchParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u641C\u7D22\u6570\u636E", T>>;
|
|
13761
|
+
/**
|
|
13762
|
+
* 获取直播间信息
|
|
13763
|
+
* @param options 请求参数,包含 sec_uid 和可选的 typeMode
|
|
13764
|
+
* @param cookie 有效的用户 Cookie
|
|
13765
|
+
* @returns 接口返回的原始数据
|
|
13766
|
+
*/
|
|
13767
|
+
getLiveRoomInfo<T extends DouyinApiOptions<"UserParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E", T>>;
|
|
13768
|
+
/**
|
|
13769
|
+
* 申请二维码数据
|
|
13770
|
+
* @param options 请求参数,包含 verify_fp 和可选的 typeMode
|
|
13771
|
+
* @param cookie 有效的用户 Cookie
|
|
13772
|
+
* @returns 接口返回的原始数据 (any)
|
|
13773
|
+
*/
|
|
13774
|
+
getLoginQrcode<T extends DouyinApiOptions<"QrcodeParams">>(options: T, cookie: string): Promise<DouyinApiReturn<"\u7533\u8BF7\u4E8C\u7EF4\u7801\u6570\u636E", T>>;
|
|
13775
|
+
};
|
|
13783
13776
|
|
|
13784
13777
|
type DouyinMethodOptionsWithoutMethodType = {
|
|
13785
13778
|
[K in keyof DouyinMethodOptionsMap]: OmitMethodType<DouyinMethodOptionsMap[K]>;
|
|
@@ -13799,15 +13792,32 @@ declare class DouyinAPI {
|
|
|
13799
13792
|
直播间信息(data: DouyinMethodOptionsWithoutMethodType['LiveRoomParams']): string;
|
|
13800
13793
|
申请二维码(data: DouyinMethodOptionsWithoutMethodType['QrcodeParams']): string;
|
|
13801
13794
|
}
|
|
13802
|
-
/**
|
|
13795
|
+
/**
|
|
13796
|
+
* 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据
|
|
13797
|
+
*
|
|
13798
|
+
* 缺少 `a_bougs` 参数,请自行生成拼接
|
|
13799
|
+
* @deprecated 即将废弃,请使用 douyinApiUrls
|
|
13800
|
+
*/
|
|
13803
13801
|
declare const douyinAPI: DouyinAPI;
|
|
13804
|
-
|
|
13805
|
-
|
|
13802
|
+
/**
|
|
13803
|
+
* 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据
|
|
13804
|
+
*
|
|
13805
|
+
* 缺少 `a_bougs` 参数,请自行生成拼接
|
|
13806
|
+
*/
|
|
13807
|
+
declare const douyinApiUrls: DouyinAPI;
|
|
13806
13808
|
|
|
13807
13809
|
declare class douyinSign {
|
|
13808
|
-
/**
|
|
13810
|
+
/**
|
|
13811
|
+
* 生成一个指定长度的随机字符串
|
|
13812
|
+
* @param length 字符串长度,默认为116
|
|
13813
|
+
* @returns
|
|
13814
|
+
*/
|
|
13809
13815
|
static Mstoken(length: number): string;
|
|
13810
|
-
/**
|
|
13816
|
+
/**
|
|
13817
|
+
* a_bogus 签名算法
|
|
13818
|
+
* @param url 需要签名的地址
|
|
13819
|
+
* @returns 对此地址签名后的URL查询参数
|
|
13820
|
+
*/
|
|
13811
13821
|
static AB(url: string): string;
|
|
13812
13822
|
/** 生成一个唯一的验证字符串 */
|
|
13813
13823
|
static VerifyFpManager(): string;
|
|
@@ -13824,6 +13834,73 @@ interface DouyinRequest<T extends keyof DouyinDataOptionsMap> extends Request {
|
|
|
13824
13834
|
*/
|
|
13825
13835
|
declare const registerDouyinRoutes: (cookie: string) => Router;
|
|
13826
13836
|
|
|
13837
|
+
type douyinUtilsModel = {
|
|
13838
|
+
/** 签名算法相关 */
|
|
13839
|
+
sign: typeof douyinSign;
|
|
13840
|
+
/**
|
|
13841
|
+
* 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据
|
|
13842
|
+
*
|
|
13843
|
+
* 缺少 `a_bougs` 参数,请自行生成拼接
|
|
13844
|
+
*/
|
|
13845
|
+
douyinApiUrls: typeof douyinApiUrls;
|
|
13846
|
+
/**
|
|
13847
|
+
* 快捷获取抖音数据
|
|
13848
|
+
* @param type - 请求数据类型
|
|
13849
|
+
* @param cookie - 有效的用户Cookie
|
|
13850
|
+
* @param options - 请求参数,是一个对象
|
|
13851
|
+
* @returns 返回接口的原始数据
|
|
13852
|
+
*/
|
|
13853
|
+
getDouyinData: typeof getDouyinData;
|
|
13854
|
+
/**
|
|
13855
|
+
* 封装了所有抖音相关的API请求,采用对象化的方式组织。
|
|
13856
|
+
*
|
|
13857
|
+
* 提供了一系列方法,用于与抖音相关的 API 进行交互。
|
|
13858
|
+
*
|
|
13859
|
+
* 每个方法都接受参数和 Cookie,返回 Promise,解析为接口返回的原始数据。
|
|
13860
|
+
*/
|
|
13861
|
+
api: typeof douyin;
|
|
13862
|
+
};
|
|
13863
|
+
/** 抖音相关功能模块 (工具集) */
|
|
13864
|
+
declare const douyinUtils: douyinUtilsModel;
|
|
13865
|
+
|
|
13866
|
+
/**
|
|
13867
|
+
* 从 KuaishouMethodOptionsMap 中提取特定 API 的选项类型,并移除 methodType,添加 TypeControl。
|
|
13868
|
+
* @template K - KuaishouMethodOptionsMap 中的键名。
|
|
13869
|
+
*/
|
|
13870
|
+
type KuaishouApiOptions<K extends keyof KuaishouMethodOptionsMap> = Omit<KuaishouMethodOptionsMap[K], 'methodType'> & TypeControl;
|
|
13871
|
+
/**
|
|
13872
|
+
* 根据传入的选项中的 typeMode 决定 Kuaishou API 的返回类型。
|
|
13873
|
+
* @template K - KuaishouDataOptionsMap 中的键名。
|
|
13874
|
+
* @template T - 包含可选 typeMode 的选项对象。
|
|
13875
|
+
*/
|
|
13876
|
+
type KuaishouApiReturn<K extends keyof KuaishouDataOptionsMap, T extends TypeControl> = T['typeMode'] extends 'strict' ? KuaishouDataOptionsMap[K]['data'] : any;
|
|
13877
|
+
/**
|
|
13878
|
+
* 快手相关 API 的命名空间。
|
|
13879
|
+
*/
|
|
13880
|
+
declare const kuaishou: {
|
|
13881
|
+
/**
|
|
13882
|
+
* 获取单个视频作品数据
|
|
13883
|
+
* @param options 请求参数,包含 photoId 和可选的 typeMode
|
|
13884
|
+
* @param cookie 可选的用户 Cookie
|
|
13885
|
+
* @returns 接口返回的原始数据
|
|
13886
|
+
*/
|
|
13887
|
+
getWorkInfo<T extends KuaishouApiOptions<"VideoInfoParams">>(options: T, cookie?: string): Promise<KuaishouApiReturn<"\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E", T>>;
|
|
13888
|
+
/**
|
|
13889
|
+
* 获取评论数据
|
|
13890
|
+
* @param options 请求参数,包含 photoId 和可选的 typeMode
|
|
13891
|
+
* @param cookie 可选的用户 Cookie
|
|
13892
|
+
* @returns 接口返回的原始数据
|
|
13893
|
+
*/
|
|
13894
|
+
getComments<T extends KuaishouApiOptions<"CommentParams">>(options: T, cookie?: string): Promise<KuaishouApiReturn<"\u8BC4\u8BBA\u6570\u636E", T>>;
|
|
13895
|
+
/**
|
|
13896
|
+
* 获取 Emoji 数据
|
|
13897
|
+
* @param options 可选的请求参数 (主要用于 typeMode)
|
|
13898
|
+
* @param cookie 可选的用户 Cookie
|
|
13899
|
+
* @returns 接口返回的原始数据
|
|
13900
|
+
*/
|
|
13901
|
+
getEmojiList<T extends KuaishouApiOptions<"EmojiListParams">>(options: T, cookie?: string): Promise<KuaishouApiReturn<"Emoji\u6570\u636E", T>>;
|
|
13902
|
+
};
|
|
13903
|
+
|
|
13827
13904
|
type KuaishouMethodOptionsWithoutMethodType = {
|
|
13828
13905
|
[K in keyof KuaishouMethodOptionsMap]: OmitMethodType<KuaishouMethodOptionsMap[K]>;
|
|
13829
13906
|
};
|
|
@@ -13866,10 +13943,19 @@ declare class API {
|
|
|
13866
13943
|
query: string;
|
|
13867
13944
|
};
|
|
13868
13945
|
};
|
|
13869
|
-
}
|
|
13946
|
+
}
|
|
13947
|
+
/**
|
|
13948
|
+
* 该类下的所有方法只会返回拼接好参数后的 Url 地址和请求体,需要手动请求该地址以获取数据
|
|
13949
|
+
* @deprecated: 即将废弃,请使用 kuaishouAPI 代替
|
|
13950
|
+
*/
|
|
13870
13951
|
declare const KuaishouAPI: API;
|
|
13871
|
-
|
|
13872
|
-
|
|
13952
|
+
/**
|
|
13953
|
+
* 该类下的所有方法只会返回拼接好参数后的 Url 地址和请求体,需要手动请求该地址以获取数据
|
|
13954
|
+
* @deprecated 即将废弃,请使用 kuaishouApiUrls
|
|
13955
|
+
*/
|
|
13956
|
+
declare const kuaishouAPI: API;
|
|
13957
|
+
/** 该类下的所有方法只会返回拼接好参数后的 Url 地址和请求体,需要手动请求该地址以获取数据 */
|
|
13958
|
+
declare const kuaishouApiUrls: API;
|
|
13873
13959
|
|
|
13874
13960
|
interface KusiahouRequest<T extends keyof KuaishouDataOptionsMap> extends Request {
|
|
13875
13961
|
query: {
|
|
@@ -13882,7 +13968,30 @@ interface KusiahouRequest<T extends keyof KuaishouDataOptionsMap> extends Reques
|
|
|
13882
13968
|
*/
|
|
13883
13969
|
declare const registerKuaishouRoutes: (cookie: string) => Router;
|
|
13884
13970
|
|
|
13885
|
-
type
|
|
13971
|
+
type kuaishouUtilsModel = {
|
|
13972
|
+
/** 该类下的所有方法只会返回拼接好参数后的 Url 地址和请求体,需要手动请求该地址以获取数据 */
|
|
13973
|
+
kuaishouApiUrls: typeof kuaishouApiUrls;
|
|
13974
|
+
/**
|
|
13975
|
+
* 快捷获取快手数据
|
|
13976
|
+
* @param type - 请求数据类型
|
|
13977
|
+
* @param cookie - 有效的用户Cookie
|
|
13978
|
+
* @param options - 请求参数,是一个对象
|
|
13979
|
+
* @returns 返回接口的原始数据
|
|
13980
|
+
*/
|
|
13981
|
+
getKuaishouData: typeof getKuaishouData;
|
|
13982
|
+
/**
|
|
13983
|
+
* 封装了所有快手相关的API请求,采用对象化的方式组织。
|
|
13984
|
+
*
|
|
13985
|
+
* 提供了一系列方法,用于与抖音相关的 API 进行交互。
|
|
13986
|
+
*
|
|
13987
|
+
* 每个方法都接受参数和 Cookie,返回 Promise,解析为接口返回的原始数据。
|
|
13988
|
+
*/
|
|
13989
|
+
api: typeof kuaishou;
|
|
13990
|
+
};
|
|
13991
|
+
/** 快手相关功能模块 (工具集) */
|
|
13992
|
+
declare const kuaishouUtils: kuaishouUtilsModel;
|
|
13993
|
+
|
|
13994
|
+
type cookiesOptions = {
|
|
13886
13995
|
/**
|
|
13887
13996
|
* 抖音ck
|
|
13888
13997
|
* @defaultValue ''
|
|
@@ -13899,7 +14008,7 @@ type ckParams = {
|
|
|
13899
14008
|
*/
|
|
13900
14009
|
kuaishou?: string;
|
|
13901
14010
|
};
|
|
13902
|
-
declare class
|
|
14011
|
+
declare class amagiClient {
|
|
13903
14012
|
private douyin;
|
|
13904
14013
|
private bilibili;
|
|
13905
14014
|
private kuaishou;
|
|
@@ -13907,7 +14016,7 @@ declare class amagi {
|
|
|
13907
14016
|
*
|
|
13908
14017
|
* @param cookie - 包含抖音ck、B站ck、快手ck的对象
|
|
13909
14018
|
*/
|
|
13910
|
-
constructor(
|
|
14019
|
+
constructor(options: cookiesOptions);
|
|
13911
14020
|
/**
|
|
13912
14021
|
* 启动本地 HTTP 服务
|
|
13913
14022
|
* @param port - 监听端口
|
|
@@ -13916,68 +14025,39 @@ declare class amagi {
|
|
|
13916
14025
|
*/
|
|
13917
14026
|
startClient(port?: number): express.Application;
|
|
13918
14027
|
/**
|
|
13919
|
-
*
|
|
14028
|
+
* 快捷获取抖音数据
|
|
13920
14029
|
* @param type - 请求数据类型
|
|
13921
14030
|
* @param options - 请求参数,是一个对象
|
|
13922
14031
|
* @returns 返回接口的原始数据
|
|
13923
|
-
* @example
|
|
13924
|
-
* ```ts
|
|
13925
|
-
* import Client from '@ikenxuan/amagi'
|
|
13926
|
-
*
|
|
13927
|
-
* const amagi = new Client({
|
|
13928
|
-
* douyin: '' // 有效的抖音ck
|
|
13929
|
-
* })
|
|
13930
|
-
* const data = await amagi.getDouyinData('搜索数据', {
|
|
13931
|
-
* query: '114514',
|
|
13932
|
-
* number: 10
|
|
13933
|
-
* })
|
|
13934
|
-
* ```
|
|
13935
14032
|
*/
|
|
13936
14033
|
getDouyinData: <T extends keyof DouyinDataOptionsMap, R extends "strict" | "loose">(methodType: T, options?: DouyinDataOptions<T> & {
|
|
13937
14034
|
typeMode?: R;
|
|
13938
14035
|
}) => Promise<R extends "strict" ? DouyinDataOptionsMap[T]["data"] : any>;
|
|
13939
14036
|
/**
|
|
13940
|
-
*
|
|
14037
|
+
* 快捷获取B站数据
|
|
13941
14038
|
* @param type - 请求数据类型
|
|
13942
14039
|
* @param options - 请求参数,是一个对象
|
|
13943
14040
|
* @returns 返回接口的原始数据
|
|
13944
|
-
* @example
|
|
13945
|
-
* ```ts
|
|
13946
|
-
* import Client from '@ikenxuan/amagi'
|
|
13947
|
-
*
|
|
13948
|
-
* const amagi = new Client({
|
|
13949
|
-
* bilibili: '' // 有效的B站ck
|
|
13950
|
-
* })
|
|
13951
|
-
* const data = await amagi.getBilibiliData('单个视频作品数据', {
|
|
13952
|
-
* bvid: 'BV1fK4y1q79u'
|
|
13953
|
-
* })
|
|
13954
|
-
* ```
|
|
13955
14041
|
*/
|
|
13956
14042
|
getBilibiliData: <T extends keyof BilibiliDataOptionsMap, R extends "strict" | "loose">(methodType: T, options?: BilibiliDataOptions<T> & {
|
|
13957
14043
|
typeMode?: R;
|
|
13958
14044
|
}) => Promise<R extends "strict" ? BilibiliDataOptionsMap[T]["data"] : any>;
|
|
13959
14045
|
/**
|
|
13960
|
-
*
|
|
14046
|
+
* 快捷获取快手数据
|
|
13961
14047
|
* @param type - 请求数据类型
|
|
13962
14048
|
* @param options - 请求参数,是一个对象
|
|
13963
14049
|
* @returns 返回接口的原始数据
|
|
13964
|
-
* @example
|
|
13965
|
-
* ```ts
|
|
13966
|
-
* import Client from '@ikenxuan/amagi'
|
|
13967
|
-
*
|
|
13968
|
-
* const amagi = new Client({
|
|
13969
|
-
* kuaishou: '' // 有效的快手ck
|
|
13970
|
-
* })
|
|
13971
|
-
* const data = await amagi.getKuaishouData('单个视频作品数据', {
|
|
13972
|
-
* photoId: '3xdpv6sfi8yjsqy'
|
|
13973
|
-
* })
|
|
13974
|
-
* ```
|
|
13975
14050
|
*/
|
|
13976
14051
|
getKuaishouData: <T extends keyof KuaishouDataOptionsMap, R extends "strict" | "loose">(methodType: T, options?: KuaishouDataOptions<T> & {
|
|
13977
14052
|
typeMode?: R;
|
|
13978
14053
|
}) => Promise<R extends "strict" ? KuaishouDataOptionsMap[T]["data"] : any>;
|
|
13979
14054
|
}
|
|
13980
14055
|
|
|
13981
|
-
|
|
14056
|
+
/** amagi 的构造函数类型 */
|
|
14057
|
+
type AmagiConstructor = {
|
|
14058
|
+
new (options: cookiesOptions): amagiClient;
|
|
14059
|
+
(options: cookiesOptions): amagiClient;
|
|
14060
|
+
};
|
|
14061
|
+
declare const Client: AmagiConstructor;
|
|
13982
14062
|
|
|
13983
|
-
export {
|
|
14063
|
+
export { type AmagiConstructor, type BiliAv2Bv, type BiliBangumiVideoInfo, type BiliBangumiVideoPlayurlIsLogin, type BiliBangumiVideoPlayurlNoLogin, type BiliBiliVideoPlayurlNoLogin, type BiliBv2AV, type BiliCheckQrcode, type BiliDynamicCard, type BiliDynamicInfo, type BiliEmojiList, type BiliLiveRoomDef, type BiliLiveRoomDetail, type BiliNewLoginQrcode, type BiliOneWork, type BiliUserDynamic, type BiliUserFullView, type BiliUserProfile, type BiliVideoPlayurlIsLogin, type BiliWorkComments, type BilibiliDataOptions, type BilibiliDataOptionsMap, type BilibiliMethodOptionsMap, type BilibiliRequest, BilibiliValidateData, Client, type DouyinDataOptions, type DouyinDataOptionsMap, type DouyinMethodOptionsMap, type DouyinRequest, DouyinValidateData, type DyEmojiList, type DyEmojiProList, type DyImageAlbumWork, type DyMusicWork, type DySearchInfo, type DySlidesWork, type DySuggestWords, type DyUserInfo, type DyUserLiveVideos, type DyUserPostVideos, type DyVideoWork, type DyWorkComments, type KsEmojiList, type KsOneWork, type KsWorkComments, KuaishouAPI, type KuaishouDataOptions, type KuaishouDataOptionsMap, type KuaishouMethodOptionsMap, type KusiahouRequest, KusiahouValidateData, Networks, type NetworksConfigType, type OmitMethodType, type TypeControl, amagiClient, av2bv, bilibili, bilibiliAPI, bilibiliApiUrls, bilibiliUtils, bv2av, type cookiesOptions, Client as default, douyin, douyinAPI, douyinApiUrls, douyinSign, douyinUtils, fetchBilibiliData, fetchDouyinData, fetchKuaishouData, getBilibiliData, getDouyinData, getKuaishouData, kuaishou, kuaishouAPI, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, registerBilibiliRoutes, registerDouyinRoutes, registerKuaishouRoutes, wbi_sign };
|