1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-10 15:20:26 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-09-17 03:35:36 +09:00
parent bd2f821d55
commit 6d4ab844cc
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
6 changed files with 284 additions and 22 deletions

View file

@ -1,5 +1,14 @@
components:
schemas:
ClientEventInfo:
properties:
component:
type: string
details:
additionalProperties: true
type: object
element:
type: string
ContentEntryType:
enum:
- TimelineTimelineItem
@ -54,13 +63,11 @@ components:
$ref: ./typename.yaml#/components/schemas/TypeName
result:
$ref: ./tweet.yaml#/components/schemas/TweetUnion
required:
- result
required: null
ModuleEntry:
properties:
clientEventInfo:
additionalProperties: true
type: object
$ref: '#/components/schemas/ClientEventInfo'
itemContent:
$ref: '#/components/schemas/ItemContentUnion'
required:
@ -116,8 +123,7 @@ components:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
clientEventInfo:
additionalProperties: true
type: object
$ref: '#/components/schemas/ClientEventInfo'
entryType:
$ref: '#/components/schemas/ContentEntryType'
feedbackInfo:

View file

@ -1,5 +1,42 @@
components:
schemas:
Callback:
properties:
endpoint:
format: uri
type: string
required:
- endpoint
CoverCta:
properties:
Text:
type: string
buttonStyle:
enum:
- Primary
type: string
callbacks:
items:
$ref: '#/components/schemas/Callback'
type: array
clientEventInfo:
$ref: '#/components/schemas/CtaClientEventInfo'
ctaBehavior:
$ref: '#/components/schemas/TimelineCoverBehavior'
required:
- text
- ctaBehavior
- callbacks
- clientEventInfo
- buttonStyle
CtaClientEventInfo:
properties:
action:
enum:
- primary_cta
type: string
required:
- action
InstructionType:
enum:
- TimelineAddEntries
@ -9,6 +46,7 @@ components:
- TimelineReplaceEntry
- TimelineShowAlert
- TimelineTerminateTimeline
- TimelineShowCover
type: string
InstructionUnion:
discriminator:
@ -19,6 +57,7 @@ components:
TimelinePinEntry: '#/components/schemas/TimelinePinEntry'
TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry'
TimelineShowAlert: '#/components/schemas/TimelineShowAlert'
TimelineShowCover: '#/components/schemas/TimelineShowCover'
TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline'
propertyName: type
oneOf:
@ -29,6 +68,47 @@ components:
- $ref: '#/components/schemas/TimelineReplaceEntry'
- $ref: '#/components/schemas/TimelineShowAlert'
- $ref: '#/components/schemas/TimelineTerminateTimeline'
- $ref: '#/components/schemas/TimelineShowCover'
Text:
properties:
entities:
items:
$ref: '#/components/schemas/TextEntity'
type: array
text:
type: string
required:
- text
- entities
TextEntity:
properties:
fromIndex:
type: integer
ref:
$ref: '#/components/schemas/TextEntityRef'
toIndex:
type: integer
required:
- fromIndex
- toIndex
- ref
TextEntityRef:
properties:
type:
enum:
- TimelineUrl
type: string
url:
format: uri
type: string
urlType:
enum:
- ExternalUrl
type: string
required:
- type
- url
- urlType
TimelineAddEntries:
properties:
entries:
@ -76,6 +156,44 @@ components:
$ref: '#/components/schemas/InstructionType'
required:
- type
TimelineCoverBehavior:
properties:
type:
enum:
- TimelineCoverBehaviorDismiss
type: string
required:
- type
TimelineHalfCover:
properties:
dismissible:
type: boolean
halfCoverDisplayType:
enum:
- Cover
type: string
impressionCallbacks:
items:
$ref: '#/components/schemas/Callback'
type: array
primaryCoverCta:
$ref: '#/components/schemas/CoverCta'
primaryText:
$ref: '#/components/schemas/Text'
secondaryText:
$ref: '#/components/schemas/Text'
type:
enum:
- TimelineHalfCover
type: string
required:
- type
- halfCoverDisplayType
- primaryText
- primaryCoverCta
- secondaryText
- impressionCallbacks
- dismissible
TimelinePinEntry:
properties:
entry:
@ -137,6 +255,18 @@ components:
- type
- usersResults
- richText
TimelineShowCover:
properties:
clientEventInfo:
$ref: ./content.yaml#/components/schemas/ClientEventInfo
cover:
$ref: '#/components/schemas/TimelineHalfCover'
type:
$ref: '#/components/schemas/InstructionType'
required:
- type
- clientEventInfo
- cover
TimelineTerminateTimeline:
properties:
direction:

View file

@ -269,11 +269,8 @@ components:
$ref: '#/components/schemas/TweetView'
required:
- rest_id
- core
- edit_control
- is_translatable
- source
- legacy
- views
TweetCard:
properties:
@ -498,8 +495,6 @@ components:
enum:
- Available
type: string
required:
- status
mediaStats:
properties:
viewCount:

