mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-10 15:20:26 +01:00
374 lines
9.3 KiB
YAML
374 lines
9.3 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: Twitter OpenAPI
|
|
version: 0.0.1
|
|
paths: {}
|
|
components:
|
|
schemas:
|
|
UserResultCore:
|
|
required:
|
|
- "user_results"
|
|
properties:
|
|
user_results:
|
|
$ref: "#/components/schemas/UserResults"
|
|
|
|
UserResults:
|
|
properties:
|
|
result:
|
|
$ref: "#/components/schemas/UserUnion"
|
|
|
|
UserUnion:
|
|
oneOf:
|
|
- $ref: "#/components/schemas/User"
|
|
- $ref: "#/components/schemas/UserUnavailable"
|
|
discriminator:
|
|
propertyName: __typename
|
|
mapping": # deprecated
|
|
User: "#/components/schemas/User"
|
|
UserUnavailable: "#/components/schemas/UserUnavailable"
|
|
|
|
User:
|
|
required:
|
|
- "__typename"
|
|
- "id"
|
|
- "is_blue_verified"
|
|
- "legacy"
|
|
- "rest_id"
|
|
- "profile_image_shape"
|
|
|
|
properties:
|
|
__typename:
|
|
$ref: "./typename.yaml#/components/schemas/TypeName" # User
|
|
affiliates_highlighted_label:
|
|
type: object
|
|
additionalProperties: true # todo
|
|
has_graduated_access:
|
|
type: boolean
|
|
has_nft_avatar:
|
|
type: boolean
|
|
id:
|
|
type: string
|
|
pattern: "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$" # base64
|
|
is_blue_verified:
|
|
type: boolean
|
|
legacy:
|
|
$ref: "#/components/schemas/UserLegacy"
|
|
rest_id:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|
|
business_account:
|
|
type: object
|
|
additionalProperties: true # todo
|
|
super_follow_eligible:
|
|
type: boolean
|
|
super_followed_by:
|
|
type: boolean
|
|
super_following:
|
|
type: boolean
|
|
profile_image_shape:
|
|
type: string
|
|
enum:
|
|
- "Circle"
|
|
- "Square"
|
|
- "Hexagon"
|
|
professional:
|
|
$ref: "#/components/schemas/UserProfessional"
|
|
user_seed_tweet_count:
|
|
type: integer
|
|
highlights_info:
|
|
$ref: "#/components/schemas/UserHighlightsInfo"
|
|
creator_subscriptions_count:
|
|
type: integer
|
|
verification_info:
|
|
$ref: "#/components/schemas/UserVerificationInfo"
|
|
is_profile_translatable:
|
|
type: boolean
|
|
tipjar_settings:
|
|
$ref: "#/components/schemas/UserTipJarSettings"
|
|
legacy_extended_profile:
|
|
$ref: "#/components/schemas/UserLegacyExtendedProfile"
|
|
has_hidden_likes_on_profile:
|
|
type: boolean
|
|
premium_gifting_eligible:
|
|
type: boolean
|
|
has_hidden_subscriptions_on_profile:
|
|
type: boolean
|
|
parody_commentary_fan_label:
|
|
type: string
|
|
enum: ["None", "Parody", "Commentary"]
|
|
|
|
UserProfessional:
|
|
required:
|
|
- "rest_id"
|
|
- "professional_type"
|
|
- "category"
|
|
properties:
|
|
rest_id:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|
|
professional_type:
|
|
type: string
|
|
enum: ["Business", "Creator"]
|
|
category:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/UserProfessionalCategory"
|
|
|
|
UserProfessionalCategory:
|
|
required:
|
|
- "id"
|
|
- "name"
|
|
- "icon_name"
|
|
properties:
|
|
id:
|
|
type: integer
|
|
name:
|
|
type: string # enum
|
|
icon_name:
|
|
type: string # IconBriefcaseStroke ?
|
|
|
|
UserHighlightsInfo:
|
|
required:
|
|
- "can_highlight_tweets"
|
|
- "highlighted_tweets"
|
|
properties:
|
|
can_highlight_tweets:
|
|
type: boolean
|
|
highlighted_tweets:
|
|
type: string
|
|
|
|
UserVerificationInfo:
|
|
required:
|
|
- "is_identity_verified"
|
|
properties:
|
|
is_identity_verified:
|
|
type: boolean
|
|
reason:
|
|
$ref: "#/components/schemas/UserVerificationInfoReason"
|
|
|
|
UserVerificationInfoReason:
|
|
required:
|
|
- "description"
|
|
- "verified_since_msec"
|
|
properties:
|
|
description:
|
|
$ref: "#/components/schemas/UserVerificationInfoReasonDescription"
|
|
verified_since_msec:
|
|
type: string
|
|
pattern: "^-?[0-9]+$"
|
|
override_verified_year:
|
|
type: integer
|
|
|
|
UserVerificationInfoReasonDescription:
|
|
required:
|
|
- "text"
|
|
- "entities"
|
|
properties:
|
|
text:
|
|
type: string
|
|
entities:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/UserVerificationInfoReasonDescriptionEntities"
|
|
|
|
UserVerificationInfoReasonDescriptionEntities:
|
|
required:
|
|
- "from_index"
|
|
- "to_index"
|
|
- "ref"
|
|
properties:
|
|
from_index:
|
|
type: integer
|
|
to_index:
|
|
type: integer
|
|
ref:
|
|
$ref: "#/components/schemas/UserVerificationInfoReasonDescriptionEntitiesRef"
|
|
|
|
UserVerificationInfoReasonDescriptionEntitiesRef:
|
|
required:
|
|
- "url"
|
|
- "url_type"
|
|
properties:
|
|
url:
|
|
type: string
|
|
format: uri
|
|
url_type:
|
|
type: string
|
|
enum: ["ExternalUrl"]
|
|
|
|
UserTipJarSettings:
|
|
properties:
|
|
is_enabled:
|
|
type: boolean
|
|
patreon_handle:
|
|
type: string
|
|
bitcoin_handle:
|
|
type: string
|
|
ethereum_handle:
|
|
type: string
|
|
cash_app_handle:
|
|
type: string
|
|
venmo_handle:
|
|
type: string
|
|
gofundme_handle:
|
|
type: string # uri
|
|
bandcamp_handle:
|
|
type: string # uri
|
|
pay_pal_handle:
|
|
type: string
|
|
|
|
UserLegacyExtendedProfile:
|
|
properties:
|
|
birthdate:
|
|
$ref: "#/components/schemas/UserLegacyExtendedProfileBirthdate"
|
|
|
|
UserLegacyExtendedProfileBirthdate:
|
|
required:
|
|
- "day"
|
|
- "month"
|
|
- "visibility"
|
|
- "year_visibility"
|
|
properties:
|
|
day:
|
|
type: integer
|
|
month:
|
|
type: integer
|
|
year:
|
|
type: integer
|
|
visibility:
|
|
type: string
|
|
enum: ["Self", "Public", "MutualFollow", "Followers", "Following"]
|
|
year_visibility:
|
|
type: string
|
|
enum: ["Self", "Public", "MutualFollow", "Followers", "Following"]
|
|
|
|
UserLegacy:
|
|
required:
|
|
- "created_at"
|
|
- "default_profile"
|
|
- "default_profile_image"
|
|
- "description"
|
|
- "entities"
|
|
- "fast_followers_count"
|
|
- "favourites_count"
|
|
- "followers_count"
|
|
- "friends_count"
|
|
- "has_custom_timelines"
|
|
- "is_translator"
|
|
- "listed_count"
|
|
- "location"
|
|
- "media_count"
|
|
- "name"
|
|
- "normal_followers_count"
|
|
- "pinned_tweet_ids_str"
|
|
- "possibly_sensitive"
|
|
- "profile_image_url_https"
|
|
- "profile_interstitial_type"
|
|
- "screen_name"
|
|
- "status"
|
|
- "statuses_count"
|
|
- "translator_type"
|
|
- "verified"
|
|
properties:
|
|
blocked_by:
|
|
type: boolean
|
|
blocking:
|
|
type: boolean
|
|
can_dm:
|
|
type: boolean
|
|
can_media_tag:
|
|
type: boolean
|
|
created_at:
|
|
$ref: "./general.yaml#/components/schemas/TwitterTimeFormat"
|
|
default_profile:
|
|
type: boolean
|
|
default_profile_image:
|
|
type: boolean
|
|
description:
|
|
type: string
|
|
entities:
|
|
type: object
|
|
additionalProperties: true # todo
|
|
fast_followers_count:
|
|
type: integer
|
|
favourites_count:
|
|
type: integer
|
|
follow_request_sent:
|
|
type: boolean
|
|
followed_by:
|
|
type: boolean
|
|
followers_count:
|
|
type: integer
|
|
following:
|
|
type: boolean
|
|
friends_count:
|
|
type: integer
|
|
has_custom_timelines:
|
|
type: boolean
|
|
is_translator:
|
|
type: boolean
|
|
listed_count:
|
|
type: integer
|
|
location:
|
|
type: string
|
|
media_count:
|
|
type: integer
|
|
muting:
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
normal_followers_count:
|
|
type: integer
|
|
notifications:
|
|
type: boolean
|
|
pinned_tweet_ids_str:
|
|
type: array
|
|
items:
|
|
type: string
|
|
possibly_sensitive:
|
|
type: boolean
|
|
profile_banner_extensions:
|
|
type: object
|
|
profile_banner_url:
|
|
type: string
|
|
format: uri
|
|
profile_image_extensions:
|
|
type: object
|
|
profile_image_url_https:
|
|
type: string
|
|
format: uri
|
|
profile_interstitial_type:
|
|
type: string
|
|
protected:
|
|
type: boolean
|
|
screen_name:
|
|
type: string
|
|
statuses_count:
|
|
type: integer
|
|
translator_type:
|
|
type: string
|
|
url:
|
|
type: string
|
|
verified:
|
|
type: boolean
|
|
want_retweets:
|
|
type: boolean
|
|
verified_type:
|
|
type: string
|
|
enum: ["Business", "Government"]
|
|
withheld_in_countries:
|
|
type: array
|
|
items:
|
|
type: string # enum DE
|
|
|
|
UserUnavailable:
|
|
required:
|
|
- "__typename"
|
|
- "reason"
|
|
properties:
|
|
__typename:
|
|
$ref: "./typename.yaml#/components/schemas/TypeName" # UserUnavailable
|
|
reason:
|
|
type: string
|
|
message:
|
|
type: string
|