1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-10 15:20:26 +01:00
twitter-openapi/dist/compatible/schemas/content.yaml
ふぁ 6d4ab844cc
build
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-09-17 03:35:36 +09:00

214 lines
5.9 KiB
YAML

components:
schemas:
ClientEventInfo:
properties:
component:
type: string
details:
additionalProperties: true
type: object
element:
type: string
ContentEntryType:
enum:
- TimelineTimelineItem
- TimelineTimelineCursor
- TimelineTimelineModule
type: string
ContentItemType:
enum:
- TimelineTweet
- TimelineTimelineCursor
- TimelineUser
- TimelinePrompt
- TimelineMessagePrompt
type: string
ContentUnion:
discriminator:
mapping":
TimelineTimelineCursor: '#/components/schemas/TimelineTimelineCursor'
TimelineTimelineItem: '#/components/schemas/TimelineTimelineItem'
TimelineTimelineModule: '#/components/schemas/TimelineTimelineModule'
propertyName: entryType
oneOf:
- $ref: '#/components/schemas/TimelineTimelineItem'
- $ref: '#/components/schemas/TimelineTimelineModule'
- $ref: '#/components/schemas/TimelineTimelineCursor'
CursorType:
enum:
- Top
- Bottom
- ShowMore
- ShowMoreThreads
- Gap
type: string
ItemContentUnion:
discriminator:
mapping":
TimelineMessagePrompt: '#/components/schemas/TimelineMessagePrompt'
TimelinePrompt: '#/components/schemas/TimelinePrompt'
TimelineTimelineCursor: '#/components/schemas/TimelineTimelineCursor'
TimelineTweet: '#/components/schemas/TimelineTweet'
TimelineUser: '#/components/schemas/TimelineUser'
propertyName: __typename
oneOf:
- $ref: '#/components/schemas/TimelineTweet'
- $ref: '#/components/schemas/TimelineTimelineCursor'
- $ref: '#/components/schemas/TimelineUser'
- $ref: '#/components/schemas/TimelinePrompt'
- $ref: '#/components/schemas/TimelineMessagePrompt'
ItemResult:
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
result:
$ref: ./tweet.yaml#/components/schemas/TweetUnion
required: null
ModuleEntry:
properties:
clientEventInfo:
$ref: '#/components/schemas/ClientEventInfo'
itemContent:
$ref: '#/components/schemas/ItemContentUnion'
required:
- clientEventInfo
- itemContent
ModuleItem:
properties:
entryId:
pattern: ^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+
type: string
item:
$ref: '#/components/schemas/ModuleEntry'
required:
- entryId
- item
SocialContext:
properties:
contextType:
type: string
text:
type: string
type:
type: string
type: object
TimelineMessagePrompt:
additionalProperties: true
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
TimelinePrompt:
additionalProperties: true
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
TimelineTimelineCursor:
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
cursorType:
$ref: '#/components/schemas/CursorType'
entryType:
$ref: '#/components/schemas/ContentEntryType'
itemType:
$ref: '#/components/schemas/ContentEntryType'
value:
type: string
required:
- __typename
- cursorType
- value
TimelineTimelineItem:
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
clientEventInfo:
$ref: '#/components/schemas/ClientEventInfo'
entryType:
$ref: '#/components/schemas/ContentEntryType'
feedbackInfo:
additionalProperties: true
type: object
itemContent:
$ref: '#/components/schemas/ItemContentUnion'
required:
- __typename
- entryType
- itemContent
TimelineTimelineModule:
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
type: string
clientEventInfo:
additionalProperties: true
type: object
displayType:
enum:
- Vertical
- VerticalConversation
type: string
entryType:
$ref: '#/components/schemas/ContentEntryType'
footer:
additionalProperties: true
type: object
header:
additionalProperties: true
type: object
items:
items:
$ref: '#/components/schemas/ModuleItem'
type: array
required:
- __typename
- entryType
- displayType
- clientEventInfo
TimelineTweet:
properties:
SocialContext:
$ref: '#/components/schemas/SocialContext'
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
itemType:
$ref: '#/components/schemas/ContentItemType'
promotedMetadata:
additionalProperties: true
type: object
tweetDisplayType:
type: string
tweet_results:
$ref: '#/components/schemas/ItemResult'
required:
- __typename
- itemType
- tweetDisplayType
- tweet_results
TimelineUser:
properties:
SocialContext:
$ref: '#/components/schemas/SocialContext'
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
itemType:
$ref: '#/components/schemas/ContentItemType'
userDisplayType:
enum:
- User
- UserDetailed
- SubscribableUser
type: string
user_results:
$ref: ./user.yaml#/components/schemas/UserResults
required:
- __typename
- itemType
- socialContext
- userDisplayType
- user_results
info:
title: Twitter OpenAPI
version: 0.0.1
openapi: 3.0.3
paths: {}