1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 07:30:37 +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: components:
schemas: schemas:
ClientEventInfo:
properties:
component:
type: string
details:
additionalProperties: true
type: object
element:
type: string
ContentEntryType: ContentEntryType:
enum: enum:
- TimelineTimelineItem - TimelineTimelineItem
@ -54,13 +63,11 @@ components:
$ref: ./typename.yaml#/components/schemas/TypeName $ref: ./typename.yaml#/components/schemas/TypeName
result: result:
$ref: ./tweet.yaml#/components/schemas/TweetUnion $ref: ./tweet.yaml#/components/schemas/TweetUnion
required: required: null
- result
ModuleEntry: ModuleEntry:
properties: properties:
clientEventInfo: clientEventInfo:
additionalProperties: true $ref: '#/components/schemas/ClientEventInfo'
type: object
itemContent: itemContent:
$ref: '#/components/schemas/ItemContentUnion' $ref: '#/components/schemas/ItemContentUnion'
required: required:
@ -116,8 +123,7 @@ components:
__typename: __typename:
$ref: ./typename.yaml#/components/schemas/TypeName $ref: ./typename.yaml#/components/schemas/TypeName
clientEventInfo: clientEventInfo:
additionalProperties: true $ref: '#/components/schemas/ClientEventInfo'
type: object
entryType: entryType:
$ref: '#/components/schemas/ContentEntryType' $ref: '#/components/schemas/ContentEntryType'
feedbackInfo: feedbackInfo:

View file

@ -1,5 +1,42 @@
components: components:
schemas: 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: InstructionType:
enum: enum:
- TimelineAddEntries - TimelineAddEntries
@ -9,6 +46,7 @@ components:
- TimelineReplaceEntry - TimelineReplaceEntry
- TimelineShowAlert - TimelineShowAlert
- TimelineTerminateTimeline - TimelineTerminateTimeline
- TimelineShowCover
type: string type: string
InstructionUnion: InstructionUnion:
discriminator: discriminator:
@ -19,6 +57,7 @@ components:
TimelinePinEntry: '#/components/schemas/TimelinePinEntry' TimelinePinEntry: '#/components/schemas/TimelinePinEntry'
TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry' TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry'
TimelineShowAlert: '#/components/schemas/TimelineShowAlert' TimelineShowAlert: '#/components/schemas/TimelineShowAlert'
TimelineShowCover: '#/components/schemas/TimelineShowCover'
TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline' TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline'
propertyName: type propertyName: type
oneOf: oneOf:
@ -29,6 +68,47 @@ components:
- $ref: '#/components/schemas/TimelineReplaceEntry' - $ref: '#/components/schemas/TimelineReplaceEntry'
- $ref: '#/components/schemas/TimelineShowAlert' - $ref: '#/components/schemas/TimelineShowAlert'
- $ref: '#/components/schemas/TimelineTerminateTimeline' - $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: TimelineAddEntries:
properties: properties:
entries: entries:
@ -76,6 +156,44 @@ components:
$ref: '#/components/schemas/InstructionType' $ref: '#/components/schemas/InstructionType'
required: required:
- type - 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: TimelinePinEntry:
properties: properties:
entry: entry:
@ -137,6 +255,18 @@ components:
- type - type
- usersResults - usersResults
- richText - 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: TimelineTerminateTimeline:
properties: properties:
direction: direction:

View file

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

View file

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

View file

@ -1,5 +1,42 @@
components: components:
schemas: 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: InstructionType:
enum: enum:
- TimelineAddEntries - TimelineAddEntries
@ -9,6 +46,7 @@ components:
- TimelineReplaceEntry - TimelineReplaceEntry
- TimelineShowAlert - TimelineShowAlert
- TimelineTerminateTimeline - TimelineTerminateTimeline
- TimelineShowCover
type: string type: string
InstructionUnion: InstructionUnion:
discriminator: discriminator:
@ -19,6 +57,7 @@ components:
TimelinePinEntry: '#/components/schemas/TimelinePinEntry' TimelinePinEntry: '#/components/schemas/TimelinePinEntry'
TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry' TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry'
TimelineShowAlert: '#/components/schemas/TimelineShowAlert' TimelineShowAlert: '#/components/schemas/TimelineShowAlert'
TimelineShowCover: '#/components/schemas/TimelineShowCover'
TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline' TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline'
propertyName: type propertyName: type
oneOf: oneOf:
@ -29,6 +68,47 @@ components:
- $ref: '#/components/schemas/TimelineReplaceEntry' - $ref: '#/components/schemas/TimelineReplaceEntry'
- $ref: '#/components/schemas/TimelineShowAlert' - $ref: '#/components/schemas/TimelineShowAlert'
- $ref: '#/components/schemas/TimelineTerminateTimeline' - $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: TimelineAddEntries:
properties: properties:
entries: entries:
@ -76,6 +156,44 @@ components:
$ref: '#/components/schemas/InstructionType' $ref: '#/components/schemas/InstructionType'
required: required:
- type - 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: TimelinePinEntry:
properties: properties:
entry: entry:
@ -137,6 +255,18 @@ components:
- type - type
- usersResults - usersResults
- richText - 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: TimelineTerminateTimeline:
properties: properties:
direction: direction:

View file

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