diff --git a/dist/openapi-3.0.yaml b/dist/openapi-3.0.yaml index e478251..07ef533 100644 --- a/dist/openapi-3.0.yaml +++ b/dist/openapi-3.0.yaml @@ -1,34 +1,18 @@ components: schemas: {} securitySchemes: - ActiveUser: - description: 'yes' - in: header - name: x-twitter-active-user - type: apiKey - AuthType: - description: OAuth2Session - in: header - name: x-twitter-auth-type - type: apiKey - BearerAuth: - description: AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA - scheme: bearer - type: http - ClientLanguage: - description: en - in: header - name: x-twitter-client-language - type: apiKey CookieAuthToken: + description: HttpOnly cookie in: cookie name: auth_token type: apiKey CookieCt0: + description: document.cookie.split('; ').find(row => row.startsWith('ct0=')); in: cookie name: ct0 type: apiKey CsrfToken: + description: document.cookie.split('; ').find(row => row.startsWith('ct0=')); in: header name: x-csrf-token type: apiKey diff --git a/dist/paths/bookmarks.yaml b/dist/paths/bookmarks.yaml index 4f0db79..ffa85be 100644 --- a/dist/paths/bookmarks.yaml +++ b/dist/paths/bookmarks.yaml @@ -57,6 +57,42 @@ paths: default: tmd4ifV8RHltzn8ymGg1aw example: tmd4ifV8RHltzn8ymGg1aw type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: diff --git a/dist/paths/follow.yaml b/dist/paths/follow.yaml index 7e7ff38..b471af3 100644 --- a/dist/paths/follow.yaml +++ b/dist/paths/follow.yaml @@ -73,6 +73,42 @@ paths: default: JpFFCTBPxYVlDqMUr9twzQ example: JpFFCTBPxYVlDqMUr9twzQ type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: @@ -152,6 +188,42 @@ paths: default: b22I8WSfQ8H4Ev8486xAlQ example: b22I8WSfQ8H4Ev8486xAlQ type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: diff --git a/dist/paths/profile.yaml b/dist/paths/profile.yaml index 4c3bd9c..1fc0679 100644 --- a/dist/paths/profile.yaml +++ b/dist/paths/profile.yaml @@ -87,6 +87,42 @@ paths: default: 9zwVLJ48lmVUk8u_Gh9DmA example: 9zwVLJ48lmVUk8u_Gh9DmA type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: diff --git a/dist/paths/timeline.yaml b/dist/paths/timeline.yaml index db68f15..5ae6ba3 100644 --- a/dist/paths/timeline.yaml +++ b/dist/paths/timeline.yaml @@ -81,6 +81,42 @@ paths: default: 2TemLyqrMpTeAmysdbnVqw example: 2TemLyqrMpTeAmysdbnVqw type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: @@ -161,6 +197,42 @@ paths: default: HCosKfLNW1AcOo3la3mMgg example: HCosKfLNW1AcOo3la3mMgg type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: @@ -241,6 +313,42 @@ paths: default: zhX91JE87mWvfprhYE97xA example: zhX91JE87mWvfprhYE97xA type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: diff --git a/dist/paths/tweet.yaml b/dist/paths/tweet.yaml index 46ad285..1663757 100644 --- a/dist/paths/tweet.yaml +++ b/dist/paths/tweet.yaml @@ -54,6 +54,42 @@ paths: default: wNNG8DBB8EaXw1lq4vFWGA example: wNNG8DBB8EaXw1lq4vFWGA type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: diff --git a/dist/paths/user.yaml b/dist/paths/user.yaml index 57a04c8..4e3e4e3 100644 --- a/dist/paths/user.yaml +++ b/dist/paths/user.yaml @@ -43,6 +43,42 @@ paths: default: sLVLhk0bGj3MVFEKTdax1w example: sLVLhk0bGj3MVFEKTdax1w type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: diff --git a/dist/paths/usertweets.yaml b/dist/paths/usertweets.yaml index 0f2867e..3c433b4 100644 --- a/dist/paths/usertweets.yaml +++ b/dist/paths/usertweets.yaml @@ -68,6 +68,42 @@ paths: default: 5fmEkRT-1AdHqEsbVgehMg example: 5fmEkRT-1AdHqEsbVgehMg type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: @@ -148,6 +184,42 @@ paths: default: HuTx74BxAnezK1gWvYY7zg example: HuTx74BxAnezK1gWvYY7zg type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: @@ -227,6 +299,42 @@ paths: default: RIWc55YCNyUJ-U3HHGYkdg example: RIWc55YCNyUJ-U3HHGYkdg type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: @@ -307,6 +415,42 @@ paths: default: YqiE3JL1KNgf9nSljYdxaA example: YqiE3JL1KNgf9nSljYdxaA type: string + - in: header + name: authorization + required: true + schema: + default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA + description: It is a constant value and does not need to be changed. + type: string + - in: header + name: x-twitter-active-user + required: true + schema: + default: 'yes' + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-auth-type + required: true + schema: + default: OAuth2Session + description: Unknown what this value means. + type: string + - in: header + name: x-twitter-client-language + required: true + schema: + default: en + description: language code. + type: string + - in: header + name: user-agent + required: true + schema: + default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/112.0.0.0 Safari/537.36 + description: UserAgent, some APIs may be rejected if changed. + type: string responses: '200': content: diff --git a/src/config/parameters.yaml b/src/config/parameters.yaml index 9f002a6..4be4c2b 100644 --- a/src/config/parameters.yaml +++ b/src/config/parameters.yaml @@ -25,6 +25,43 @@ paths: type: string default: "{{Query}}" example: "{{Query}}" + + # ======== Security ======== + - name: authorization + in: header + required: true + schema: + type: string + default: "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" + description: "It is a constant value and does not need to be changed." + - name: x-twitter-active-user + in: header + required: true + schema: + type: string + default: "yes" + description: "Unknown what this value means." + - name: x-twitter-auth-type + in: header + required: true + schema: + type: string + default: "OAuth2Session" + description: "Unknown what this value means." + - name: x-twitter-client-language + in: header + required: true + schema: + type: string + default: "en" + description: "language code." + - name: user-agent + in: header + required: true + schema: + type: string + default: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" + description: "UserAgent, some APIs may be rejected if changed." responses: "200": description: "" diff --git a/src/openapi/openapi-3.0.yaml b/src/openapi/openapi-3.0.yaml index fb42402..9fa36b8 100644 --- a/src/openapi/openapi-3.0.yaml +++ b/src/openapi/openapi-3.0.yaml @@ -18,43 +18,34 @@ components: schemas: {} securitySchemes: - BearerAuth: - type: http - scheme: bearer - description: "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" + # Moved to Parameters because it is not working as Security + # BearerAuth: + # type: http + # scheme: bearer + # description: "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" + # AuthType: + # type: apiKey + # in: header + # name: x-twitter-auth-type + # description: "OAuth2Session" CsrfToken: type: apiKey in: header name: x-csrf-token - - ActiveUser: - type: apiKey - in: header - name: x-twitter-active-user - description: "yes" - - AuthType: - type: apiKey - in: header - name: x-twitter-auth-type - description: "OAuth2Session" - - ClientLanguage: - type: apiKey - in: header - name: x-twitter-client-language - description: "en" - - CookieAuthToken: - type: apiKey - in: cookie - name: auth_token + description: "document.cookie.split('; ').find(row => row.startsWith('ct0='));" CookieCt0: type: apiKey in: cookie name: ct0 + description: "document.cookie.split('; ').find(row => row.startsWith('ct0='));" + + CookieAuthToken: + type: apiKey + in: cookie + name: auth_token + description: "HttpOnly cookie" tags: - name: timeline