1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 15:40:26 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-09-01 12:47:26 +09:00
parent d1932aadd2
commit 7414fb6dba
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
3 changed files with 256 additions and 219 deletions

View file

@ -219,6 +219,13 @@ components:
required: required:
- content_type - content_type
- url - url
SelfThread:
properties:
id_str:
pattern: ^[0-9]+$
type: string
required:
- id_str
Symbol: Symbol:
additionalProperties: true additionalProperties: true
type: object type: object
@ -227,69 +234,13 @@ components:
__typename: __typename:
$ref: ./typename.yaml#/components/schemas/TypeName $ref: ./typename.yaml#/components/schemas/TypeName
card: card:
properties: $ref: '#/components/schemas/TweetCard'
legacy:
properties:
binding_values:
items:
properties:
key:
type: string
value:
properties:
boolean_value:
type: boolean
scribe_key:
type: string
string_value:
type: string
type:
type: string
required:
- type
type: object
required:
- key
- value
type: object
type: array
name:
type: string
url:
type: string
required:
- binding_values
- name
- url
type: object
rest_id:
type: string
type: object
core: core:
$ref: ./user.yaml#/components/schemas/UserResultCore $ref: ./user.yaml#/components/schemas/UserResultCore
edit_control: edit_control:
properties: $ref: '#/components/schemas/TweetEditControl'
edit_tweet_ids:
items:
pattern: ^[0-9]+$
type: string
type: array
editable_until_msecs:
pattern: ^[0-9]+$
type: string
edits_remaining:
pattern: ^[0-9]+$
type: string
is_edit_eligible:
type: boolean
type: object
edit_prespective: edit_prespective:
properties: $ref: '#/components/schemas/TweetEditPrespective'
favorited:
type: boolean
retweeted:
type: boolean
type: object
is_translatable: is_translatable:
default: false default: false
type: boolean type: boolean
@ -304,13 +255,7 @@ components:
additionalProperties: true additionalProperties: true
type: object type: object
views: views:
properties: $ref: '#/components/schemas/TweetView'
count:
pattern: ^[0-9]+$
type: string
state:
type: string
type: object
required: required:
- rest_id - rest_id
- core - core
@ -318,6 +263,68 @@ components:
- is_translatable - is_translatable
- legacy - legacy
- views - views
TweetCard:
properties:
legacy:
$ref: '#/components/schemas/TweetCardLegacy'
rest_id:
type: string
TweetCardLegacy:
properties:
binding_values:
items:
$ref: '#/components/schemas/TweetCardLegacyBindingValue'
type: array
name:
type: string
url:
type: string
required:
- binding_values
- name
- url
TweetCardLegacyBindingValue:
properties:
key:
type: string
value:
$ref: '#/components/schemas/TweetCardLegacyBindingValueData'
required:
- key
- value
TweetCardLegacyBindingValueData:
properties:
boolean_value:
type: boolean
scribe_key:
type: string
string_value:
type: string
type:
type: string
required:
- type
TweetEditControl:
properties:
edit_tweet_ids:
items:
pattern: ^[0-9]+$
type: string
type: array
editable_until_msecs:
pattern: ^[0-9]+$
type: string
edits_remaining:
pattern: ^[0-9]+$
type: string
is_edit_eligible:
type: boolean
TweetEditPrespective:
properties:
favorited:
type: boolean
retweeted:
type: boolean
TweetLegacy: TweetLegacy:
properties: properties:
bookmark_count: bookmark_count:
@ -367,13 +374,7 @@ components:
retweeted_status_result: retweeted_status_result:
$ref: ./content.yaml#/components/schemas/ItemResult $ref: ./content.yaml#/components/schemas/ItemResult
self_thread: self_thread:
properties: $ref: '#/components/schemas/SelfThread'
id_str:
pattern: ^[0-9]+$
type: string
required:
- id_str
type: object
user_id_str: user_id_str:
pattern: ^[0-9]+$ pattern: ^[0-9]+$
type: string type: string
@ -411,6 +412,15 @@ components:
- $ref: '#/components/schemas/Tweet' - $ref: '#/components/schemas/Tweet'
- $ref: '#/components/schemas/TweetWithVisibilityResults' - $ref: '#/components/schemas/TweetWithVisibilityResults'
- $ref: '#/components/schemas/TweetTombstone' - $ref: '#/components/schemas/TweetTombstone'
TweetView:
properties:
count:
pattern: ^[0-9]+$
type: string
state:
type: string
required:
- state
TweetWithVisibilityResults: TweetWithVisibilityResults:
properties: properties:
__typename: __typename:

