mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
add Entities
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
8b19677694
commit
dd0869a6f5
2 changed files with 200 additions and 2 deletions
99
dist/schemas/tweet.yaml
vendored
99
dist/schemas/tweet.yaml
vendored
|
|
@ -1,5 +1,96 @@
|
|||
components:
|
||||
schemas:
|
||||
Entities:
|
||||
properties:
|
||||
hashtags:
|
||||
items:
|
||||
$ref: '#/components/schemas/Hashtag'
|
||||
type: array
|
||||
media:
|
||||
items:
|
||||
$ref: '#/components/schemas/Media'
|
||||
type: array
|
||||
symbols:
|
||||
items:
|
||||
$ref: '#/components/schemas/Symbol'
|
||||
type: array
|
||||
urls:
|
||||
items:
|
||||
$ref: '#/components/schemas/Url'
|
||||
type: array
|
||||
user_mentions:
|
||||
items:
|
||||
$ref: '#/components/schemas/UserMention'
|
||||
type: array
|
||||
required:
|
||||
- hashtags
|
||||
- symbols
|
||||
- user_mentions
|
||||
- urls
|
||||
- media
|
||||
ExtendedEntities:
|
||||
properties:
|
||||
media:
|
||||
items:
|
||||
$ref: '#/components/schemas/Media'
|
||||
type: array
|
||||
required:
|
||||
- media
|
||||
Hashtag:
|
||||
type: object
|
||||
Media:
|
||||
properties:
|
||||
display_url:
|
||||
format: uri
|
||||
type: string
|
||||
expanded_url:
|
||||
format: uri
|
||||
type: string
|
||||
ext_media_availability:
|
||||
type: object
|
||||
id_str:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
indices:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
media_key:
|
||||
pattern: ^[0-9]+_[0-9]+$
|
||||
type: string
|
||||
media_url_https:
|
||||
format: uri
|
||||
type: string
|
||||
original_info:
|
||||
properties:
|
||||
focus_rects:
|
||||
items:
|
||||
type: object
|
||||
type: array
|
||||
height:
|
||||
type: integer
|
||||
width:
|
||||
type: integer
|
||||
type: object
|
||||
sizes:
|
||||
type: object
|
||||
type:
|
||||
type: string
|
||||
url:
|
||||
format: uri
|
||||
type: string
|
||||
required:
|
||||
- id_str
|
||||
- indices
|
||||
- media_url_https
|
||||
- url
|
||||
- display_url
|
||||
- expanded_url
|
||||
- type
|
||||
- sizes
|
||||
- original_info
|
||||
Symbol:
|
||||
type: object
|
||||
Tweet:
|
||||
properties:
|
||||
__typename:
|
||||
|
|
@ -73,7 +164,9 @@ components:
|
|||
type: integer
|
||||
type: array
|
||||
entities:
|
||||
type: object
|
||||
$ref: '#/components/schemas/Entities'
|
||||
extended_entities:
|
||||
$ref: '#/components/schemas/ExtendedEntities'
|
||||
favorite_count:
|
||||
type: integer
|
||||
favorited:
|
||||
|
|
@ -148,6 +241,10 @@ components:
|
|||
required:
|
||||
- __typename
|
||||
- tweet
|
||||
Url:
|
||||
type: object
|
||||
UserMention:
|
||||
type: object
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ components:
|
|||
items:
|
||||
type: integer
|
||||
entities:
|
||||
type: object
|
||||
$ref: "#/components/schemas/Entities"
|
||||
favorite_count:
|
||||
type: integer
|
||||
favorited:
|
||||
|
|
@ -161,3 +161,104 @@ components:
|
|||
id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
extended_entities:
|
||||
$ref: "#/components/schemas/ExtendedEntities"
|
||||
|
||||
Entities:
|
||||
required:
|
||||
- "hashtags"
|
||||
- "symbols"
|
||||
- "user_mentions"
|
||||
- "urls"
|
||||
- "media"
|
||||
properties:
|
||||
hashtags:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Hashtag"
|
||||
symbols:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Symbol"
|
||||
user_mentions:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/UserMention"
|
||||
urls:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Url"
|
||||
media:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Media"
|
||||
|
||||
Hashtag:
|
||||
type: object # todo
|
||||
Symbol:
|
||||
type: object # todo
|
||||
UserMention:
|
||||
type: object # todo
|
||||
Url:
|
||||
type: object # todo
|
||||
|
||||
ExtendedEntities:
|
||||
required:
|
||||
- "media"
|
||||
properties:
|
||||
media:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Media"
|
||||
|
||||
Media:
|
||||
required:
|
||||
- "id_str"
|
||||
- "indices"
|
||||
- "media_url_https"
|
||||
- "url"
|
||||
- "display_url"
|
||||
- "expanded_url"
|
||||
- "type"
|
||||
- "sizes"
|
||||
- "original_info"
|
||||
properties:
|
||||
id_str:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
indices:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
media_url_https:
|
||||
type: string
|
||||
format: uri
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
display_url:
|
||||
type: string
|
||||
format: uri
|
||||
expanded_url:
|
||||
type: string
|
||||
format: uri
|
||||
type:
|
||||
type: string # enum
|
||||
sizes:
|
||||
type: object # todo
|
||||
original_info:
|
||||
type: object
|
||||
properties:
|
||||
height:
|
||||
type: integer
|
||||
width:
|
||||
type: integer
|
||||
focus_rects:
|
||||
type: array
|
||||
items:
|
||||
type: object # todo
|
||||
media_key:
|
||||
type: string
|
||||
pattern: "^[0-9]+_[0-9]+$"
|
||||
ext_media_availability:
|
||||
type: object # todo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue