mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
83 lines
2 KiB
YAML
83 lines
2 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: Twitter OpenAPI
|
|
version: 0.0.1
|
|
|
|
paths:
|
|
/graphql/{queryId}/ProfileSpotlightsQuery:
|
|
get:
|
|
operationId: getProfileSpotlightsQuery
|
|
description: "get user by screen name"
|
|
parameters:
|
|
- $ref: "../resources/parameters.yaml#/components/parameters/queryId"
|
|
responses:
|
|
"200":
|
|
description: Successful operation
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ProfileResponse"
|
|
|
|
components:
|
|
schemas:
|
|
ProfileResponse:
|
|
required:
|
|
- "data"
|
|
properties:
|
|
data:
|
|
$ref: "#/components/schemas/ProfileResponseData"
|
|
|
|
ProfileResponseData:
|
|
required:
|
|
- "user_result_by_screen_name"
|
|
properties:
|
|
user_result_by_screen_name:
|
|
$ref: "#/components/schemas/UserResultByScreenName"
|
|
|
|
UserResultByScreenName:
|
|
required:
|
|
- "id"
|
|
- "result"
|
|
properties:
|
|
id:
|
|
type: string
|
|
pattern: "^[0-9a-zA-Z]+$"
|
|
result:
|
|
$ref: "#/components/schemas/UserResultByScreenNameResult"
|
|
|
|
UserResultByScreenNameResult:
|
|
required:
|
|
- "__typename"
|
|
- "id"
|
|
- "legacy"
|
|
- "profilemodules"
|
|
- "rest_id"
|
|
properties:
|
|
__typename:
|
|
$ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # User
|
|
id:
|
|
type: string
|
|
pattern: "^[0-9a-zA-Z=]+$"
|
|
legacy:
|
|
$ref: "#/components/schemas/UserResultByScreenNameLegacy"
|
|
profilemodules:
|
|
type: object # todo
|
|
rest_id:
|
|
type: string
|
|
pattern: "^[0-9]+$"
|
|
UserResultByScreenNameLegacy:
|
|
properties:
|
|
blocking:
|
|
type: boolean
|
|
blocked_by:
|
|
type: boolean
|
|
protected:
|
|
type: boolean
|
|
following:
|
|
type: boolean
|
|
followed_by:
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
screen_name:
|
|
type: string
|