1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 23:50:26 +01:00

add ProfileSpotlightsQuery

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-04-19 00:56:12 +09:00
parent bf730c5129
commit 62d8171c2b
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
4 changed files with 226 additions and 0 deletions

View file

@ -48,6 +48,8 @@ paths:
$ref: ./path/timeline.yaml#/paths/~12TemLyqrMpTeAmysdbnVqw~1ListLatestTweetsTimeline
/5fmEkRT-1AdHqEsbVgehMg/Likes:
$ref: ./path/usertweets.yaml#/paths/~15fmEkRT-1AdHqEsbVgehMg~1Likes
/9zwVLJ48lmVUk8u_Gh9DmA/ProfileSpotlightsQuery:
$ref: ./path/profile.yaml#/paths/~19zwVLJ48lmVUk8u_Gh9DmA~1ProfileSpotlightsQuery
/HCosKfLNW1AcOo3la3mMgg/HomeTimeline:
$ref: ./path/timeline.yaml#/paths/~1HCosKfLNW1AcOo3la3mMgg~1HomeTimeline
/HuTx74BxAnezK1gWvYY7zg/UserTweets:

133
dist/path/profile.yaml vendored Normal file
View file

@ -0,0 +1,133 @@
components:
schemas:
ProfileResponse:
properties:
data:
$ref: '#/components/schemas/ProfileResponseData'
required:
- data
ProfileResponseData:
properties:
user_result_by_screen_name:
$ref: '#/components/schemas/UserResultByScreenName'
required:
- user_result_by_screen_name
UserResultByScreenName:
properties:
id:
pattern: ^[0-9a-zA-Z]+$
type: string
result:
$ref: '#/components/schemas/UserResultByScreenNameResult'
required:
- id
- result
UserResultByScreenNameLegacy:
properties:
blocked_by:
type: boolean
blocking:
type: boolean
followed_by:
type: boolean
following:
type: boolean
name:
type: string
protected:
type: boolean
screen_name:
type: string
UserResultByScreenNameResult:
properties:
__typename:
$ref: ./../schemas/typename.yaml#/components/schemas/TypeName
id:
pattern: ^[0-9a-zA-Z=]+$
type: string
legacy:
$ref: '#/components/schemas/UserResultByScreenNameLegacy'
profilemodules:
type: object
rest_id:
pattern: ^[0-9]+$
type: string
required:
- __typename
- id
- legacy
- profilemodules
- rest_id
info:
title: Twitter OpenAPI
version: 0.0.1
openapi: 3.0.3
paths:
/9zwVLJ48lmVUk8u_Gh9DmA/ProfileSpotlightsQuery:
get:
description: get user by screen name
operationId: getProfileSpotlightsQuery
parameters:
- in: query
name: variables
required: true
schema:
example: '{"screen_name": "elonmusk"}'
type: string
- in: query
name: features
required: true
schema:
example: '{}'
type: string
- in: query
name: queryId
required: true
schema:
default: 9zwVLJ48lmVUk8u_Gh9DmA
example: 9zwVLJ48lmVUk8u_Gh9DmA
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ProfileResponse'
description: Successful operation
headers:
x-connection-hash:
schema:
type: string
x-content-type-options:
schema:
type: string
x-frame-options:
schema:
type: string
x-rate-limit-limit:
schema:
type: integer
x-rate-limit-remaining:
schema:
type: integer
x-rate-limit-reset:
schema:
type: integer
x-response-time:
schema:
type: integer
x-tfe-preserve-body:
schema:
type: boolean
x-transaction-id:
schema:
type: string
x-twitter-response-tags:
schema:
type: string
x-xss-protection:
schema:
type: integer
tags:
- user
- graphql

View file

@ -102,6 +102,13 @@
"responsive_web_graphql_timeline_navigation_enabled": true
}
},
"ProfileSpotlightsQuery": {
"Query": "9zwVLJ48lmVUk8u_Gh9DmA",
"Variables": {
"screen_name": "elonmusk"
},
"Features": {}
},
"UserTweets": {
"Query": "HuTx74BxAnezK1gWvYY7zg",
"Variables": {

View file

@ -0,0 +1,84 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{ProfileSpotlightsQueryQuery}}/ProfileSpotlightsQuery:
get:
operationId: getProfileSpotlightsQuery
description: "get user by screen name"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/ProfileResponse"
tags:
- "user"
- "graphql"
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