View file

@ -219,6 +219,13 @@ components:
required: required:
- content_type - content_type
- url - url
SelfThread:
properties:
id_str:
pattern: ^[0-9]+$
type: string
required:
- id_str
Symbol: Symbol:
additionalProperties: true additionalProperties: true
type: object type: object
@ -227,69 +234,13 @@ components:
__typename: __typename:
$ref: ./typename.yaml#/components/schemas/TypeName $ref: ./typename.yaml#/components/schemas/TypeName
card: card:
properties: $ref: '#/components/schemas/TweetCard'
legacy:
properties:
binding_values:
items:
properties:
key:
type: string
value:
properties:
boolean_value:
type: boolean
scribe_key:
type: string
string_value:
type: string
type:
type: string
required:
- type
type: object
required:
- key
- value
type: object
type: array
name:
type: string
url:
type: string
required:
- binding_values
- name
- url
type: object
rest_id:
type: string
type: object
core: core:
$ref: ./user.yaml#/components/schemas/UserResultCore $ref: ./user.yaml#/components/schemas/UserResultCore
edit_control: edit_control:
properties: $ref: '#/components/schemas/TweetEditControl'
edit_tweet_ids:
items:
pattern: ^[0-9]+$
type: string
type: array
editable_until_msecs:
pattern: ^[0-9]+$
type: string
edits_remaining:
pattern: ^[0-9]+$
type: string
is_edit_eligible:
type: boolean
type: object
edit_prespective: edit_prespective:
properties: $ref: '#/components/schemas/TweetEditPrespective'
favorited:
type: boolean
retweeted:
type: boolean
type: object
is_translatable: is_translatable:
default: false default: false
type: boolean type: boolean
@ -304,13 +255,7 @@ components:
additionalProperties: true additionalProperties: true
type: object type: object
views: views:
properties: $ref: '#/components/schemas/TweetView'
count:
pattern: ^[0-9]+$
type: string
state:
type: string
type: object
required: required:
- rest_id - rest_id
- core - core
@ -318,6 +263,68 @@ components:
- is_translatable - is_translatable
- legacy - legacy
- views - views
TweetCard:
properties:
legacy:
$ref: '#/components/schemas/TweetCardLegacy'
rest_id:
type: string
TweetCardLegacy:
properties:
binding_values:
items:
$ref: '#/components/schemas/TweetCardLegacyBindingValue'
type: array
name:
type: string
url:
type: string
required:
- binding_values
- name
- url
TweetCardLegacyBindingValue:
properties:
key:
type: string
value:
$ref: '#/components/schemas/TweetCardLegacyBindingValueData'
required:
- key
- value
TweetCardLegacyBindingValueData:
properties:
boolean_value:
type: boolean
scribe_key:
type: string
string_value:
type: string
type:
type: string
required:
- type
TweetEditControl:
properties:
edit_tweet_ids:
items:
pattern: ^[0-9]+$
type: string
type: array
editable_until_msecs:
pattern: ^[0-9]+$
type: string
edits_remaining:
pattern: ^[0-9]+$
type: string
is_edit_eligible:
type: boolean
TweetEditPrespective:
properties:
favorited:
type: boolean
retweeted:
type: boolean
TweetLegacy: TweetLegacy:
properties: properties:
bookmark_count: bookmark_count:
@ -367,13 +374,7 @@ components:
retweeted_status_result: retweeted_status_result:
$ref: ./content.yaml#/components/schemas/ItemResult $ref: ./content.yaml#/components/schemas/ItemResult
self_thread: self_thread:
properties: $ref: '#/components/schemas/SelfThread'
id_str:
pattern: ^[0-9]+$
type: string
required:
- id_str
type: object
user_id_str: user_id_str:
pattern: ^[0-9]+$ pattern: ^[0-9]+$
type: string type: string
@ -411,6 +412,15 @@ components:
- $ref: '#/components/schemas/Tweet' - $ref: '#/components/schemas/Tweet'
- $ref: '#/components/schemas/TweetWithVisibilityResults' - $ref: '#/components/schemas/TweetWithVisibilityResults'
- $ref: '#/components/schemas/TweetTombstone' - $ref: '#/components/schemas/TweetTombstone'
TweetView:
properties:
count:
pattern: ^[0-9]+$
type: string
state:
type: string
required:
- state
TweetWithVisibilityResults: TweetWithVisibilityResults:
properties: properties:
__typename: __typename:

