mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
add builder
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
9052b3a16a
commit
26908878c1
31 changed files with 2886 additions and 1549 deletions
219
src/openapi/schemas/user.yaml
Normal file
219
src/openapi/schemas/user.yaml
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
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:
|
||||
required:
|
||||
- "result"
|
||||
properties:
|
||||
result:
|
||||
$ref: "#/components/schemas/UserUnion"
|
||||
|
||||
UserUnion:
|
||||
oneOf:
|
||||
- $ref: "#/components/schemas/User"
|
||||
discriminator:
|
||||
propertyName: __typename
|
||||
mapping": # deprecated
|
||||
User: "#/components/schemas/User"
|
||||
|
||||
User:
|
||||
required:
|
||||
- "__typename"
|
||||
- "affiliates_highlighted_label"
|
||||
- "has_graduated_access"
|
||||
- "id"
|
||||
- "is_blue_verified"
|
||||
- "legacy"
|
||||
- "rest_id"
|
||||
- "super_follow_eligible"
|
||||
- "super_followed_by"
|
||||
- "super_following"
|
||||
|
||||
properties:
|
||||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # User
|
||||
affiliates_highlighted_label:
|
||||
type: object # todo
|
||||
has_graduated_access:
|
||||
type: boolean
|
||||
has_nft_avatar:
|
||||
type: boolean
|
||||
default: false
|
||||
id:
|
||||
type: string
|
||||
pattern: '^[a-z\-]+[0-9]+$'
|
||||
is_blue_verified:
|
||||
type: boolean
|
||||
default: false
|
||||
legacy:
|
||||
$ref: "#/components/schemas/UserLegacy"
|
||||
rest_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
business_account:
|
||||
type: object # todo
|
||||
super_follow_eligible:
|
||||
type: boolean
|
||||
default: false
|
||||
super_followed_by:
|
||||
type: boolean
|
||||
default: false
|
||||
super_following:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
UserLegacy:
|
||||
required:
|
||||
- "blocked_by"
|
||||
- "blocking"
|
||||
- "can_dm"
|
||||
- "can_media_tag"
|
||||
- "created_at"
|
||||
- "default_profile"
|
||||
- "default_profile_image"
|
||||
- "description"
|
||||
- "entities"
|
||||
- "fast_followers_count"
|
||||
- "favourites_count"
|
||||
- "follow_request_sent"
|
||||
- "followed_by"
|
||||
- "followers_count"
|
||||
- "following"
|
||||
- "friends_count"
|
||||
- "has_custom_timelines"
|
||||
- "is_translator"
|
||||
- "listed_count"
|
||||
- "location"
|
||||
- "media_count"
|
||||
- "muting"
|
||||
- "name"
|
||||
- "normal_followers_count"
|
||||
- "notifications"
|
||||
- "pinned_tweet_ids_str"
|
||||
- "possibly_sensitive"
|
||||
- "profile_image_url_https"
|
||||
- "profile_interstitial_type"
|
||||
- "protected"
|
||||
- "screen_name"
|
||||
- "status"
|
||||
- "statuses_count"
|
||||
- "translator_type"
|
||||
- "verified"
|
||||
- "want_retweets"
|
||||
properties:
|
||||
blocked_by:
|
||||
type: boolean
|
||||
default: false
|
||||
blocking:
|
||||
type: boolean
|
||||
default: false
|
||||
can_dm:
|
||||
type: boolean
|
||||
default: false
|
||||
can_media_tag:
|
||||
type: boolean
|
||||
default: false
|
||||
created_at:
|
||||
$ref: "./general.yaml#/components/schemas/TwitterTimeFormat"
|
||||
default_profile:
|
||||
type: boolean
|
||||
default: false
|
||||
default_profile_image:
|
||||
type: boolean
|
||||
default: false
|
||||
description:
|
||||
type: string
|
||||
entities:
|
||||
type: object # todo
|
||||
fast_followers_count:
|
||||
type: integer
|
||||
favourites_count:
|
||||
type: integer
|
||||
default: 0
|
||||
follow_request_sent:
|
||||
type: boolean
|
||||
default: false
|
||||
followed_by:
|
||||
type: boolean
|
||||
default: false
|
||||
followers_count:
|
||||
type: integer
|
||||
default: 0
|
||||
following:
|
||||
type: boolean
|
||||
default: false
|
||||
friends_count:
|
||||
type: integer
|
||||
default: 0
|
||||
has_custom_timelines:
|
||||
type: boolean
|
||||
default: false
|
||||
is_translator:
|
||||
type: boolean
|
||||
default: false
|
||||
listed_count:
|
||||
type: integer
|
||||
default: 0
|
||||
location:
|
||||
type: string
|
||||
media_count:
|
||||
type: integer
|
||||
default: 0
|
||||
muting:
|
||||
type: boolean
|
||||
default: false
|
||||
name:
|
||||
type: string
|
||||
normal_followers_count:
|
||||
type: integer
|
||||
default: 0
|
||||
notifications:
|
||||
type: boolean
|
||||
default: false
|
||||
pinned_tweet_ids_str:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
possibly_sensitive:
|
||||
type: boolean
|
||||
default: false
|
||||
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
|
||||
default: false
|
||||
screen_name:
|
||||
type: string
|
||||
statuses_count:
|
||||
type: integer
|
||||
default: 0
|
||||
translator_type:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
verified:
|
||||
type: boolean
|
||||
want_retweets:
|
||||
type: boolean
|
||||
default: false
|
||||
Loading…
Add table
Add a link
Reference in a new issue