1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 23:50:26 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-04-12 03:47:57 +09:00
parent 3d54c8d9a7
commit 6fbb3310d8
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
5 changed files with 25 additions and 12 deletions

View file

@ -2,15 +2,17 @@ ContentUnion:
oneOf: oneOf:
- $ref: "#/TimelineTimelineItem" - $ref: "#/TimelineTimelineItem"
- $ref: "#/TimelineTimelineCursor" - $ref: "#/TimelineTimelineCursor"
- $ref: "#/TimelineTimelineModule"
discriminator: discriminator:
propertyName: entryType propertyName: entryType
mapping": # deprecated mapping": # deprecated
TimelineTimelineItem: "#/TimelineTimelineItem" TimelineTimelineItem: "#/TimelineTimelineItem"
TimelineTimelineCursor: "#/TimelineTimelineCursor" TimelineTimelineCursor: "#/TimelineTimelineCursor"
TimelineTimelineModule: "#/TimelineTimelineModule"
ContentEntryType: ContentEntryType:
type: string type: string
enum: [TimelineTimelineItem, TimelineTimelineCursor] enum: [TimelineTimelineItem, TimelineTimelineCursor, TimelineTimelineModule]
TimelineTimelineItem: TimelineTimelineItem:
required: required:
@ -47,3 +49,15 @@ TimelineTimelineCursor:
enum: [Top, Bottom] enum: [Top, Bottom]
value: value:
type: string type: string
TimelineTimelineModule:
required:
- "__typename"
- "entryType"
properties:
__typename:
$ref: "./TypeName.yaml#/TypeName" # TimelineTimelineModule
entryType:
type: string # enum
$ref: "#/ContentEntryType" # TimelineTimelineCursor

View file

@ -8,13 +8,7 @@ InstructionUnion:
InstructionType: InstructionType:
type: string type: string
enum: enum: [TimelineAddEntries]
[
TimelineAddEntries,
TimelineAddToModule,
TimelineTerminateTimeline,
TimelineShowAlert,
]
TimelineAddEntries: TimelineAddEntries:
required: required:

View file

@ -60,7 +60,6 @@ TweetLegacy:
required: required:
- "bookmark_count" - "bookmark_count"
- "bookmarked" - "bookmarked"
- "created_at"
- "conversation_id_str" - "conversation_id_str"
- "display_text_range" - "display_text_range"
- "entities" - "entities"

View file

@ -6,6 +6,7 @@ TypeName:
TimelineTimelineItem, TimelineTimelineItem,
TimelineTimelineCursor, TimelineTimelineCursor,
TweetWithVisibilityResults, TweetWithVisibilityResults,
TimelineTimelineModule,
Tweet, Tweet,
User, User,
] ]

View file

@ -64,11 +64,8 @@ UserLegacy:
- "blocking" - "blocking"
- "can_dm" - "can_dm"
- "can_media_tag" - "can_media_tag"
- "created_at"
- "default_profile" - "default_profile"
- "default_profile_image" - "default_profile_image"
- "description"
- "fast_followers_count"
- "favourites_count" - "favourites_count"
- "follow_request_sent" - "follow_request_sent"
- "followed_by" - "followed_by"
@ -103,14 +100,18 @@ UserLegacy:
default: false default: false
can_dm: can_dm:
type: boolean type: boolean
default: false
can_media_tag: can_media_tag:
type: boolean type: boolean
default: false
created_at: created_at:
type: string # Wed Jul 08 14:05:58 +0000 2009 type: string # Wed Jul 08 14:05:58 +0000 2009
default_profile: default_profile:
type: boolean type: boolean
default: false
default_profile_image: default_profile_image:
type: boolean type: boolean
default: false
description: description:
type: string type: string
entities: entities:
@ -134,8 +135,10 @@ UserLegacy:
type: integer type: integer
has_custom_timelines: has_custom_timelines:
type: boolean type: boolean
default: false
is_translator: is_translator:
type: boolean type: boolean
default: false
listed_count: listed_count:
type: integer type: integer
location: location:
@ -158,6 +161,7 @@ UserLegacy:
type: string type: string
possibly_sensitive: possibly_sensitive:
type: boolean type: boolean
default: false
profile_banner_extensions: profile_banner_extensions:
type: object type: object
profile_banner_url: profile_banner_url:
@ -183,3 +187,4 @@ UserLegacy:
type: boolean type: boolean
want_retweets: want_retweets:
type: boolean type: boolean
default: false