mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-12 16:10:26 +01:00
Merge pull request #47 from fa0311/dev
add TimelineCommunity, Note Tweet, Community Note
This commit is contained in:
commit
68f45e8f75
6 changed files with 546 additions and 1 deletions
172
dist/compatible/openapi-3.0.yaml
vendored
172
dist/compatible/openapi-3.0.yaml
vendored
|
|
@ -6,6 +6,95 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
required:
|
required:
|
||||||
- monetizable
|
- monetizable
|
||||||
|
BirdwatchEntity:
|
||||||
|
properties:
|
||||||
|
fromIndex:
|
||||||
|
type: integer
|
||||||
|
ref:
|
||||||
|
$ref: '#/components/schemas/BirdwatchEntityRef'
|
||||||
|
toIndex:
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- fromIndex
|
||||||
|
- toIndex
|
||||||
|
- ref
|
||||||
|
BirdwatchEntityRef:
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- TimelineUrl
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
format: uri
|
||||||
|
type: string
|
||||||
|
urlType:
|
||||||
|
enum:
|
||||||
|
- ExternalUrl
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- url
|
||||||
|
- urlType
|
||||||
|
BirdwatchPivot:
|
||||||
|
properties:
|
||||||
|
destinationUrl:
|
||||||
|
format: uri
|
||||||
|
type: string
|
||||||
|
footer:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivotFooter'
|
||||||
|
iconType:
|
||||||
|
enum:
|
||||||
|
- BirdwatchV1Icon
|
||||||
|
type: string
|
||||||
|
note:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivotNote'
|
||||||
|
shorttitle:
|
||||||
|
type: string
|
||||||
|
subtitle:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivotSubtitle'
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
visualStyle:
|
||||||
|
enum:
|
||||||
|
- Default
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- destinationUrl
|
||||||
|
- footer
|
||||||
|
- note
|
||||||
|
- subtitle
|
||||||
|
- title
|
||||||
|
- shorttitle
|
||||||
|
- iconType
|
||||||
|
BirdwatchPivotFooter:
|
||||||
|
properties:
|
||||||
|
entities:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/BirdwatchEntity'
|
||||||
|
type: array
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- text
|
||||||
|
- entities
|
||||||
|
BirdwatchPivotNote:
|
||||||
|
properties:
|
||||||
|
rest_id:
|
||||||
|
pattern: ^[0-9]+$
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- rest_id
|
||||||
|
BirdwatchPivotSubtitle:
|
||||||
|
properties:
|
||||||
|
entities:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/BirdwatchEntity'
|
||||||
|
type: array
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- text
|
||||||
|
- entities
|
||||||
BookmarksResponse:
|
BookmarksResponse:
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
|
|
@ -60,6 +149,7 @@ components:
|
||||||
- TimelineUser
|
- TimelineUser
|
||||||
- TimelinePrompt
|
- TimelinePrompt
|
||||||
- TimelineMessagePrompt
|
- TimelineMessagePrompt
|
||||||
|
- TimelineCommunity
|
||||||
type: string
|
type: string
|
||||||
ContentUnion:
|
ContentUnion:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
|
@ -427,6 +517,7 @@ components:
|
||||||
ItemContentUnion:
|
ItemContentUnion:
|
||||||
discriminator:
|
discriminator:
|
||||||
mapping":
|
mapping":
|
||||||
|
TimelineCommunity: '#/components/schemas/TimelineCommunity'
|
||||||
TimelineMessagePrompt: '#/components/schemas/TimelineMessagePrompt'
|
TimelineMessagePrompt: '#/components/schemas/TimelineMessagePrompt'
|
||||||
TimelinePrompt: '#/components/schemas/TimelinePrompt'
|
TimelinePrompt: '#/components/schemas/TimelinePrompt'
|
||||||
TimelineTimelineCursor: '#/components/schemas/TimelineTimelineCursor'
|
TimelineTimelineCursor: '#/components/schemas/TimelineTimelineCursor'
|
||||||
|
|
@ -439,6 +530,7 @@ components:
|
||||||
- $ref: '#/components/schemas/TimelineUser'
|
- $ref: '#/components/schemas/TimelineUser'
|
||||||
- $ref: '#/components/schemas/TimelinePrompt'
|
- $ref: '#/components/schemas/TimelinePrompt'
|
||||||
- $ref: '#/components/schemas/TimelineMessagePrompt'
|
- $ref: '#/components/schemas/TimelineMessagePrompt'
|
||||||
|
- $ref: '#/components/schemas/TimelineCommunity'
|
||||||
ItemResult:
|
ItemResult:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
|
|
@ -679,6 +771,71 @@ components:
|
||||||
required:
|
required:
|
||||||
- entryId
|
- entryId
|
||||||
- item
|
- item
|
||||||
|
NoteTweet:
|
||||||
|
properties:
|
||||||
|
is_expandable:
|
||||||
|
type: boolean
|
||||||
|
note_tweet_results:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResult'
|
||||||
|
required:
|
||||||
|
- is_expandable
|
||||||
|
- note_tweet_results
|
||||||
|
NoteTweetResult:
|
||||||
|
properties:
|
||||||
|
result:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultData'
|
||||||
|
required:
|
||||||
|
- result
|
||||||
|
NoteTweetResultData:
|
||||||
|
properties:
|
||||||
|
entity_set:
|
||||||
|
$ref: '#/components/schemas/Entities'
|
||||||
|
id:
|
||||||
|
pattern: ^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$
|
||||||
|
type: string
|
||||||
|
media:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultMedia'
|
||||||
|
richtext:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultRichText'
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- entity_set
|
||||||
|
- id
|
||||||
|
- text
|
||||||
|
NoteTweetResultMedia:
|
||||||
|
properties:
|
||||||
|
inline_media:
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- inline_media
|
||||||
|
NoteTweetResultRichText:
|
||||||
|
properties:
|
||||||
|
richtext_tags:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultRichTextTag'
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- richtext_tags
|
||||||
|
NoteTweetResultRichTextTag:
|
||||||
|
properties:
|
||||||
|
from_index:
|
||||||
|
type: integer
|
||||||
|
richtext_types:
|
||||||
|
items:
|
||||||
|
enum:
|
||||||
|
- Bold
|
||||||
|
- Italic
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
to_index:
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- from_index
|
||||||
|
- to_index
|
||||||
|
- richtext_types
|
||||||
OneFactorLoginEligibility:
|
OneFactorLoginEligibility:
|
||||||
properties:
|
properties:
|
||||||
fetchStatus:
|
fetchStatus:
|
||||||
|
|
@ -914,6 +1071,11 @@ components:
|
||||||
$ref: '#/components/schemas/InstructionType'
|
$ref: '#/components/schemas/InstructionType'
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
|
TimelineCommunity:
|
||||||
|
additionalProperties: true
|
||||||
|
properties:
|
||||||
|
__typename:
|
||||||
|
$ref: '#/components/schemas/TypeName'
|
||||||
TimelineCoverBehavior:
|
TimelineCoverBehavior:
|
||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
|
|
@ -1176,6 +1338,8 @@ components:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
$ref: '#/components/schemas/TypeName'
|
$ref: '#/components/schemas/TypeName'
|
||||||
|
birdwatch_pivot:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivot'
|
||||||
card:
|
card:
|
||||||
$ref: '#/components/schemas/TweetCard'
|
$ref: '#/components/schemas/TweetCard'
|
||||||
core:
|
core:
|
||||||
|
|
@ -1189,6 +1353,10 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
legacy:
|
legacy:
|
||||||
$ref: '#/components/schemas/TweetLegacy'
|
$ref: '#/components/schemas/TweetLegacy'
|
||||||
|
note_tweet:
|
||||||
|
$ref: '#/components/schemas/NoteTweet'
|
||||||
|
quick_promote_eligibility:
|
||||||
|
type: object
|
||||||
quoted_status_result:
|
quoted_status_result:
|
||||||
$ref: '#/components/schemas/ItemResult'
|
$ref: '#/components/schemas/ItemResult'
|
||||||
rest_id:
|
rest_id:
|
||||||
|
|
@ -1465,6 +1633,7 @@ components:
|
||||||
- TweetTombstone
|
- TweetTombstone
|
||||||
- TimelinePrompt
|
- TimelinePrompt
|
||||||
- TimelineMessagePrompt
|
- TimelineMessagePrompt
|
||||||
|
- TimelineCommunity
|
||||||
- TweetUnavailable
|
- TweetUnavailable
|
||||||
- Tweet
|
- Tweet
|
||||||
- User
|
- User
|
||||||
|
|
@ -1860,9 +2029,12 @@ components:
|
||||||
- users
|
- users
|
||||||
extMediaAvailability:
|
extMediaAvailability:
|
||||||
properties:
|
properties:
|
||||||
|
reason:
|
||||||
|
type: string
|
||||||
status:
|
status:
|
||||||
enum:
|
enum:
|
||||||
- Available
|
- Available
|
||||||
|
- Unavailable
|
||||||
type: string
|
type: string
|
||||||
mediaStats:
|
mediaStats:
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
172
dist/docs/openapi-3.0.yaml
vendored
172
dist/docs/openapi-3.0.yaml
vendored
|
|
@ -6,6 +6,95 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
required:
|
required:
|
||||||
- monetizable
|
- monetizable
|
||||||
|
BirdwatchEntity:
|
||||||
|
properties:
|
||||||
|
fromIndex:
|
||||||
|
type: integer
|
||||||
|
ref:
|
||||||
|
$ref: '#/components/schemas/BirdwatchEntityRef'
|
||||||
|
toIndex:
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- fromIndex
|
||||||
|
- toIndex
|
||||||
|
- ref
|
||||||
|
BirdwatchEntityRef:
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
enum:
|
||||||
|
- TimelineUrl
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
format: uri
|
||||||
|
type: string
|
||||||
|
urlType:
|
||||||
|
enum:
|
||||||
|
- ExternalUrl
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- url
|
||||||
|
- urlType
|
||||||
|
BirdwatchPivot:
|
||||||
|
properties:
|
||||||
|
destinationUrl:
|
||||||
|
format: uri
|
||||||
|
type: string
|
||||||
|
footer:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivotFooter'
|
||||||
|
iconType:
|
||||||
|
enum:
|
||||||
|
- BirdwatchV1Icon
|
||||||
|
type: string
|
||||||
|
note:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivotNote'
|
||||||
|
shorttitle:
|
||||||
|
type: string
|
||||||
|
subtitle:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivotSubtitle'
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
visualStyle:
|
||||||
|
enum:
|
||||||
|
- Default
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- destinationUrl
|
||||||
|
- footer
|
||||||
|
- note
|
||||||
|
- subtitle
|
||||||
|
- title
|
||||||
|
- shorttitle
|
||||||
|
- iconType
|
||||||
|
BirdwatchPivotFooter:
|
||||||
|
properties:
|
||||||
|
entities:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/BirdwatchEntity'
|
||||||
|
type: array
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- text
|
||||||
|
- entities
|
||||||
|
BirdwatchPivotNote:
|
||||||
|
properties:
|
||||||
|
rest_id:
|
||||||
|
pattern: ^[0-9]+$
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- rest_id
|
||||||
|
BirdwatchPivotSubtitle:
|
||||||
|
properties:
|
||||||
|
entities:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/BirdwatchEntity'
|
||||||
|
type: array
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- text
|
||||||
|
- entities
|
||||||
BookmarksResponse:
|
BookmarksResponse:
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
|
|
@ -60,6 +149,7 @@ components:
|
||||||
- TimelineUser
|
- TimelineUser
|
||||||
- TimelinePrompt
|
- TimelinePrompt
|
||||||
- TimelineMessagePrompt
|
- TimelineMessagePrompt
|
||||||
|
- TimelineCommunity
|
||||||
type: string
|
type: string
|
||||||
ContentUnion:
|
ContentUnion:
|
||||||
discriminator:
|
discriminator:
|
||||||
|
|
@ -427,6 +517,7 @@ components:
|
||||||
ItemContentUnion:
|
ItemContentUnion:
|
||||||
discriminator:
|
discriminator:
|
||||||
mapping":
|
mapping":
|
||||||
|
TimelineCommunity: '#/components/schemas/TimelineCommunity'
|
||||||
TimelineMessagePrompt: '#/components/schemas/TimelineMessagePrompt'
|
TimelineMessagePrompt: '#/components/schemas/TimelineMessagePrompt'
|
||||||
TimelinePrompt: '#/components/schemas/TimelinePrompt'
|
TimelinePrompt: '#/components/schemas/TimelinePrompt'
|
||||||
TimelineTimelineCursor: '#/components/schemas/TimelineTimelineCursor'
|
TimelineTimelineCursor: '#/components/schemas/TimelineTimelineCursor'
|
||||||
|
|
@ -439,6 +530,7 @@ components:
|
||||||
- $ref: '#/components/schemas/TimelineUser'
|
- $ref: '#/components/schemas/TimelineUser'
|
||||||
- $ref: '#/components/schemas/TimelinePrompt'
|
- $ref: '#/components/schemas/TimelinePrompt'
|
||||||
- $ref: '#/components/schemas/TimelineMessagePrompt'
|
- $ref: '#/components/schemas/TimelineMessagePrompt'
|
||||||
|
- $ref: '#/components/schemas/TimelineCommunity'
|
||||||
ItemResult:
|
ItemResult:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
|
|
@ -679,6 +771,71 @@ components:
|
||||||
required:
|
required:
|
||||||
- entryId
|
- entryId
|
||||||
- item
|
- item
|
||||||
|
NoteTweet:
|
||||||
|
properties:
|
||||||
|
is_expandable:
|
||||||
|
type: boolean
|
||||||
|
note_tweet_results:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResult'
|
||||||
|
required:
|
||||||
|
- is_expandable
|
||||||
|
- note_tweet_results
|
||||||
|
NoteTweetResult:
|
||||||
|
properties:
|
||||||
|
result:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultData'
|
||||||
|
required:
|
||||||
|
- result
|
||||||
|
NoteTweetResultData:
|
||||||
|
properties:
|
||||||
|
entity_set:
|
||||||
|
$ref: '#/components/schemas/Entities'
|
||||||
|
id:
|
||||||
|
pattern: ^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$
|
||||||
|
type: string
|
||||||
|
media:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultMedia'
|
||||||
|
richtext:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultRichText'
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- entity_set
|
||||||
|
- id
|
||||||
|
- text
|
||||||
|
NoteTweetResultMedia:
|
||||||
|
properties:
|
||||||
|
inline_media:
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- inline_media
|
||||||
|
NoteTweetResultRichText:
|
||||||
|
properties:
|
||||||
|
richtext_tags:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/NoteTweetResultRichTextTag'
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- richtext_tags
|
||||||
|
NoteTweetResultRichTextTag:
|
||||||
|
properties:
|
||||||
|
from_index:
|
||||||
|
type: integer
|
||||||
|
richtext_types:
|
||||||
|
items:
|
||||||
|
enum:
|
||||||
|
- Bold
|
||||||
|
- Italic
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
to_index:
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- from_index
|
||||||
|
- to_index
|
||||||
|
- richtext_types
|
||||||
OneFactorLoginEligibility:
|
OneFactorLoginEligibility:
|
||||||
properties:
|
properties:
|
||||||
fetchStatus:
|
fetchStatus:
|
||||||
|
|
@ -914,6 +1071,11 @@ components:
|
||||||
$ref: '#/components/schemas/InstructionType'
|
$ref: '#/components/schemas/InstructionType'
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
|
TimelineCommunity:
|
||||||
|
additionalProperties: true
|
||||||
|
properties:
|
||||||
|
__typename:
|
||||||
|
$ref: '#/components/schemas/TypeName'
|
||||||
TimelineCoverBehavior:
|
TimelineCoverBehavior:
|
||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
|
|
@ -1176,6 +1338,8 @@ components:
|
||||||
properties:
|
properties:
|
||||||
__typename:
|
__typename:
|
||||||
$ref: '#/components/schemas/TypeName'
|
$ref: '#/components/schemas/TypeName'
|
||||||
|
birdwatch_pivot:
|
||||||
|
$ref: '#/components/schemas/BirdwatchPivot'
|
||||||
card:
|
card:
|
||||||
$ref: '#/components/schemas/TweetCard'
|
$ref: '#/components/schemas/TweetCard'
|
||||||
core:
|
core:
|
||||||
|
|
@ -1189,6 +1353,10 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
legacy:
|
legacy:
|
||||||
$ref: '#/components/schemas/TweetLegacy'
|
$ref: '#/components/schemas/TweetLegacy'
|
||||||
|
note_tweet:
|
||||||
|
$ref: '#/components/schemas/NoteTweet'
|
||||||
|
quick_promote_eligibility:
|
||||||
|
type: object
|
||||||
quoted_status_result:
|
quoted_status_result:
|
||||||
$ref: '#/components/schemas/ItemResult'
|
$ref: '#/components/schemas/ItemResult'
|
||||||
rest_id:
|
rest_id:
|
||||||
|
|
@ -1465,6 +1633,7 @@ components:
|
||||||
- TweetTombstone
|
- TweetTombstone
|
||||||
- TimelinePrompt
|
- TimelinePrompt
|
||||||
- TimelineMessagePrompt
|
- TimelineMessagePrompt
|
||||||
|
- TimelineCommunity
|
||||||
- TweetUnavailable
|
- TweetUnavailable
|
||||||
- Tweet
|
- Tweet
|
||||||
- User
|
- User
|
||||||
|
|
@ -1860,9 +2029,12 @@ components:
|
||||||
- users
|
- users
|
||||||
extMediaAvailability:
|
extMediaAvailability:
|
||||||
properties:
|
properties:
|
||||||
|
reason:
|
||||||
|
type: string
|
||||||
status:
|
status:
|
||||||
enum:
|
enum:
|
||||||
- Available
|
- Available
|
||||||
|
- Unavailable
|
||||||
type: string
|
type: string
|
||||||
mediaStats:
|
mediaStats:
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ components:
|
||||||
- $ref: "#/components/schemas/TimelineUser"
|
- $ref: "#/components/schemas/TimelineUser"
|
||||||
- $ref: "#/components/schemas/TimelinePrompt"
|
- $ref: "#/components/schemas/TimelinePrompt"
|
||||||
- $ref: "#/components/schemas/TimelineMessagePrompt"
|
- $ref: "#/components/schemas/TimelineMessagePrompt"
|
||||||
|
- $ref: "#/components/schemas/TimelineCommunity"
|
||||||
|
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: __typename
|
propertyName: __typename
|
||||||
|
|
@ -134,6 +135,7 @@ components:
|
||||||
TimelineUser: "#/components/schemas/TimelineUser"
|
TimelineUser: "#/components/schemas/TimelineUser"
|
||||||
TimelinePrompt: "#/components/schemas/TimelinePrompt"
|
TimelinePrompt: "#/components/schemas/TimelinePrompt"
|
||||||
TimelineMessagePrompt: "#/components/schemas/TimelineMessagePrompt"
|
TimelineMessagePrompt: "#/components/schemas/TimelineMessagePrompt"
|
||||||
|
TimelineCommunity: "#/components/schemas/TimelineCommunity"
|
||||||
|
|
||||||
ContentItemType:
|
ContentItemType:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -144,6 +146,7 @@ components:
|
||||||
TimelineUser,
|
TimelineUser,
|
||||||
TimelinePrompt,
|
TimelinePrompt,
|
||||||
TimelineMessagePrompt,
|
TimelineMessagePrompt,
|
||||||
|
TimelineCommunity,
|
||||||
]
|
]
|
||||||
|
|
||||||
TimelineTweet:
|
TimelineTweet:
|
||||||
|
|
@ -216,6 +219,12 @@ components:
|
||||||
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineMessagePrompt
|
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineMessagePrompt
|
||||||
additionalProperties: true # todo
|
additionalProperties: true # todo
|
||||||
|
|
||||||
|
TimelineCommunity:
|
||||||
|
properties:
|
||||||
|
__typename:
|
||||||
|
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineCommunity
|
||||||
|
additionalProperties: true # todo
|
||||||
|
|
||||||
ClientEventInfo:
|
ClientEventInfo:
|
||||||
properties:
|
properties:
|
||||||
component:
|
component:
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,8 @@ components:
|
||||||
rest_id:
|
rest_id:
|
||||||
type: string
|
type: string
|
||||||
pattern: "^[0-9]+$"
|
pattern: "^[0-9]+$"
|
||||||
|
birdwatch_pivot:
|
||||||
|
$ref: "#/components/schemas/BirdwatchPivot"
|
||||||
core:
|
core:
|
||||||
$ref: "./user.yaml#/components/schemas/UserResultCore"
|
$ref: "./user.yaml#/components/schemas/UserResultCore"
|
||||||
card:
|
card:
|
||||||
|
|
@ -74,6 +76,10 @@ components:
|
||||||
$ref: "#/components/schemas/TweetView"
|
$ref: "#/components/schemas/TweetView"
|
||||||
quoted_status_result:
|
quoted_status_result:
|
||||||
$ref: "./content.yaml#/components/schemas/ItemResult"
|
$ref: "./content.yaml#/components/schemas/ItemResult"
|
||||||
|
note_tweet:
|
||||||
|
$ref: "#/components/schemas/NoteTweet"
|
||||||
|
quick_promote_eligibility:
|
||||||
|
type: object
|
||||||
|
|
||||||
TweetEditControl:
|
TweetEditControl:
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -134,6 +140,165 @@ components:
|
||||||
type: string
|
type: string
|
||||||
enum: [EnabledWithCount]
|
enum: [EnabledWithCount]
|
||||||
|
|
||||||
|
NoteTweet:
|
||||||
|
required:
|
||||||
|
- "is_expandable"
|
||||||
|
- "note_tweet_results"
|
||||||
|
properties:
|
||||||
|
is_expandable:
|
||||||
|
type: boolean
|
||||||
|
note_tweet_results:
|
||||||
|
$ref: "#/components/schemas/NoteTweetResult"
|
||||||
|
|
||||||
|
NoteTweetResult:
|
||||||
|
required:
|
||||||
|
- "result"
|
||||||
|
properties:
|
||||||
|
result:
|
||||||
|
$ref: "#/components/schemas/NoteTweetResultData"
|
||||||
|
|
||||||
|
NoteTweetResultData:
|
||||||
|
required:
|
||||||
|
- "entity_set"
|
||||||
|
- "id"
|
||||||
|
- "text"
|
||||||
|
properties:
|
||||||
|
entity_set:
|
||||||
|
$ref: "#/components/schemas/Entities"
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
pattern: "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$" # base64
|
||||||
|
media:
|
||||||
|
$ref: "#/components/schemas/NoteTweetResultMedia"
|
||||||
|
richtext:
|
||||||
|
$ref: "#/components/schemas/NoteTweetResultRichText"
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
NoteTweetResultMedia:
|
||||||
|
required:
|
||||||
|
- "inline_media"
|
||||||
|
properties:
|
||||||
|
inline_media:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
NoteTweetResultRichText:
|
||||||
|
required:
|
||||||
|
- "richtext_tags"
|
||||||
|
properties:
|
||||||
|
richtext_tags:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/NoteTweetResultRichTextTag"
|
||||||
|
|
||||||
|
NoteTweetResultRichTextTag:
|
||||||
|
required:
|
||||||
|
- "from_index"
|
||||||
|
- "to_index"
|
||||||
|
- "richtext_types"
|
||||||
|
properties:
|
||||||
|
from_index:
|
||||||
|
type: integer
|
||||||
|
to_index:
|
||||||
|
type: integer
|
||||||
|
richtext_types:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
enum: [Bold, Italic]
|
||||||
|
|
||||||
|
BirdwatchPivot:
|
||||||
|
required:
|
||||||
|
- "destinationUrl"
|
||||||
|
- "footer"
|
||||||
|
- "note"
|
||||||
|
- "subtitle"
|
||||||
|
- "title"
|
||||||
|
- "shorttitle"
|
||||||
|
- "iconType"
|
||||||
|
properties:
|
||||||
|
destinationUrl:
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
footer:
|
||||||
|
$ref: "#/components/schemas/BirdwatchPivotFooter"
|
||||||
|
note:
|
||||||
|
$ref: "#/components/schemas/BirdwatchPivotNote"
|
||||||
|
subtitle:
|
||||||
|
$ref: "#/components/schemas/BirdwatchPivotSubtitle"
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
shorttitle:
|
||||||
|
type: string
|
||||||
|
visualStyle:
|
||||||
|
type: string
|
||||||
|
enum: [Default]
|
||||||
|
iconType:
|
||||||
|
type: string
|
||||||
|
enum: [BirdwatchV1Icon]
|
||||||
|
|
||||||
|
BirdwatchPivotFooter:
|
||||||
|
required:
|
||||||
|
- "text"
|
||||||
|
- "entities"
|
||||||
|
properties:
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
entities:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/BirdwatchEntity"
|
||||||
|
|
||||||
|
BirdwatchEntity:
|
||||||
|
required:
|
||||||
|
- "fromIndex"
|
||||||
|
- "toIndex"
|
||||||
|
- "ref"
|
||||||
|
properties:
|
||||||
|
fromIndex:
|
||||||
|
type: integer
|
||||||
|
toIndex:
|
||||||
|
type: integer
|
||||||
|
ref:
|
||||||
|
$ref: "#/components/schemas/BirdwatchEntityRef"
|
||||||
|
|
||||||
|
BirdwatchEntityRef:
|
||||||
|
required:
|
||||||
|
- "type"
|
||||||
|
- "url"
|
||||||
|
- "urlType"
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
enum: [TimelineUrl]
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
urlType:
|
||||||
|
type: string
|
||||||
|
enum: [ExternalUrl]
|
||||||
|
|
||||||
|
BirdwatchPivotNote:
|
||||||
|
required:
|
||||||
|
- "rest_id"
|
||||||
|
properties:
|
||||||
|
rest_id:
|
||||||
|
type: string
|
||||||
|
pattern: "^[0-9]+$"
|
||||||
|
|
||||||
|
BirdwatchPivotSubtitle:
|
||||||
|
required:
|
||||||
|
- "text"
|
||||||
|
- "entities"
|
||||||
|
properties:
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
entities:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/BirdwatchEntity"
|
||||||
|
|
||||||
TweetCard:
|
TweetCard:
|
||||||
properties:
|
properties:
|
||||||
rest_id:
|
rest_id:
|
||||||
|
|
@ -500,9 +665,11 @@ components:
|
||||||
# required:
|
# required:
|
||||||
# - "status"
|
# - "status"
|
||||||
properties:
|
properties:
|
||||||
|
reason:
|
||||||
|
type: string # enum Dmcaed
|
||||||
status:
|
status:
|
||||||
type: string
|
type: string
|
||||||
enum: [Available]
|
enum: [Available, Unavailable]
|
||||||
|
|
||||||
MediaSizes:
|
MediaSizes:
|
||||||
required:
|
required:
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ components:
|
||||||
TweetTombstone,
|
TweetTombstone,
|
||||||
TimelinePrompt,
|
TimelinePrompt,
|
||||||
TimelineMessagePrompt,
|
TimelineMessagePrompt,
|
||||||
|
TimelineCommunity,
|
||||||
TweetUnavailable,
|
TweetUnavailable,
|
||||||
Tweet,
|
Tweet,
|
||||||
User,
|
User,
|
||||||
|
|
|
||||||
|
|
@ -256,5 +256,29 @@ if __name__ == "__main__":
|
||||||
error_dump(e)
|
error_dump(e)
|
||||||
error_count += 1
|
error_count += 1
|
||||||
|
|
||||||
|
try:
|
||||||
|
logger.info(f"Try: Self TweetDetail Test")
|
||||||
|
kwargs = get_kwargs("TweetDetail", {"focalTweetId": "1720975693524377759"})
|
||||||
|
res = pt.TweetApi(api_client).get_tweet_detail_with_http_info(**kwargs)
|
||||||
|
data = res.data.to_dict()
|
||||||
|
|
||||||
|
rate = match_rate(data, json.loads(res.raw_data))
|
||||||
|
logger.info(f"Match rate: {rate}")
|
||||||
|
except Exception as e:
|
||||||
|
error_dump(e)
|
||||||
|
error_count += 1
|
||||||
|
|
||||||
|
try:
|
||||||
|
logger.info(f"Try: Self TweetDetail Test")
|
||||||
|
kwargs = get_kwargs("TweetDetail", {"focalTweetId": "1720818185186791678"})
|
||||||
|
res = pt.TweetApi(api_client).get_tweet_detail_with_http_info(**kwargs)
|
||||||
|
data = res.data.to_dict()
|
||||||
|
|
||||||
|
rate = match_rate(data, json.loads(res.raw_data))
|
||||||
|
logger.info(f"Match rate: {rate}")
|
||||||
|
except Exception as e:
|
||||||
|
error_dump(e)
|
||||||
|
error_count += 1
|
||||||
|
|
||||||
if error_count > 0:
|
if error_count > 0:
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue