1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 07:30:37 +01:00

update schema

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2024-02-11 20:36:47 +09:00
parent a82844dfa5
commit 755990f3d0
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
5 changed files with 113 additions and 4 deletions

View file

@ -32,6 +32,85 @@ components:
limitedActionResults:
type: object
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 publics 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
properties:
@ -557,6 +636,8 @@ components:
iconType:
type: string
enum: [BirdwatchV1Icon]
callToAction:
$ref: "#/components/schemas/BirdwatchPivotCallToAction"
BirdwatchPivotFooter:
required:
@ -619,6 +700,21 @@ components:
items:
$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:
properties:
rest_id:
@ -833,6 +929,7 @@ components:
- "limited_replies"
- "community_tweet_non_member_public_community"
- "non_compliant"
- "dynamic_product_ad"
place:
additionalProperties: true # todo