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:
parent
95ef71b398
commit
a82844dfa5
7 changed files with 1679 additions and 35 deletions
|
|
@ -23,11 +23,15 @@ components:
|
|||
required:
|
||||
- "__typename"
|
||||
- "tweet"
|
||||
- "limitedActionResults"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
|
||||
tweet:
|
||||
$ref: "#/components/schemas/Tweet"
|
||||
limitedActionResults:
|
||||
type: object
|
||||
additionalProperties: true # todo
|
||||
|
||||
TweetTombstone: #remove tweet
|
||||
properties:
|
||||
|
|
@ -45,7 +49,6 @@ components:
|
|||
# - "source"
|
||||
# - "legacy"
|
||||
- "views"
|
||||
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # null | Tweet
|
||||
|
|
@ -82,6 +85,16 @@ components:
|
|||
type: object
|
||||
unified_card:
|
||||
$ref: "#/components/schemas/UnifiedCard"
|
||||
previous_counts:
|
||||
$ref: "#/components/schemas/TweetPreviousCounts"
|
||||
quotedRefResult:
|
||||
$ref: "#/components/schemas/QuotedRefResult"
|
||||
superFollowsReplyUserResult:
|
||||
$ref: "#/components/schemas/SuperFollowsReplyUserResult"
|
||||
has_birdwatch_notes:
|
||||
type: boolean
|
||||
author_community_relationship:
|
||||
$ref: "#/components/schemas/AuthorCommunityRelationship"
|
||||
|
||||
TweetEditControl:
|
||||
properties:
|
||||
|
|
@ -230,6 +243,291 @@ components:
|
|||
type: string
|
||||
enum: [NoCard]
|
||||
|
||||
TweetPreviousCounts:
|
||||
required:
|
||||
- "bookmark_count"
|
||||
- "favorite_count"
|
||||
- "quote_count"
|
||||
- "reply_count"
|
||||
- "retweet_count"
|
||||
properties:
|
||||
bookmark_count:
|
||||
type: integer
|
||||
favorite_count:
|
||||
type: integer
|
||||
quote_count:
|
||||
type: integer
|
||||
reply_count:
|
||||
type: integer
|
||||
retweet_count:
|
||||
type: integer
|
||||
|
||||
QuotedRefResult:
|
||||
required:
|
||||
- "result"
|
||||
properties:
|
||||
result:
|
||||
$ref: "#/components/schemas/QuotedRefResultData"
|
||||
|
||||
QuotedRefResultData:
|
||||
required:
|
||||
- "__typename"
|
||||
- "rest_id"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # Tweet
|
||||
rest_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
|
||||
SuperFollowsReplyUserResult:
|
||||
required:
|
||||
- "result"
|
||||
properties:
|
||||
result:
|
||||
$ref: "#/components/schemas/SuperFollowsReplyUserResultData"
|
||||
|
||||
SuperFollowsReplyUserResultData:
|
||||
required:
|
||||
- "__typename"
|
||||
- "legacy"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # User
|
||||
legacy:
|
||||
$ref: "#/components/schemas/SuperFollowsReplyUserResultLegacy"
|
||||
|
||||
SuperFollowsReplyUserResultLegacy:
|
||||
required:
|
||||
- "screen_name"
|
||||
properties:
|
||||
screen_name:
|
||||
type: string
|
||||
|
||||
AuthorCommunityRelationship:
|
||||
required:
|
||||
- "community_results"
|
||||
properties:
|
||||
community_results:
|
||||
$ref: "#/components/schemas/Community"
|
||||
role:
|
||||
type: string
|
||||
enum: [Member]
|
||||
user_results:
|
||||
$ref: "user.yaml#/components/schemas/UserResults"
|
||||
|
||||
Community:
|
||||
required:
|
||||
- "result"
|
||||
properties:
|
||||
result:
|
||||
$ref: "#/components/schemas/CommunityData"
|
||||
|
||||
CommunityData:
|
||||
required:
|
||||
- "__typename"
|
||||
- "id_str"
|
||||
- "name"
|
||||
- "description"
|
||||
- "question"
|
||||
- "search_tags"
|
||||
- "primary_community_topic"
|
||||
- "actions"
|
||||
- "admin_results"
|
||||
- "creator_results"
|
||||
- "invites_result"
|
||||
- "join_policy"
|
||||
- "invites_policy"
|
||||
- "is_pinned"
|
||||
- "members_facepile_results"
|
||||
- "moderator_count"
|
||||
- "member_count"
|
||||
- "role"
|
||||
- "rules"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # Community
|
||||
id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
created_at:
|
||||
type: integer
|
||||
question:
|
||||
type: string
|
||||
search_tags:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
primary_community_topic:
|
||||
$ref: "#/components/schemas/PrimaryCommunityTopic"
|
||||
actions:
|
||||
$ref: "#/components/schemas/CommunityActions"
|
||||
admin_results:
|
||||
$ref: "user.yaml#/components/schemas/UserResults"
|
||||
creator_results:
|
||||
$ref: "user.yaml#/components/schemas/UserResults"
|
||||
invites_result:
|
||||
$ref: "#/components/schemas/CommunityInvitesResult"
|
||||
join_requests_result:
|
||||
$ref: "#/components/schemas/CommunityJoinRequestsResult"
|
||||
join_policy:
|
||||
type: string
|
||||
enum: [Open]
|
||||
invites_policy:
|
||||
type: string
|
||||
enum: [MemberInvitesAllowed]
|
||||
is_pinned:
|
||||
type: boolean
|
||||
members_facepile_results:
|
||||
type: array
|
||||
items:
|
||||
$ref: "user.yaml#/components/schemas/UserResults"
|
||||
moderator_count:
|
||||
type: integer
|
||||
member_count:
|
||||
type: integer
|
||||
role:
|
||||
type: string
|
||||
enum: [NonMember]
|
||||
rules:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/CommunityRule"
|
||||
show_only_users_to_display:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
urls:
|
||||
$ref: "#/components/schemas/CommunityUrls"
|
||||
default_banner_media:
|
||||
type: object
|
||||
additionalProperties: true # todo
|
||||
custom_banner_media:
|
||||
type: object
|
||||
additionalProperties: true # todo
|
||||
viewer_relationship:
|
||||
type: object
|
||||
additionalProperties: true # todo
|
||||
|
||||
PrimaryCommunityTopic:
|
||||
required:
|
||||
- "topic_id"
|
||||
- "topic_name"
|
||||
properties:
|
||||
topic_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
topic_name:
|
||||
type: string
|
||||
|
||||
CommunityActions:
|
||||
required:
|
||||
- "delete_action_result"
|
||||
- "join_action_result"
|
||||
- "leave_action_result"
|
||||
- "pin_action_result"
|
||||
properties:
|
||||
delete_action_result:
|
||||
$ref: "#/components/schemas/CommunityDeleteActionResult"
|
||||
join_action_result:
|
||||
$ref: "#/components/schemas/CommunityJoinActionResult"
|
||||
leave_action_result:
|
||||
$ref: "#/components/schemas/CommunityLeaveActionResult"
|
||||
pin_action_result:
|
||||
$ref: "#/components/schemas/CommunityPinActionResult"
|
||||
|
||||
CommunityDeleteActionResult:
|
||||
required:
|
||||
- "__typename"
|
||||
- "reason"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityDeleteActionUnavailable
|
||||
reason:
|
||||
type: string
|
||||
enum: [Unavailable]
|
||||
|
||||
CommunityJoinActionResult:
|
||||
required:
|
||||
- "__typename"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityJoinAction
|
||||
|
||||
CommunityLeaveActionResult:
|
||||
required:
|
||||
- "__typename"
|
||||
- "reason"
|
||||
- "message"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityLeaveActionUnavailable
|
||||
reason:
|
||||
type: string
|
||||
enum: [ViewerNotMember]
|
||||
message:
|
||||
type: string
|
||||
|
||||
CommunityPinActionResult:
|
||||
required:
|
||||
- "__typename"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityTweetPinActionUnavailable
|
||||
|
||||
CommunityInvitesResult:
|
||||
required:
|
||||
- "__typename"
|
||||
- "reason"
|
||||
- "message"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityInvitesUnavailable
|
||||
reason:
|
||||
type: string
|
||||
enum: [Unavailable]
|
||||
message:
|
||||
type: string
|
||||
|
||||
CommunityJoinRequestsResult:
|
||||
required:
|
||||
- "__typename"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityJoinRequestsUnavailable
|
||||
|
||||
CommunityRule:
|
||||
required:
|
||||
- "rest_id"
|
||||
- "name"
|
||||
properties:
|
||||
rest_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
name:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
|
||||
CommunityUrls:
|
||||
required:
|
||||
- "permalink"
|
||||
properties:
|
||||
permalink:
|
||||
$ref: "#/components/schemas/CommunityUrlsPermalink"
|
||||
|
||||
CommunityUrlsPermalink:
|
||||
required:
|
||||
- "url"
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
|
||||
BirdwatchPivot:
|
||||
required:
|
||||
- "destinationUrl"
|
||||
|
|
@ -346,6 +644,10 @@ components:
|
|||
# {'platform': {'audience': {'name': 'production'}, 'device': {'name': 'Swift', 'version': '12'}}}
|
||||
card_platform:
|
||||
$ref: "#/components/schemas/TweetCardPlatformData"
|
||||
user_refs_results:
|
||||
type: array
|
||||
items:
|
||||
$ref: "user.yaml#/components/schemas/UserResults"
|
||||
|
||||
TweetCardPlatformData:
|
||||
required:
|
||||
|
|
@ -405,6 +707,37 @@ components:
|
|||
type: string
|
||||
type:
|
||||
type: string
|
||||
image_value:
|
||||
$ref: "#/components/schemas/TweetCardLegacyBindingValueDataImage"
|
||||
image_color_value:
|
||||
type: object
|
||||
additionalProperties: true # todo
|
||||
user_value:
|
||||
$ref: "#/components/schemas/UserValue"
|
||||
|
||||
UserValue:
|
||||
required:
|
||||
- "id_str"
|
||||
properties:
|
||||
id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
|
||||
TweetCardLegacyBindingValueDataImage:
|
||||
required:
|
||||
- "height"
|
||||
- "width"
|
||||
- "url"
|
||||
properties:
|
||||
height:
|
||||
type: integer
|
||||
width:
|
||||
type: integer
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
alt:
|
||||
type: string
|
||||
|
||||
TweetLegacy:
|
||||
required:
|
||||
|
|
@ -487,6 +820,21 @@ components:
|
|||
in_reply_to_user_id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
quoted_status_permalink:
|
||||
$ref: "#/components/schemas/QuotedStatusPermalink"
|
||||
quoted_status_id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
conversation_control:
|
||||
additionalProperties: true # todo
|
||||
limited_actions:
|
||||
type: string
|
||||
enum:
|
||||
- "limited_replies"
|
||||
- "community_tweet_non_member_public_community"
|
||||
- "non_compliant"
|
||||
place:
|
||||
additionalProperties: true # todo
|
||||
|
||||
SelfThread:
|
||||
required:
|
||||
|
|
@ -607,6 +955,14 @@ components:
|
|||
additional_media_info:
|
||||
type: object
|
||||
additionalProperties: true # todo
|
||||
source_user_id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
source_status_id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
ext_alt_text:
|
||||
type: string
|
||||
|
||||
TweetLegacyScopes:
|
||||
required:
|
||||
|
|
@ -615,6 +971,22 @@ components:
|
|||
followers:
|
||||
type: boolean
|
||||
|
||||
QuotedStatusPermalink:
|
||||
required:
|
||||
- "url"
|
||||
- "expanded"
|
||||
- "display"
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
expanded:
|
||||
type: string
|
||||
format: uri
|
||||
display:
|
||||
type: string
|
||||
format: uri
|
||||
|
||||
ExtendedEntities:
|
||||
required:
|
||||
- "media"
|
||||
|
|
@ -677,6 +1049,14 @@ components:
|
|||
$ref: "#/components/schemas/MediaOriginalInfo"
|
||||
video_info:
|
||||
$ref: "#/components/schemas/MediaVideoInfo"
|
||||
source_user_id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
source_status_id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
ext_alt_text:
|
||||
type: string
|
||||
|
||||
MediaOriginalInfo:
|
||||
required:
|
||||
|
|
@ -744,6 +1124,31 @@ components:
|
|||
properties:
|
||||
monetizable:
|
||||
type: boolean
|
||||
source_user:
|
||||
$ref: "./user.yaml#/components/schemas/UserResultCore"
|
||||
title: # null character
|
||||
type: string
|
||||
description: # null character
|
||||
type: string
|
||||
embeddable:
|
||||
type: boolean
|
||||
call_to_actions:
|
||||
$ref: "#/components/schemas/AdditionalMediaInfoCallToActions"
|
||||
|
||||
AdditionalMediaInfoCallToActions:
|
||||
required:
|
||||
- "visit_site"
|
||||
properties:
|
||||
visit_site:
|
||||
$ref: "#/components/schemas/AdditionalMediaInfoCallToActionsVisitSite"
|
||||
|
||||
AdditionalMediaInfoCallToActionsVisitSite:
|
||||
required:
|
||||
- "url"
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
|
||||
MediaStats:
|
||||
required:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue