1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 23:50:26 +01:00

add TimelineTimelineModule

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-04-18 20:22:41 +09:00
parent a16f4a6915
commit 1b154a8327
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
4 changed files with 158 additions and 33 deletions

View file

@ -10,6 +10,7 @@ components:
enum:
- TimelineTweet
- TimelineTimelineCursor
- TimelineUser
type: string
ContentUnion:
discriminator:
@ -20,17 +21,19 @@ components:
propertyName: entryType
oneOf:
- $ref: '#/components/schemas/TimelineTimelineItem'
- $ref: '#/components/schemas/TimelineTimelineCursor'
- $ref: '#/components/schemas/TimelineTimelineModule'
- $ref: '#/components/schemas/TimelineTimelineCursor'
ItemContentUnion:
discriminator:
mapping":
TimelineTimelineCursor: '#/components/schemas/TimelineTimelineCursor'
TimelineTweet: '#/components/schemas/TimelineTweet'
TimelineUser: '#/components/schemas/TimelineUser'
propertyName: itemType
oneOf:
- $ref: '#/components/schemas/TimelineTweet'
- $ref: '#/components/schemas/TimelineTimelineCursor'
- $ref: '#/components/schemas/TimelineUser'
ItemResult:
properties:
__typename:
@ -39,6 +42,34 @@ components:
$ref: ./tweet.yaml#/components/schemas/TweetUnion
required:
- result
ModuleEntry:
properties:
clientEventInfo:
type: object
itemContent:
$ref: '#/components/schemas/ItemContentUnion'
required:
- clientEventInfo
- itemContent
ModuleItem:
properties:
entryId:
pattern: ^[a-z\-]+[0-9]+$
type: string
item:
$ref: '#/components/schemas/ModuleEntry'
required:
- entryId
- item
SocialContext:
properties:
contextType:
type: string
text:
type: string
type:
type: string
type: object
TimelineTimelineCursor:
properties:
__typename:
@ -47,6 +78,8 @@ components:
enum:
- Top
- Bottom
- ShowMore
- ShowMoreThreads
type: string
entryType:
$ref: '#/components/schemas/ContentEntryType'
@ -81,28 +114,36 @@ components:
properties:
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
clientEventInfo:
type: object
displayType:
type: string
entryType:
$ref: '#/components/schemas/ContentEntryType'
type: string
footer:
type: object
header:
type: object
items:
items:
$ref: '#/components/schemas/ModuleItem'
type: array
required:
- __typename
- entryType
- displayType
- items
- clientEventInfo
TimelineTweet:
properties:
SocialContext:
$ref: '#/components/schemas/SocialContext'
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
itemType:
$ref: '#/components/schemas/ContentItemType'
type: string
socialContext:
properties:
contextType:
type: string
text:
type: string
type:
type: string
type: object
tweetDisplayType:
type: string
tweet_results:
@ -112,6 +153,25 @@ components:
- itemType
- tweetDisplayType
- tweet_results
TimelineUser:
properties:
SocialContext:
$ref: '#/components/schemas/SocialContext'
__typename:
$ref: ./typename.yaml#/components/schemas/TypeName
itemType:
$ref: '#/components/schemas/ContentItemType'
type: string
userDisplayType:
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

View file

@ -4,6 +4,7 @@ components:
enum:
- TimelineTweet
- TimelineTimelineItem
- TimelineUser
- TimelineTimelineCursor
- TweetWithVisibilityResults
- TimelineTimelineModule