View file

@ -54,86 +54,101 @@ components:
core: core:
$ref: "./user.yaml#/components/schemas/UserResultCore" $ref: "./user.yaml#/components/schemas/UserResultCore"
card: card:
type: object $ref: "#/components/schemas/TweetCard"
properties:
rest_id:
type: string
legacy:
type: object
required:
- "binding_values"
- "name"
- "url"
properties:
name:
type: string
url:
type: string
binding_values:
type: array
items:
type: object
required:
- "key"
- "value"
properties:
key:
type: string
value:
type: object
required:
- "type"
properties:
string_value:
type: string
boolean_value:
type: boolean
scribe_key:
type: string
type:
type: string
unmention_data: unmention_data:
type: object type: object
additionalProperties: true # todo additionalProperties: true # todo
edit_control: edit_control:
type: object $ref: "#/components/schemas/TweetEditControl"
properties:
edit_tweet_ids:
type: array
items:
type: string
pattern: "^[0-9]+$"
editable_until_msecs:
type: string
pattern: "^[0-9]+$"
is_edit_eligible:
type: boolean
edits_remaining:
type: string
pattern: "^[0-9]+$"
edit_prespective: edit_prespective:
type: object $ref: "#/components/schemas/TweetEditPrespective"
properties:
favorited:
type: boolean
retweeted:
type: boolean
is_translatable: is_translatable:
type: boolean type: boolean
default: false default: false
legacy: legacy:
$ref: "#/components/schemas/TweetLegacy" $ref: "#/components/schemas/TweetLegacy"
views: views:
type: object $ref: "#/components/schemas/TweetView"
properties:
count:
type: string
pattern: "^[0-9]+$"
state:
type: string # enum
quoted_status_result: quoted_status_result:
$ref: "./content.yaml#/components/schemas/ItemResult" $ref: "./content.yaml#/components/schemas/ItemResult"
TweetEditControl:
properties:
edit_tweet_ids:
type: array
items:
type: string
pattern: "^[0-9]+$"
editable_until_msecs:
type: string
pattern: "^[0-9]+$"
is_edit_eligible:
type: boolean
edits_remaining:
type: string
pattern: "^[0-9]+$"
TweetEditPrespective:
properties:
favorited:
type: boolean
retweeted:
type: boolean
TweetView:
required:
- "state"
properties:
count:
type: string
pattern: "^[0-9]+$"
state:
type: string # enum
TweetCard:
properties:
rest_id:
type: string
legacy:
$ref: "#/components/schemas/TweetCardLegacy"
TweetCardLegacy:
required:
- "binding_values"
- "name"
- "url"
properties:
name:
type: string
url:
type: string
binding_values:
type: array
items:
$ref: "#/components/schemas/TweetCardLegacyBindingValue"
TweetCardLegacyBindingValue:
required:
- "key"
- "value"
properties:
key:
type: string
value:
$ref: "#/components/schemas/TweetCardLegacyBindingValueData"
TweetCardLegacyBindingValueData:
required:
- "type"
properties:
string_value:
type: string
boolean_value:
type: boolean
scribe_key:
type: string
type:
type: string
TweetLegacy: TweetLegacy:
required: required:
- "bookmark_count" - "bookmark_count"
@ -202,16 +217,18 @@ components:
type: string type: string
pattern: "^[0-9]+$" pattern: "^[0-9]+$"
self_thread: self_thread:
type: object $ref: "#/components/schemas/SelfThread"
required:
- "id_str"
properties:
id_str:
type: string
pattern: "^[0-9]+$"
extended_entities: extended_entities:
$ref: "#/components/schemas/ExtendedEntities" $ref: "#/components/schemas/ExtendedEntities"
SelfThread:
required:
- "id_str"
properties:
id_str:
type: string
pattern: "^[0-9]+$"
Entities: Entities:
required: required:
- "hashtags" - "hashtags"