Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
615 changes: 341 additions & 274 deletions dist/compatible/openapi-3.0.yaml

Large diffs are not rendered by default.

362 changes: 306 additions & 56 deletions dist/docs/openapi-3.0.yaml

Large diffs are not rendered by default.

115 changes: 83 additions & 32 deletions src/config/placeholder.json

Large diffs are not rendered by default.

63 changes: 61 additions & 2 deletions src/openapi/schemas/content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ components:
type: object
additionalProperties: true # todo
clientEventInfo:
type: object
additionalProperties: true # todo
$ref: "#/components/schemas/ClientEventInfo"
metadata:
type: object
additionalProperties: true # todo
Expand Down Expand Up @@ -150,6 +149,8 @@ components:
type: array
items:
type: string
clientEventInfo:
$ref: "#/components/schemas/ClientEventInfo"

# ================= ContentItem =================

Expand All @@ -161,6 +162,7 @@ components:
- $ref: "#/components/schemas/TimelinePrompt"
- $ref: "#/components/schemas/TimelineMessagePrompt"
- $ref: "#/components/schemas/TimelineCommunity"
- $ref: "#/components/schemas/TimelineTombstone"

discriminator:
propertyName: __typename
Expand All @@ -171,6 +173,7 @@ components:
TimelinePrompt: "#/components/schemas/TimelinePrompt"
TimelineMessagePrompt: "#/components/schemas/TimelineMessagePrompt"
TimelineCommunity: "#/components/schemas/TimelineCommunity"
TimelineTombstone: "#/components/schemas/TimelineTombstone"

ContentItemType:
type: string
Expand All @@ -182,6 +185,7 @@ components:
TimelinePrompt,
TimelineMessagePrompt,
TimelineCommunity,
TimelineTombstone,
]

TimelineTweet:
Expand Down Expand Up @@ -391,3 +395,58 @@ components:
details:
type: object
additionalProperties: true # todo

TimelineTombstone:
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTombstone
itemType:
$ref: "#/components/schemas/ContentItemType" # TimelineTombstone
tombstoneDisplayType:
type: string
enum: [Inline]
tombstoneInfo:
$ref: "#/components/schemas/TombstoneInfo"

TombstoneInfo:
type: object
properties:
text:
type: string
richText:
$ref: "#/components/schemas/TombstoneRichText"

TombstoneRichText:
type: object
properties:
rtl:
type: boolean
text:
type: string
entities:
type: array
items:
$ref: "#/components/schemas/TombstoneEntity"

TombstoneEntity:
type: object
properties:
fromIndex:
type: integer
toIndex:
type: integer
ref:
$ref: "#/components/schemas/TombstoneRef"

TombstoneRef:
type: object
properties:
type:
type: string
enum: [TimelineUrl]
url:
type: string
format: uri
urlType:
type: string
enum: [ExternalUrl]
2 changes: 2 additions & 0 deletions src/openapi/schemas/tweet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ components:
type: string
grok_share_attachment:
$ref: "#/components/schemas/GrokShareAttachment"
grok_analysis_button:
type: boolean

TweetEditControl:
properties:
Expand Down
1 change: 1 addition & 0 deletions src/openapi/schemas/typename.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ components:
TimelinePrompt,
TimelineMessagePrompt,
TimelineCommunity,
TimelineTombstone,
TweetUnavailable,
TweetPreviewDisplay,
Tweet,
Expand Down
3 changes: 3 additions & 0 deletions src/openapi/schemas/user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ components:
type: boolean
has_hidden_subscriptions_on_profile:
type: boolean
parody_commentary_fan_label:
type: string
enum: ["None", "Parody"]

UserProfessional:
required:
Expand Down
4 changes: 3 additions & 1 deletion test/python/test_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def error_dump(e):
else:
commands = ["python -m pip install tweepy_authlib", "python tools/login.py"]
raise Exception(
f'cookie.json not found. Please run `{"; ".join(commands)}` first.'
f"cookie.json not found. Please run `{'; '.join(commands)}` first."
)

if isinstance(cookies, list):
Expand Down Expand Up @@ -386,6 +386,8 @@ def error_dump(e):
"1862405433639804958",
"1869983867521904840",
"1875050002046726519",
"1848219562136801480",
"1881993128288399684",
]
for id in ids:
try:
Expand Down