1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-12 08:00:27 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-04-09 07:43:31 +09:00
parent 1de57f06af
commit 9b3deabd8e
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA

View file

@ -86,11 +86,25 @@ components:
schemas:
TypeName:
type: string
enum: [TimelineTweet, TimelineTimelineItem, TimelineTimelineCursor]
enum:
[
TimelineTweet,
TimelineTimelineItem,
TimelineTimelineCursor,
TweetWithVisibilityResults,
Tweet,
User,
]
InstructionType:
type: string
enum: [TimelineAddEntries]
enum:
[
TimelineAddEntries,
TimelineAddToModule,
TimelineTerminateTimeline,
TimelineShowAlert,
]
ContentEntryType:
type: string
@ -148,15 +162,19 @@ components:
TimelineAddEntries: "#components/schemas/TimelineAddEntries"
TimelineAddEntries:
required:
- type
- entries
properties:
type:
$ref: "#/components/schemas/InstructionType"
type: string
$ref: "#/components/schemas/InstructionType" # TimelineAddEntries
entries:
type: array
items:
$ref: "#/components/schemas/Entry"
$ref: "#/components/schemas/TimelineAddEntry"
Entry:
TimelineAddEntry:
required:
- "content"
- "entryId"
@ -183,14 +201,15 @@ components:
TimelineTimelineItem:
required:
- "__typename"
- "entryType"
- "itemContent"
- "__typename"
properties:
__typename:
$ref: "#/components/schemas/TypeName"
$ref: "#/components/schemas/TypeName" # TimelineTimelineItem
entryType:
$ref: "#/components/schemas/ContentEntryType"
type: string # enum
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineItem
itemContent:
$ref: "#/components/schemas/ItemContent"
clientEventInfo:
@ -199,11 +218,17 @@ components:
type: object # todo
TimelineTimelineCursor:
required:
- "__typename"
- "entryType"
- "cursorType"
- "value"
properties:
__typename:
$ref: "#/components/schemas/TypeName"
$ref: "#/components/schemas/TypeName" # TimelineTimelineCursor
entryType:
$ref: "#/components/schemas/ContentEntryType"
type: string # enum
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineCursor
cursorType:
type: string
enum: [Top, Bottom]
@ -214,16 +239,334 @@ components:
required:
- "__typename"
- "itemType"
- "tweetDisplayType"
- "tweet_results"
properties:
__typename:
$ref: "#/components/schemas/TypeName"
$ref: "#/components/schemas/TypeName" # TimelineTweet
itemType:
$ref: "#/components/schemas/ContentItemType"
$ref: "#/components/schemas/ContentItemType" # TimelineTweet
tweetDisplayType:
type: string # union
type: string # enum
tweet_results:
type: object # todo
$ref: "#/components/schemas/ItemResult"
ItemResult:
required:
- "result"
properties:
result:
$ref: "#/components/schemas/TweetResult"
TweetResult:
required:
- "__typename"
- "rest_id"
- "core"
- "edit_control"
- "edit_prespective"
- "is_translatable"
- "legacy"
- "views"
properties:
__typename:
$ref: "#/components/schemas/TypeName" # Tweet TweetWithVisibilityResults
rest_id:
type: string
pattern: "^[0-9]+$"
core:
$ref: "#/components/schemas/UserResultCore"
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
UserLegacy:
$ref: "#/components/schemas/UserLegacy"
views:
type: object
properties:
count:
type: string
pattern: "^[0-9]+$"
state:
type: string # enum
UserResultCore:
required:
- "user_results"
properties:
user_results:
$ref: "#/components/schemas/UserResults"
UserResults:
required:
- "result"
properties:
result:
$ref: "#/components/schemas/UserResult"
UserResult:
required:
- "__typename"
- "affiliates_highlighted_label"
- "has_graduated_access"
- "id"
- "is_blue_verified"
- "legacy"
- "rest_id"
- "super_follow_eligible"
- "super_followed_by"
- "super_following"
properties:
__typename:
$ref: "#/components/schemas/TypeName" # User
affiliates_highlighted_label:
type: object # todo
has_graduated_access:
type: boolean
has_nft_avatar:
type: boolean
default: false
id:
type: string
pattern: '^[a-z\-]+[0-9]+$'
is_blue_verified:
type: boolean
default: false
legacy:
$ref: "#/components/schemas/UserLegacy"
rest_id:
type: string
pattern: "^[0-9]+$"
business_account:
type: object # todo
super_follow_eligible:
type: boolean
default: false
super_followed_by:
type: boolean
default: false
super_following:
type: boolean
default: false
UserLegacy:
required:
- "blocked_by"
- "blocking"
- "can_dm"
- "can_media_tag"
- "created_at"
- "default_profile"
- "default_profile_image"
- "description"
- "fast_followers_count"
- "favourites_count"
- "follow_request_sent"
- "followed_by"
- "followers_count"
- "following"
- "friends_count"
- "has_custom_timelines"
- "is_translator"
- "listed_count"
- "location"
- "media_count"
- "muting"
- "name"
- "normal_followers_count"
- "notifications"
- "pinned_tweet_ids_str"
- "possibly_sensitive"
- "profile_image_url_https"
- "profile_interstitial_type"
- "protected"
- "screen_name"
- "statuses_count"
- "translator_type"
- "verified"
- "want_retweets"
properties:
blocked_by:
type: boolean
default: false
blocking:
type: boolean
default: false
can_dm:
type: boolean
can_media_tag:
type: boolean
created_at:
type: string # Wed Jul 08 14:05:58 +0000 2009
default_profile:
type: boolean
default_profile_image:
type: boolean
description:
type: string
entities:
type: object # todo
fast_followers_count:
type: integer
favourites_count:
type: integer
follow_request_sent:
type: boolean
default: false
followed_by:
type: boolean
default: false
followers_count:
type: integer
following:
type: boolean
default: false
friends_count:
type: integer
has_custom_timelines:
type: boolean
is_translator:
type: boolean
listed_count:
type: integer
location:
type: string
media_count:
type: integer
muting:
type: boolean
default: false
name:
type: string
normal_followers_count:
type: integer
notifications:
type: boolean
default: false
pinned_tweet_ids_str:
type: array
items:
type: string
possibly_sensitive:
type: boolean
profile_banner_extensions:
type: object
profile_banner_url:
type: string
profile_image_extensions:
type: object
profile_image_url_https:
type: string
profile_interstitial_type:
type: string
protected:
type: boolean
default: false
screen_name:
type: string
statuses_count:
type: integer
translator_type:
type: string
url:
type: string
verified:
type: boolean
want_retweets:
type: boolean
TweetLegacy:
required:
- "bookmark_count"
- "bookmarked"
- "created_at"
- "conversation_id_str"
- "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:
type: string # Thu Apr 06 13:23:34 +0000 2023
conversation_id_str:
type: string
pattern: "^[0-9]+$"
display_text_range:
type: array
items:
type: integer
entities:
type: object
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
user_id_str:
type: string
pattern: "^[0-9]+$"
id_str:
type: string
pattern: "^[0-9]+$"
# === parameters ===
parameters: