mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
add API
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
b2fa9766a0
commit
e0c99ad92d
4 changed files with 113 additions and 80 deletions
|
|
@ -1,96 +1,96 @@
|
||||||
openapi: 3.0.3
|
openapi: 3.0.3
|
||||||
info:
|
info:
|
||||||
title: Twitter OpenAPI
|
title: Twitter OpenAPI
|
||||||
description: |-
|
description: |-
|
||||||
Twitter OpenAPI(Swagger) specification
|
Twitter OpenAPI(Swagger) specification
|
||||||
termsOfService: https://github.com/fa0311
|
termsOfService: https://github.com/fa0311
|
||||||
contact:
|
contact:
|
||||||
email: yuki@yuki0311.com
|
email: yuki@yuki0311.com
|
||||||
license:
|
license:
|
||||||
name: GNU Affero General Public License v3.
|
name: GNU Affero General Public License v3.
|
||||||
url: https://raw.githubusercontent.com/fa0311/twitter-openapi/main/LICENSE.txt
|
url: https://raw.githubusercontent.com/fa0311/twitter-openapi/main/LICENSE.txt
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
servers:
|
servers:
|
||||||
- url: https://twitter.com/i/api/graphql
|
- url: https://twitter.com/i/api/graphql
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
# timeline
|
# timeline
|
||||||
/BntFPEOxs3GYdPaS6CjUcg/HomeTimeline:
|
/BntFPEOxs3GYdPaS6CjUcg/HomeTimeline:
|
||||||
$ref: ./src/paths/timeline/HomeTimeline.yaml
|
$ref: ./src/paths/timeline/HomeTimeline.yaml
|
||||||
/37RUvMgTiEVYYfrRTVDxpw/HomeLatestTimeline:
|
/37RUvMgTiEVYYfrRTVDxpw/HomeLatestTimeline:
|
||||||
$ref: ./src/paths/timeline/HomeLatestTimeline.yaml
|
$ref: ./src/paths/timeline/HomeLatestTimeline.yaml
|
||||||
/VEwO8c1TYdm5zjxCOIiwFw/ListLatestTweetsTimeline:
|
/VEwO8c1TYdm5zjxCOIiwFw/ListLatestTweetsTimeline:
|
||||||
$ref: ./src/paths/timeline/ListLatestTweetsTimeline.yaml
|
$ref: ./src/paths/timeline/ListLatestTweetsTimeline.yaml
|
||||||
# follow
|
# follow
|
||||||
/FaBzCqZXuQCb4PhB0RHqHw/Following:
|
/FaBzCqZXuQCb4PhB0RHqHw/Following:
|
||||||
$ref: ./src/paths/follow/Following.yaml
|
$ref: ./src/paths/follow/Following.yaml
|
||||||
/VptSi88PiaQhBevFbGVlGg/Followers:
|
/VptSi88PiaQhBevFbGVlGg/Followers:
|
||||||
$ref: ./src/paths/follow/Followers.yaml
|
$ref: ./src/paths/follow/Followers.yaml
|
||||||
|
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
BearerAuth:
|
BearerAuth:
|
||||||
type: http
|
type: http
|
||||||
scheme: bearer
|
scheme: bearer
|
||||||
description: "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
description: "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
||||||
|
|
||||||
CsrfToken:
|
CsrfToken:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
in: header
|
in: header
|
||||||
name: x-csrf-token
|
name: x-csrf-token
|
||||||
|
|
||||||
ActiveUser:
|
ActiveUser:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
in: header
|
in: header
|
||||||
name: x-twitter-active-user
|
name: x-twitter-active-user
|
||||||
description: "yes"
|
description: "yes"
|
||||||
|
|
||||||
AuthType:
|
AuthType:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
in: header
|
in: header
|
||||||
name: x-twitter-auth-type
|
name: x-twitter-auth-type
|
||||||
description: "OAuth2Session"
|
description: "OAuth2Session"
|
||||||
|
|
||||||
ClientLanguage:
|
ClientLanguage:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
in: header
|
in: header
|
||||||
name: x-twitter-client-language
|
name: x-twitter-client-language
|
||||||
description: "en"
|
description: "en"
|
||||||
|
|
||||||
CookieAuthToken:
|
CookieAuthToken:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
in: cookie
|
in: cookie
|
||||||
name: auth_token
|
name: auth_token
|
||||||
|
|
||||||
CookieAuthCt0:
|
CookieCt0:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
in: cookie
|
in: cookie
|
||||||
name: ct0
|
name: ct0
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- name: timeline
|
- name: timeline
|
||||||
description: timeline
|
description: timeline
|
||||||
- name: tweet
|
- name: tweet
|
||||||
description: tweet
|
description: tweet
|
||||||
- name: user
|
- name: user
|
||||||
description: user
|
description: user
|
||||||
- name: follow
|
- name: follow
|
||||||
description: follow
|
description: follow
|
||||||
- name: search
|
- name: search
|
||||||
description: search
|
description: search
|
||||||
- name: dm
|
- name: dm
|
||||||
description: dm
|
description: dm
|
||||||
- name: settings
|
- name: settings
|
||||||
description: settings
|
description: settings
|
||||||
- name: notify
|
- name: notify
|
||||||
description: notify
|
description: notify
|
||||||
|
|
||||||
# ===
|
# ===
|
||||||
- name: login required
|
- name: login required
|
||||||
description: login session required
|
description: login session required
|
||||||
- name: graphql
|
- name: graphql
|
||||||
description: graphql
|
description: graphql
|
||||||
- name: login-flow
|
- name: login-flow
|
||||||
description: login flow
|
description: login flow
|
||||||
- name: report-flow
|
- name: report-flow
|
||||||
description: report flow
|
description: report flow
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ get:
|
||||||
type: string
|
type: string
|
||||||
default: "37RUvMgTiEVYYfrRTVDxpw"
|
default: "37RUvMgTiEVYYfrRTVDxpw"
|
||||||
example: "'37RUvMgTiEVYYfrRTVDxpw'"
|
example: "'37RUvMgTiEVYYfrRTVDxpw'"
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Successful operation
|
description: Successful operation
|
||||||
|
|
@ -54,6 +55,16 @@ get:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "./../../components/schemas/Timeline.yaml#/TimelineResponse"
|
$ref: "./../../components/schemas/Timeline.yaml#/TimelineResponse"
|
||||||
|
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
- CsrfToken: []
|
||||||
|
- ActiveUser: []
|
||||||
|
- AuthType: []
|
||||||
|
- ClientLanguage: []
|
||||||
|
- CookieAuthToken: []
|
||||||
|
- CookieCt0: []
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- "timeline"
|
- "timeline"
|
||||||
- "login-required"
|
- "login-required"
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ get:
|
||||||
type: string
|
type: string
|
||||||
default: "BntFPEOxs3GYdPaS6CjUcg"
|
default: "BntFPEOxs3GYdPaS6CjUcg"
|
||||||
example: "'BntFPEOxs3GYdPaS6CjUcg'"
|
example: "'BntFPEOxs3GYdPaS6CjUcg'"
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Successful operation
|
description: Successful operation
|
||||||
|
|
@ -57,6 +58,16 @@ get:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "./../../components/schemas/Timeline.yaml#/TimelineResponse"
|
$ref: "./../../components/schemas/Timeline.yaml#/TimelineResponse"
|
||||||
|
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
- CsrfToken: []
|
||||||
|
- ActiveUser: []
|
||||||
|
- AuthType: []
|
||||||
|
- ClientLanguage: []
|
||||||
|
- CookieAuthToken: []
|
||||||
|
- CookieCt0: []
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- "timeline"
|
- "timeline"
|
||||||
- "login-required"
|
- "login-required"
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ get:
|
||||||
type: string
|
type: string
|
||||||
default: "VEwO8c1TYdm5zjxCOIiwFw"
|
default: "VEwO8c1TYdm5zjxCOIiwFw"
|
||||||
example: "'VEwO8c1TYdm5zjxCOIiwFw'"
|
example: "'VEwO8c1TYdm5zjxCOIiwFw'"
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Successful operation
|
description: Successful operation
|
||||||
|
|
@ -54,6 +55,16 @@ get:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "./../../components/schemas/Timeline.yaml#/ListTweetsTimelineResponse"
|
$ref: "./../../components/schemas/Timeline.yaml#/ListTweetsTimelineResponse"
|
||||||
|
|
||||||
|
security:
|
||||||
|
- bearerAuth: []
|
||||||
|
- CsrfToken: []
|
||||||
|
- ActiveUser: []
|
||||||
|
- AuthType: []
|
||||||
|
- ClientLanguage: []
|
||||||
|
- CookieAuthToken: []
|
||||||
|
- CookieCt0: []
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- "timeline"
|
- "timeline"
|
||||||
- "login-required"
|
- "login-required"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue