mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 07:30:37 +01:00
151 lines
3.7 KiB
YAML
151 lines
3.7 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: Twitter OpenAPI
|
|
version: 0.0.1
|
|
|
|
paths: {}
|
|
|
|
components:
|
|
schemas:
|
|
TweetUnion:
|
|
oneOf:
|
|
- $ref: "#/components/schemas/Tweet"
|
|
- $ref: "#/components/schemas/TweetWithVisibilityResults"
|
|
discriminator:
|
|
propertyName: __typename
|
|
mapping": # deprecated
|
|
Tweet: "#/components/schemas/Tweet"
|
|
TweetWithVisibilityResults: "#/components/schemas/TweetWithVisibilityResults"
|
|
|
|
TweetWithVisibilityResults:
|
|
required:
|
|
- "__typename"
|
|
- "tweet"
|
|
properties:
|
|
__typename:
|
|
$ref: "./typename.yaml#/components/schemas/TypeName" # TweetWithVisibilityResults
|
|
tweet:
|
|
$ref: "#/components/schemas/Tweet"
|
|
|
|
Tweet:
|
|
required:
|
|
- "rest_id"
|
|
- "core"
|
|
- "edit_control"
|
|
- "edit_prespective"
|
|
- "is_translatable"
|
|
- "legacy"
|
|
- "views"
|
|
|
|
properties:
|
|
__typename:
|
|
$ref: "./typename.yaml#/components/schemas/TypeName" # null | Tweet
|
|
rest_id:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|
|
core:
|
|
$ref: "./user.yaml#/components/schemas/UserResultCore"
|
|
unmention_data:
|
|
type: object # todo
|
|
edit_control:
|
|
type: object
|
|
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:
|
|
type: object
|
|
properties:
|
|
favorited:
|
|
type: boolean
|
|
retweeted:
|
|
type: boolean
|
|
is_translatable:
|
|
type: boolean
|
|
default: false
|
|
legacy:
|
|
$ref: "#/components/schemas/TweetLegacy"
|
|
views:
|
|
type: object
|
|
properties:
|
|
count:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|
|
state:
|
|
type: string # enum
|
|
|
|
TweetLegacy:
|
|
required:
|
|
- "bookmark_count"
|
|
- "bookmarked"
|
|
- "conversation_id_str"
|
|
- "created_at"
|
|
- "display_text_range"
|
|
- "entities"
|
|
- "favorite_count"
|
|
- "favorited"
|
|
- "full_text"
|
|
- "is_quote_status"
|
|
- "lang"
|
|
- "quote_count"
|
|
- "reply_count"
|
|
- "retweet_count"
|
|
- "retweeted"
|
|
- "user_id_str"
|
|
- "id_str"
|
|
properties:
|
|
bookmark_count:
|
|
type: integer
|
|
bookmarked:
|
|
type: boolean
|
|
created_at:
|
|
$ref: "./general.yaml#/components/schemas/TwitterTimeFormat"
|
|
conversation_id_str:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|
|
display_text_range:
|
|
type: array
|
|
items:
|
|
type: integer
|
|
entities:
|
|
type: object
|
|
favorite_count:
|
|
type: integer
|
|
favorited:
|
|
type: boolean
|
|
full_text:
|
|
type: string
|
|
is_quote_status:
|
|
type: boolean
|
|
lang:
|
|
type: string # enum
|
|
possibly_sensitive:
|
|
type: boolean
|
|
default: false
|
|
possibly_sensitive_editable:
|
|
type: boolean
|
|
default: false
|
|
quote_count:
|
|
type: integer
|
|
reply_count:
|
|
type: integer
|
|
retweet_count:
|
|
type: integer
|
|
retweeted:
|
|
type: boolean
|
|
user_id_str:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|
|
id_str:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|