View file

@ -1,5 +1,14 @@
components:
schemas:
ClientEventInfo:
properties:
component:
type: string
details:
additionalProperties: true
type: object
element:
type: string
ContentEntryType:
enum:
- TimelineTimelineItem
@ -54,13 +63,11 @@ components:
$ref: ./typename.yaml#/components/schemas/TypeName
result:
$ref: ./tweet.yaml#/components/schemas/TweetUnion
required:
- result
required: null
ModuleEntry:
properties:
clientEventInfo:
additionalProperties: true
type: object
$ref: '#/components/schemas/ClientEventInfo'
itemContent:
$ref: '#/components/schemas/ItemContentUnion'
required:
@ -116,8 +123,7 @@ components:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
clientEventInfo:
additionalProperties: true
type: object
$ref: '#/components/schemas/ClientEventInfo'
entryType:
$ref: '#/components/schemas/ContentEntryType'
feedbackInfo:

View file

@ -1,5 +1,42 @@
components:
schemas:
Callback:
properties:
endpoint:
format: uri
type: string
required:
- endpoint
CoverCta:
properties:
Text:
type: string
buttonStyle:
enum:
- Primary
type: string
callbacks:
items:
$ref: '#/components/schemas/Callback'
type: array
clientEventInfo:
$ref: '#/components/schemas/CtaClientEventInfo'
ctaBehavior:
$ref: '#/components/schemas/TimelineCoverBehavior'
required:
- text
- ctaBehavior
- callbacks
- clientEventInfo
- buttonStyle
CtaClientEventInfo:
properties:
action:
enum:
- primary_cta
type: string
required:
- action
InstructionType:
enum:
- TimelineAddEntries
@ -9,6 +46,7 @@ components:
- TimelineReplaceEntry
- TimelineShowAlert
- TimelineTerminateTimeline
- TimelineShowCover
type: string
InstructionUnion:
discriminator:
@ -19,6 +57,7 @@ components:
TimelinePinEntry: '#/components/schemas/TimelinePinEntry'
TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry'
TimelineShowAlert: '#/components/schemas/TimelineShowAlert'
TimelineShowCover: '#/components/schemas/TimelineShowCover'
TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline'
propertyName: type
oneOf:
@ -29,6 +68,47 @@ components:
- $ref: '#/components/schemas/TimelineReplaceEntry'
- $ref: '#/components/schemas/TimelineShowAlert'
- $ref: '#/components/schemas/TimelineTerminateTimeline'
- $ref: '#/components/schemas/TimelineShowCover'
Text:
properties:
entities:
items:
$ref: '#/components/schemas/TextEntity'
type: array
text:
type: string
required:
- text
- entities
TextEntity:
properties:
fromIndex:
type: integer
ref:
$ref: '#/components/schemas/TextEntityRef'
toIndex:
type: integer
required:
- fromIndex
- toIndex
- ref
TextEntityRef:
properties:
type:
enum:
- TimelineUrl
type: string
url:
format: uri
type: string
urlType:
enum:
- ExternalUrl
type: string
required:
- type
- url
- urlType
TimelineAddEntries:
properties:
entries:
@ -76,6 +156,44 @@ components:
$ref: '#/components/schemas/InstructionType'
required:
- type
TimelineCoverBehavior:
properties:
type:
enum:
- TimelineCoverBehaviorDismiss
type: string
required:
- type
TimelineHalfCover:
properties:
dismissible:
type: boolean
halfCoverDisplayType:
enum:
- Cover
type: string
impressionCallbacks:
items:
$ref: '#/components/schemas/Callback'
type: array
primaryCoverCta:
$ref: '#/components/schemas/CoverCta'
primaryText:
$ref: '#/components/schemas/Text'
secondaryText:
$ref: '#/components/schemas/Text'
type:
enum:
- TimelineHalfCover
type: string
required:
- type
- halfCoverDisplayType
- primaryText
- primaryCoverCta
- secondaryText
- impressionCallbacks
- dismissible
TimelinePinEntry:
properties:
entry:
@ -137,6 +255,18 @@ components:
- type
- usersResults
- richText
TimelineShowCover:
properties:
clientEventInfo:
$ref: ./content.yaml#/components/schemas/ClientEventInfo
cover:
$ref: '#/components/schemas/TimelineHalfCover'
type:
$ref: '#/components/schemas/InstructionType'
required:
- type
- clientEventInfo
- cover
TimelineTerminateTimeline:
properties:
direction:

View file

@ -269,11 +269,8 @@ components:
$ref: '#/components/schemas/TweetView'
required:
- rest_id
- core
- edit_control
- is_translatable
- source
- legacy
- views
TweetCard:
properties:
@ -498,8 +495,6 @@ components:
enum:
- Available
type: string
required:
- status
mediaStats:
properties:
viewCount: