From e0c99ad92d8089c510e6c56838c8386948a26a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 13 Apr 2023 00:46:44 +0900 Subject: [PATCH] add API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- openapi/openapi-3.0.yaml | 160 +++++++++--------- .../paths/timeline/HomeLatestTimeline.yaml | 11 ++ openapi/src/paths/timeline/HomeTimeline.yaml | 11 ++ .../timeline/ListLatestTweetsTimeline.yaml | 11 ++ 4 files changed, 113 insertions(+), 80 deletions(-) diff --git a/openapi/openapi-3.0.yaml b/openapi/openapi-3.0.yaml index 31fbba2..662b3b5 100644 --- a/openapi/openapi-3.0.yaml +++ b/openapi/openapi-3.0.yaml @@ -1,96 +1,96 @@ openapi: 3.0.3 info: - title: Twitter OpenAPI - description: |- - Twitter OpenAPI(Swagger) specification - termsOfService: https://github.com/fa0311 - contact: - email: yuki@yuki0311.com - license: - name: GNU Affero General Public License v3. - url: https://raw.githubusercontent.com/fa0311/twitter-openapi/main/LICENSE.txt - version: 0.0.1 + title: Twitter OpenAPI + description: |- + Twitter OpenAPI(Swagger) specification + termsOfService: https://github.com/fa0311 + contact: + email: yuki@yuki0311.com + license: + name: GNU Affero General Public License v3. + url: https://raw.githubusercontent.com/fa0311/twitter-openapi/main/LICENSE.txt + version: 0.0.1 servers: - - url: https://twitter.com/i/api/graphql + - url: https://twitter.com/i/api/graphql paths: - # timeline - /BntFPEOxs3GYdPaS6CjUcg/HomeTimeline: - $ref: ./src/paths/timeline/HomeTimeline.yaml - /37RUvMgTiEVYYfrRTVDxpw/HomeLatestTimeline: - $ref: ./src/paths/timeline/HomeLatestTimeline.yaml - /VEwO8c1TYdm5zjxCOIiwFw/ListLatestTweetsTimeline: - $ref: ./src/paths/timeline/ListLatestTweetsTimeline.yaml - # follow - /FaBzCqZXuQCb4PhB0RHqHw/Following: - $ref: ./src/paths/follow/Following.yaml - /VptSi88PiaQhBevFbGVlGg/Followers: - $ref: ./src/paths/follow/Followers.yaml + # timeline + /BntFPEOxs3GYdPaS6CjUcg/HomeTimeline: + $ref: ./src/paths/timeline/HomeTimeline.yaml + /37RUvMgTiEVYYfrRTVDxpw/HomeLatestTimeline: + $ref: ./src/paths/timeline/HomeLatestTimeline.yaml + /VEwO8c1TYdm5zjxCOIiwFw/ListLatestTweetsTimeline: + $ref: ./src/paths/timeline/ListLatestTweetsTimeline.yaml + # follow + /FaBzCqZXuQCb4PhB0RHqHw/Following: + $ref: ./src/paths/follow/Following.yaml + /VptSi88PiaQhBevFbGVlGg/Followers: + $ref: ./src/paths/follow/Followers.yaml components: - securitySchemes: - BearerAuth: - type: http - scheme: bearer - description: "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" + securitySchemes: + BearerAuth: + type: http + scheme: bearer + description: "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" - CsrfToken: - type: apiKey - in: header - name: x-csrf-token + CsrfToken: + type: apiKey + in: header + name: x-csrf-token - ActiveUser: - type: apiKey - in: header - name: x-twitter-active-user - description: "yes" + ActiveUser: + type: apiKey + in: header + name: x-twitter-active-user + description: "yes" - AuthType: - type: apiKey - in: header - name: x-twitter-auth-type - description: "OAuth2Session" + AuthType: + type: apiKey + in: header + name: x-twitter-auth-type + description: "OAuth2Session" - ClientLanguage: - type: apiKey - in: header - name: x-twitter-client-language - description: "en" + ClientLanguage: + type: apiKey + in: header + name: x-twitter-client-language + description: "en" - CookieAuthToken: - type: apiKey - in: cookie - name: auth_token + CookieAuthToken: + type: apiKey + in: cookie + name: auth_token - CookieAuthCt0: - type: apiKey - in: cookie - name: ct0 + CookieCt0: + type: apiKey + in: cookie + name: ct0 tags: - - name: timeline - description: timeline - - name: tweet - description: tweet - - name: user - description: user - - name: follow - description: follow - - name: search - description: search - - name: dm - description: dm - - name: settings - description: settings - - name: notify - description: notify + - name: timeline + description: timeline + - name: tweet + description: tweet + - name: user + description: user + - name: follow + description: follow + - name: search + description: search + - name: dm + description: dm + - name: settings + description: settings + - name: notify + description: notify - # === - - name: login required - description: login session required - - name: graphql - description: graphql - - name: login-flow - description: login flow - - name: report-flow - description: report flow + # === + - name: login required + description: login session required + - name: graphql + description: graphql + - name: login-flow + description: login flow + - name: report-flow + description: report flow diff --git a/openapi/src/paths/timeline/HomeLatestTimeline.yaml b/openapi/src/paths/timeline/HomeLatestTimeline.yaml index 1910b0b..d1416de 100644 --- a/openapi/src/paths/timeline/HomeLatestTimeline.yaml +++ b/openapi/src/paths/timeline/HomeLatestTimeline.yaml @@ -47,6 +47,7 @@ get: type: string default: "37RUvMgTiEVYYfrRTVDxpw" example: "'37RUvMgTiEVYYfrRTVDxpw'" + responses: "200": description: Successful operation @@ -54,6 +55,16 @@ get: application/json: schema: $ref: "./../../components/schemas/Timeline.yaml#/TimelineResponse" + + security: + - bearerAuth: [] + - CsrfToken: [] + - ActiveUser: [] + - AuthType: [] + - ClientLanguage: [] + - CookieAuthToken: [] + - CookieCt0: [] + tags: - "timeline" - "login-required" diff --git a/openapi/src/paths/timeline/HomeTimeline.yaml b/openapi/src/paths/timeline/HomeTimeline.yaml index 3953cbf..e59e5ac 100644 --- a/openapi/src/paths/timeline/HomeTimeline.yaml +++ b/openapi/src/paths/timeline/HomeTimeline.yaml @@ -50,6 +50,7 @@ get: type: string default: "BntFPEOxs3GYdPaS6CjUcg" example: "'BntFPEOxs3GYdPaS6CjUcg'" + responses: "200": description: Successful operation @@ -57,6 +58,16 @@ get: application/json: schema: $ref: "./../../components/schemas/Timeline.yaml#/TimelineResponse" + + security: + - bearerAuth: [] + - CsrfToken: [] + - ActiveUser: [] + - AuthType: [] + - ClientLanguage: [] + - CookieAuthToken: [] + - CookieCt0: [] + tags: - "timeline" - "login-required" diff --git a/openapi/src/paths/timeline/ListLatestTweetsTimeline.yaml b/openapi/src/paths/timeline/ListLatestTweetsTimeline.yaml index dae6ba5..22847ea 100644 --- a/openapi/src/paths/timeline/ListLatestTweetsTimeline.yaml +++ b/openapi/src/paths/timeline/ListLatestTweetsTimeline.yaml @@ -47,6 +47,7 @@ get: type: string default: "VEwO8c1TYdm5zjxCOIiwFw" example: "'VEwO8c1TYdm5zjxCOIiwFw'" + responses: "200": description: Successful operation @@ -54,6 +55,16 @@ get: application/json: schema: $ref: "./../../components/schemas/Timeline.yaml#/ListTweetsTimelineResponse" + + security: + - bearerAuth: [] + - CsrfToken: [] + - ActiveUser: [] + - AuthType: [] + - ClientLanguage: [] + - CookieAuthToken: [] + - CookieCt0: [] + tags: - "timeline" - "login-required"