This repository has been archived by the owner on Sep 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 279
/
post.d.ts
199 lines (142 loc) · 4.69 KB
/
post.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
import { CommonUserDetails } from './user';
import {
BaseResponseData,
CursorOffsetRequestParams,
CursorOffsetResponseParams,
ListRequestParams,
ListResponseData,
} from './request';
import { MusicTrack } from './music';
import { Video } from './video';
export interface GetPostResponse extends BaseResponseData {
aweme_detail: Post;
}
export interface ListPostsRequest extends ListRequestParams, CursorOffsetRequestParams {
/** The id of the user whose posts to retrieve */
user_id: string;
}
export interface ListPostsResponse extends ListResponseData, CursorOffsetResponseParams {
aweme_list: Post[];
}
export interface Post {
/** Details about the author */
author: CommonUserDetails;
/** The ID of the author */
author_user_id: string;
/** The ID of the post */
aweme_id: string;
/** The type of post - 0 for a musical.ly */
aweme_type: number;
/** The timestamp in seconds when the post was created */
create_time: number;
/** A description of the post */
desc: string;
/** Details about the music used in the post */
music: MusicTrack;
/** True if the end user should not be provided the option to download the video */
prevent_download: boolean;
/** An age rating for the post, e.g. 12 */
rate: number;
/** The 2-letter region the post was created in, e.g. US */
region: string;
/** Risk information about the post */
risk_infos: RiskInfo;
/** Information used when sharing the post */
share_info: ShareInfo;
/** A link to the video on the musical.ly website that is used when sharing */
share_url: string;
/** Statistics about the post */
statistics: PostStatistics;
/** Status information about the post */
status: PostStatus;
/** Information about the sticker used in the post */
sticker_detail: StickerInfo;
/** The ID of the sticker used in the post (looks to be deprecated by sticker_detail) */
stickers: string;
/** Tagged users and hashtags used in the description */
text_extra: PostTags[];
/** 1 if the logged in user has liked this post */
user_digged: number;
/** Details about the video in the post */
video: Video;
}
export interface PostStatistics {
/** The ID of the post */
aweme_id: string;
/** The number of comments on the post */
comment_count: number;
/** The number of times the post has been liked */
digg_count: number;
/** The number of times the post has been forwarded (looks unused?) */
forward_count: number;
/** The number of times the post has been viewed - doesn't appear to be public, so always 0 */
play_count: number;
/** The number of times the post has been shared */
share_count: number;
}
export interface PostStatus {
/** True if the post allows comments */
allow_comment: boolean;
/** True if the post allows sharing */
allow_share: boolean;
/** 0 if the post can be downloaded */
download_status: 0 | 1;
/** True if the post is currently being reviewed */
in_reviewing: boolean;
/** True if the post has been deleted */
is_delete: boolean;
/** True if the post is private */
is_private: boolean;
/** True if the post contains content that is not allowed on the platform */
is_prohibited: boolean;
/** 0 if the post is public */
private_status: 0 | 1;
/** 1 if the post has been reviewed */
reviewed: 0 | 1;
}
export interface PostTags {
/** 0 if the tag is for a user; 1 if the tag is for a hashtag */
type: number;
/** The name of the hashtag */
hashtag_name?: string;
/** The ID of the tagged user */
user_id?: string;
}
export interface RiskInfo {
/** The text shown if the post has been flagged */
content: string;
/** ??? */
risk_sink: false;
/** The risk type associated with the post - 0 if no risk; 1 if low; 2 if high */
type: number;
/** ??? - only present if the post has been flagged */
vote?: boolean;
/** True if a warning should be shown to the user */
warn: boolean;
}
export interface ShareInfo {
/** ??? */
bool_persist: number;
/** The description used when sharing (if set) */
share_desc: string;
/** The description used when sharing a link only (if set) */
share_link_desc: string;
/** The quote used when sharing (if set) */
share_quote: string;
/** The signature used when sharing (if set) */
share_signature_desc: string;
/** The signature URL used when sharing (if set) */
share_signature_url: string;
/** The title used when sharing */
share_title: string;
/** The link to share */
share_url: string;
/** The description used when sharing on Weibo */
share_weibo_desc: string;
}
export interface StickerInfo {
/** The ID of the sticker, e.g. 22094 */
id: string;
/** The display name of the sticker, e.g. Long Face */
name: string;
}