mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
add TweetDetail
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
abbcbe8b86
commit
a16f4a6915
9 changed files with 297 additions and 61 deletions
|
|
@ -261,6 +261,40 @@
|
|||
"responsive_web_enhance_cards_enabled": false
|
||||
}
|
||||
},
|
||||
"TweetDetail": {
|
||||
"Query": "wNNG8DBB8EaXw1lq4vFWGA",
|
||||
"Variables": {
|
||||
"focalTweetId": "1349129669258448897",
|
||||
"with_rux_injections": false,
|
||||
"includePromotedContent": true,
|
||||
"withCommunity": true,
|
||||
"withQuickPromoteEligibilityTweetFields": true,
|
||||
"withBirdwatchNotes": true,
|
||||
"withVoice": true,
|
||||
"withV2Timeline": true
|
||||
},
|
||||
"Features": {
|
||||
"blue_business_profile_image_shape_enabled": true,
|
||||
"responsive_web_graphql_exclude_directive_enabled": true,
|
||||
"verified_phone_label_enabled": false,
|
||||
"responsive_web_graphql_timeline_navigation_enabled": true,
|
||||
"responsive_web_graphql_skip_user_profile_image_extensions_enabled": false,
|
||||
"tweetypie_unmention_optimization_enabled": true,
|
||||
"vibe_api_enabled": true,
|
||||
"responsive_web_edit_tweet_api_enabled": true,
|
||||
"graphql_is_translatable_rweb_tweet_is_translatable_enabled": true,
|
||||
"view_counts_everywhere_api_enabled": true,
|
||||
"longform_notetweets_consumption_enabled": true,
|
||||
"tweet_awards_web_tipping_enabled": false,
|
||||
"freedom_of_speech_not_reach_fetch_enabled": false,
|
||||
"standardized_nudges_misinfo": true,
|
||||
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": false,
|
||||
"interactive_text_enabled": true,
|
||||
"responsive_web_text_conversations_enabled": false,
|
||||
"longform_notetweets_rich_text_read_enabled": true,
|
||||
"responsive_web_enhance_cards_enabled": false
|
||||
}
|
||||
},
|
||||
"Template": {
|
||||
"Query": "",
|
||||
"Variables": {},
|
||||
|
|
|
|||
36
src/openapi/path/tweet.yaml
Normal file
36
src/openapi/path/tweet.yaml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
|
||||
paths:
|
||||
/{{TweetDetailQuery}}/TweetDetail:
|
||||
get:
|
||||
operationId: getTweetDetail
|
||||
description: get TweetDetail
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/TweetDetailResponse"
|
||||
tags:
|
||||
- "bookmark"
|
||||
- "graphql"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
TweetDetailResponse:
|
||||
required:
|
||||
- "data"
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/BookmarksResponseData"
|
||||
|
||||
BookmarksResponseData:
|
||||
required:
|
||||
- "threaded_conversation_with_injections_v2"
|
||||
properties:
|
||||
threaded_conversation_with_injections_v2:
|
||||
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"
|
||||
|
|
@ -35,7 +35,7 @@ components:
|
|||
type: string # enum
|
||||
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineItem
|
||||
itemContent:
|
||||
$ref: "#/components/schemas/ItemContent"
|
||||
$ref: "#/components/schemas/ItemContentUnion"
|
||||
clientEventInfo:
|
||||
type: object # todo
|
||||
feedbackInfo:
|
||||
|
|
@ -44,7 +44,6 @@ components:
|
|||
TimelineTimelineCursor:
|
||||
required:
|
||||
- "__typename"
|
||||
- "entryType"
|
||||
- "cursorType"
|
||||
- "value"
|
||||
properties:
|
||||
|
|
@ -52,7 +51,10 @@ components:
|
|||
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTimelineCursor
|
||||
entryType:
|
||||
type: string # enum
|
||||
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineCursor
|
||||
$ref: "#/components/schemas/ContentEntryType" # null | TimelineTimelineCursor
|
||||
itemType:
|
||||
type: string # enum
|
||||
$ref: "#/components/schemas/ContentEntryType" # null | TimelineTimelineCursor
|
||||
cursorType:
|
||||
type: string
|
||||
enum: [Top, Bottom]
|
||||
|
|
@ -72,11 +74,22 @@ components:
|
|||
$ref: "#/components/schemas/ContentEntryType" # TimelineTimelineCursor
|
||||
|
||||
# ================= ContentItem =================
|
||||
|
||||
ItemContentUnion:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/TimelineTweet"
|
||||
- $ref: "#/components/schemas/TimelineTimelineCursor"
|
||||
discriminator:
|
||||
propertyName: itemType
|
||||
mapping": # deprecated
|
||||
TimelineTweet: "#/components/schemas/TimelineTweet"
|
||||
TimelineTimelineCursor: "#/components/schemas/TimelineTimelineCursor"
|
||||
|
||||
ContentItemType:
|
||||
type: string
|
||||
enum: [TimelineTweet]
|
||||
enum: [TimelineTweet, TimelineTimelineCursor]
|
||||
|
||||
ItemContent:
|
||||
TimelineTweet:
|
||||
required:
|
||||
- "__typename"
|
||||
- "itemType"
|
||||
|
|
@ -106,5 +119,7 @@ components:
|
|||
required:
|
||||
- "result"
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # null | TimelineTweet
|
||||
result:
|
||||
$ref: "./tweet.yaml#/components/schemas/TweetUnion"
|
||||
|
|
|
|||
|
|
@ -11,16 +11,24 @@ components:
|
|||
- $ref: "#/components/schemas/TimelineAddEntries"
|
||||
- $ref: "#/components/schemas/TimelineClearCache"
|
||||
- $ref: "#/components/schemas/TimelinePinEntry"
|
||||
- $ref: "#/components/schemas/TimelineTerminateTimeline"
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping": # deprecated
|
||||
TimelineAddEntries: "#/components/schemas/TimelineAddEntries"
|
||||
TimelineClearCache: "#/components/schemas/TimelineClearCache"
|
||||
TimelinePinEntry: "#/components/schemas/TimelinePinEntry"
|
||||
TimelineTerminateTimeline: "#/components/schemas/TimelineTerminateTimeline"
|
||||
|
||||
InstructionType:
|
||||
type: string
|
||||
enum: [TimelineAddEntries, TimelineClearCache, TimelinePinEntry]
|
||||
enum:
|
||||
[
|
||||
TimelineAddEntries,
|
||||
TimelineClearCache,
|
||||
TimelinePinEntry,
|
||||
TimelineTerminateTimeline,
|
||||
]
|
||||
|
||||
TimelineAddEntries:
|
||||
required:
|
||||
|
|
@ -54,6 +62,18 @@ components:
|
|||
entry:
|
||||
$ref: "#/components/schemas/TimelineAddEntry"
|
||||
|
||||
TimelineTerminateTimeline:
|
||||
required:
|
||||
- type
|
||||
- direction
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
$ref: "#/components/schemas/InstructionType" # TimelineTerminateTimeline
|
||||
direction:
|
||||
type: string
|
||||
enum: [Top, Bottom]
|
||||
|
||||
TimelineAddEntry:
|
||||
required:
|
||||
- "content"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ components:
|
|||
|
||||
Tweet:
|
||||
required:
|
||||
# - "__typename"
|
||||
- "rest_id"
|
||||
- "core"
|
||||
- "edit_control"
|
||||
|
|
@ -40,7 +39,7 @@ components:
|
|||
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # Tweet
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # null | Tweet
|
||||
rest_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue