mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
update schema
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
a82844dfa5
commit
755990f3d0
5 changed files with 113 additions and 4 deletions
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
|
|
@ -28,7 +28,7 @@
|
||||||
"env": {
|
"env": {
|
||||||
"ERROR_UNCATCHED": "True",
|
"ERROR_UNCATCHED": "True",
|
||||||
"STRICT_MODE": "True",
|
"STRICT_MODE": "True",
|
||||||
"MULTI_THREAD": "False"
|
"MULTI_THREAD": "True"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,8 @@ components:
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: true # todo
|
additionalProperties: true # todo
|
||||||
|
feedbackInfo:
|
||||||
|
$ref: "#/components/schemas/FeedbackInfo"
|
||||||
|
|
||||||
TimelineTimelineCursor:
|
TimelineTimelineCursor:
|
||||||
required:
|
required:
|
||||||
|
|
@ -131,6 +133,15 @@ components:
|
||||||
itemContent:
|
itemContent:
|
||||||
$ref: "#/components/schemas/ItemContentUnion"
|
$ref: "#/components/schemas/ItemContentUnion"
|
||||||
|
|
||||||
|
FeedbackInfo:
|
||||||
|
required:
|
||||||
|
- "feedbackType"
|
||||||
|
properties:
|
||||||
|
feedbackKeys:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
|
||||||
# ================= ContentItem =================
|
# ================= ContentItem =================
|
||||||
|
|
||||||
ItemContentUnion:
|
ItemContentUnion:
|
||||||
|
|
@ -218,7 +229,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
contextType:
|
contextType:
|
||||||
type: string # enum
|
type: string # enum
|
||||||
enum: ["Follow"]
|
enum: ["Follow", "Pin"]
|
||||||
text:
|
text:
|
||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,85 @@ components:
|
||||||
limitedActionResults:
|
limitedActionResults:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: true # todo
|
additionalProperties: true # todo
|
||||||
|
tweetInterstitial:
|
||||||
|
$ref: "#/components/schemas/TweetInterstitial"
|
||||||
|
|
||||||
|
# {'__typename': 'ContextualTweetInterstitial', 'displayType': 'NonCompliant', 'text': {'rtl': False, 'text': 'This Post violated the X Rules. However, X has determined that it may be in the public’s interest for the Post to remain accessible. Learn more', 'entities': [{'fromIndex': 133, 'toIndex': 143, 'ref': {'type': 'TimelineUrl', 'url': 'https://help.twitter.com/rules-and-policies/public-interest', 'urlType': 'ExternalUrl'}}]}, 'revealText': {'rtl': False, 'text': 'View', 'entities': []}}
|
||||||
|
TweetInterstitial:
|
||||||
|
required:
|
||||||
|
- "__typename"
|
||||||
|
- "displayType"
|
||||||
|
- "text"
|
||||||
|
- "revealText"
|
||||||
|
properties:
|
||||||
|
__typename:
|
||||||
|
$ref: "./typename.yaml#/components/schemas/TypeName" # ContextualTweetInterstitial
|
||||||
|
displayType:
|
||||||
|
type: string
|
||||||
|
enum: [NonCompliant]
|
||||||
|
text:
|
||||||
|
$ref: "#/components/schemas/TweetInterstitialText"
|
||||||
|
revealText:
|
||||||
|
$ref: "#/components/schemas/TweetInterstitialRevealText"
|
||||||
|
|
||||||
|
TweetInterstitialText:
|
||||||
|
required:
|
||||||
|
- "rtl"
|
||||||
|
- "text"
|
||||||
|
- "entities"
|
||||||
|
properties:
|
||||||
|
rtl:
|
||||||
|
type: boolean
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
entities:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/TweetInterstitialTextEntity"
|
||||||
|
|
||||||
|
TweetInterstitialTextEntity:
|
||||||
|
required:
|
||||||
|
- "fromIndex"
|
||||||
|
- "toIndex"
|
||||||
|
- "ref"
|
||||||
|
properties:
|
||||||
|
fromIndex:
|
||||||
|
type: integer
|
||||||
|
toIndex:
|
||||||
|
type: integer
|
||||||
|
ref:
|
||||||
|
$ref: "#/components/schemas/TweetInterstitialTextEntityRef"
|
||||||
|
|
||||||
|
TweetInterstitialTextEntityRef:
|
||||||
|
required:
|
||||||
|
- "type"
|
||||||
|
- "url"
|
||||||
|
- "urlType"
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
enum: [TimelineUrl]
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
urlType:
|
||||||
|
type: string
|
||||||
|
enum: [ExternalUrl]
|
||||||
|
|
||||||
|
TweetInterstitialRevealText:
|
||||||
|
required:
|
||||||
|
- "rtl"
|
||||||
|
- "text"
|
||||||
|
- "entities"
|
||||||
|
properties:
|
||||||
|
rtl:
|
||||||
|
type: boolean
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
entities:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/TweetInterstitialTextEntity"
|
||||||
|
|
||||||
TweetTombstone: #remove tweet
|
TweetTombstone: #remove tweet
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -557,6 +636,8 @@ components:
|
||||||
iconType:
|
iconType:
|
||||||
type: string
|
type: string
|
||||||
enum: [BirdwatchV1Icon]
|
enum: [BirdwatchV1Icon]
|
||||||
|
callToAction:
|
||||||
|
$ref: "#/components/schemas/BirdwatchPivotCallToAction"
|
||||||
|
|
||||||
BirdwatchPivotFooter:
|
BirdwatchPivotFooter:
|
||||||
required:
|
required:
|
||||||
|
|
@ -619,6 +700,21 @@ components:
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/BirdwatchEntity"
|
$ref: "#/components/schemas/BirdwatchEntity"
|
||||||
|
|
||||||
|
BirdwatchPivotCallToAction:
|
||||||
|
# {'prompt': 'Do you find this helpful?', 'title': 'Rate it', 'destinationUrl': 'https://twitter.com/i/birdwatch/n/1710821689636934115'}
|
||||||
|
required:
|
||||||
|
- "prompt"
|
||||||
|
- "title"
|
||||||
|
- "destinationUrl"
|
||||||
|
properties:
|
||||||
|
prompt:
|
||||||
|
type: string
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
destinationUrl:
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
|
||||||
TweetCard:
|
TweetCard:
|
||||||
properties:
|
properties:
|
||||||
rest_id:
|
rest_id:
|
||||||
|
|
@ -833,6 +929,7 @@ components:
|
||||||
- "limited_replies"
|
- "limited_replies"
|
||||||
- "community_tweet_non_member_public_community"
|
- "community_tweet_non_member_public_community"
|
||||||
- "non_compliant"
|
- "non_compliant"
|
||||||
|
- "dynamic_product_ad"
|
||||||
place:
|
place:
|
||||||
additionalProperties: true # todo
|
additionalProperties: true # todo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ components:
|
||||||
TimelineUser,
|
TimelineUser,
|
||||||
TimelineTimelineCursor,
|
TimelineTimelineCursor,
|
||||||
TweetWithVisibilityResults,
|
TweetWithVisibilityResults,
|
||||||
|
ContextualTweetInterstitial,
|
||||||
TimelineTimelineModule,
|
TimelineTimelineModule,
|
||||||
TweetTombstone,
|
TweetTombstone,
|
||||||
TimelinePrompt,
|
TimelinePrompt,
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,8 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
verification_info:
|
verification_info:
|
||||||
$ref: "#/components/schemas/UserVerificationInfo"
|
$ref: "#/components/schemas/UserVerificationInfo"
|
||||||
|
is_profile_translatable:
|
||||||
|
type: boolean
|
||||||
|
|
||||||
UserProfessional:
|
UserProfessional:
|
||||||
required:
|
required:
|
||||||
|
|
@ -133,8 +135,6 @@ components:
|
||||||
UserVerificationInfo:
|
UserVerificationInfo:
|
||||||
required:
|
required:
|
||||||
- "is_identity_verified"
|
- "is_identity_verified"
|
||||||
- "reason"
|
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
is_identity_verified:
|
is_identity_verified:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue