-
Notifications
You must be signed in to change notification settings - Fork 9
/
tweet.yaml
329 lines (318 loc) · 8.08 KB
/
tweet.yaml
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths: {}
components:
schemas:
TweetUnion:
oneOf:
- $ref: "#/components/schemas/Tweet"
- $ref: "#/components/schemas/TweetWithVisibilityResults"
- $ref: "#/components/schemas/TweetTombstone"
discriminator:
propertyName: __typename
mapping": # deprecated
Tweet: "#/components/schemas/Tweet"
TweetWithVisibilityResults: "#/components/schemas/TweetWithVisibilityResults"
TweetTombstone: "#/components/schemas/TweetTombstone"
TweetWithVisibilityResults:
required:
- "__typename"
- "tweet"
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
tweet:
$ref: "#/components/schemas/Tweet"
TweetTombstone: #remove tweet
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
# todo
Tweet:
required:
- "rest_id"
- "core"
- "edit_control"
# - "edit_prespective"
- "is_translatable"
- "legacy"
- "views"
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # null | Tweet
rest_id:
type: string
pattern: "^[0-9]+$"
core:
$ref: "./user.yaml#/components/schemas/UserResultCore"
card:
type: object
properties:
rest_id:
type: string
legacy:
type: object
required:
- "binding_values"
- "name"
- "url"
properties:
name:
type: string
url:
type: string
binding_values:
type: array
items:
type: object
required:
- "key"
- "value"
properties:
key:
type: string
value:
type: object
required:
- "type"
properties:
string_value:
type: string
boolean_value:
type: boolean
scribe_key:
type: string
type:
type: string
unmention_data:
type: object # todo
edit_control:
type: object
properties:
edit_tweet_ids:
type: array
items:
type: string
pattern: "^[0-9]+$"
editable_until_msecs:
type: string
pattern: "^[0-9]+$"
is_edit_eligible:
type: boolean
edits_remaining:
type: string
pattern: "^[0-9]+$"
edit_prespective:
type: object
properties:
favorited:
type: boolean
retweeted:
type: boolean
is_translatable:
type: boolean
default: false
legacy:
$ref: "#/components/schemas/TweetLegacy"
views:
type: object
properties:
count:
type: string
pattern: "^[0-9]+$"
state:
type: string # enum
quoted_status_result:
$ref: "./content.yaml#/components/schemas/ItemResult"
TweetLegacy:
required:
- "bookmark_count"
- "bookmarked"
- "conversation_id_str"
- "created_at"
- "display_text_range"
- "entities"
- "favorite_count"
- "favorited"
- "full_text"
- "is_quote_status"
- "lang"
- "quote_count"
- "reply_count"
- "retweet_count"
- "retweeted"
- "user_id_str"
- "id_str"
properties:
bookmark_count:
type: integer
bookmarked:
type: boolean
created_at:
$ref: "./general.yaml#/components/schemas/TwitterTimeFormat"
conversation_id_str:
type: string
pattern: "^[0-9]+$"
display_text_range:
type: array
items:
type: integer
entities:
$ref: "#/components/schemas/Entities"
favorite_count:
type: integer
favorited:
type: boolean
full_text:
type: string
is_quote_status:
type: boolean
lang:
type: string # enum
possibly_sensitive:
type: boolean
default: false
possibly_sensitive_editable:
type: boolean
default: false
quote_count:
type: integer
reply_count:
type: integer
retweet_count:
type: integer
retweeted:
type: boolean
retweeted_status_result:
$ref: "./content.yaml#/components/schemas/ItemResult"
user_id_str:
type: string
pattern: "^[0-9]+$"
id_str:
type: string
pattern: "^[0-9]+$"
self_thread:
type: object
required:
- "id_str"
properties:
id_str:
type: string
pattern: "^[0-9]+$"
extended_entities:
$ref: "#/components/schemas/ExtendedEntities"
Entities:
required:
- "hashtags"
- "symbols"
- "user_mentions"
- "urls"
# - "media"
properties:
hashtags:
type: array
items:
$ref: "#/components/schemas/Hashtag"
symbols:
type: array
items:
$ref: "#/components/schemas/Symbol"
user_mentions:
type: array
items:
$ref: "#/components/schemas/UserMention"
urls:
type: array
items:
$ref: "#/components/schemas/Url"
media:
type: array
items:
$ref: "#/components/schemas/Media"
Hashtag:
type: object # todo
Symbol:
type: object # todo
UserMention:
type: object # todo
Url:
type: object
required:
- "url"
- "indices"
- "expanded_url"
- "display_url"
properties:
display_url:
type: string
expanded_url:
type: string
format: uri
url:
type: string
format: uri
indices:
type: array
items:
type: integer
ExtendedEntities:
required:
- "media"
properties:
media:
type: array
items:
$ref: "#/components/schemas/Media"
Media:
required:
- "id_str"
- "indices"
- "media_url_https"
- "url"
- "display_url"
- "expanded_url"
- "type"
- "sizes"
- "original_info"
properties:
id_str:
type: string
pattern: "^[0-9]+$"
indices:
type: array
items:
type: integer
media_url_https:
type: string
format: uri
url:
type: string
format: uri
display_url:
type: string
format: uri
expanded_url:
type: string
format: uri
type:
type: string # enum
sizes:
type: object # todo
original_info:
type: object
properties:
height:
type: integer
width:
type: integer
focus_rects:
type: array
items:
type: object # todo
media_key:
type: string
pattern: "^[0-9]+_[0-9]+$"
ext_media_availability:
type: object # todo