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

add Community option and enhance JSON parsing in generater.py

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2024-10-30 14:32:42 +09:00
parent 57fd24311f
commit ec557fc5ee
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
6 changed files with 400 additions and 205 deletions

View file

@ -1703,6 +1703,7 @@ components:
- Sparkle
- Conversation
- List
- Community
type: string
landingUrl:
$ref: '#/components/schemas/SocialContextLandingUrl'
@ -3211,7 +3212,7 @@ components:
type: apiKey
UserAgent:
description: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/129.0.0.0 Safari/537.36
Gecko) Chrome/130.0.0.0 Safari/537.36
in: header
name: user-agent
type: apiKey
@ -4002,8 +4003,8 @@ paths:
name: pathQueryId
required: true
schema:
default: QUjXply7fA7fk05FRyajEg
example: QUjXply7fA7fk05FRyajEg
default: L7vvM2UluPgWOW4GDvWyvw
example: L7vvM2UluPgWOW4GDvWyvw
type: string
- content:
application/json:
@ -4894,8 +4895,8 @@ paths:
name: pathQueryId
required: true
schema:
default: LLkw5EcVutJL6y-2gkz22A
example: LLkw5EcVutJL6y-2gkz22A
default: riUYr3PwuHNe4tCmzjPNrg
example: riUYr3PwuHNe4tCmzjPNrg
type: string
- content:
application/json:
@ -4925,10 +4926,22 @@ paths:
application/json:
schema:
properties:
articles_preview_enabled:
default: true
example: true
type: boolean
c9s_tweet_anatomy_moderator_badge_enabled:
default: true
example: true
type: boolean
communities_web_enable_tweet_community_results_fetch:
default: true
example: true
type: boolean
creator_subscriptions_quote_tweet_preview_enabled:
default: false
example: false
type: boolean
creator_subscriptions_tweet_preview_api_enabled:
default: true
example: true
@ -4973,14 +4986,14 @@ paths:
default: true
example: true
type: boolean
responsive_web_media_download_video_enabled:
default: false
example: false
type: boolean
responsive_web_twitter_article_tweet_consumption_enabled:
default: true
example: true
type: boolean
rweb_tipjar_consumption_enabled:
default: true
example: true
type: boolean
rweb_video_timestamps_enabled:
default: true
example: true
@ -4997,10 +5010,6 @@ paths:
default: true
example: true
type: boolean
tweetypie_unmention_optimization_enabled:
default: true
example: true
type: boolean
verified_phone_label_enabled:
default: false
example: false
@ -5010,26 +5019,28 @@ paths:
example: true
type: boolean
required:
- rweb_tipjar_consumption_enabled
- responsive_web_graphql_exclude_directive_enabled
- verified_phone_label_enabled
- creator_subscriptions_tweet_preview_api_enabled
- responsive_web_graphql_timeline_navigation_enabled
- responsive_web_graphql_skip_user_profile_image_extensions_enabled
- communities_web_enable_tweet_community_results_fetch
- c9s_tweet_anatomy_moderator_badge_enabled
- tweetypie_unmention_optimization_enabled
- articles_preview_enabled
- responsive_web_edit_tweet_api_enabled
- graphql_is_translatable_rweb_tweet_is_translatable_enabled
- view_counts_everywhere_api_enabled
- longform_notetweets_consumption_enabled
- responsive_web_twitter_article_tweet_consumption_enabled
- tweet_awards_web_tipping_enabled
- creator_subscriptions_quote_tweet_preview_enabled
- freedom_of_speech_not_reach_fetch_enabled
- standardized_nudges_misinfo
- tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled
- rweb_video_timestamps_enabled
- longform_notetweets_rich_text_read_enabled
- longform_notetweets_inline_media_enabled
- responsive_web_media_download_video_enabled
- responsive_web_enhance_cards_enabled
type: object
in: query
@ -5668,8 +5679,8 @@ paths:
name: pathQueryId
required: true
schema:
default: DiTkXJgLqBBxCs7zaYsbtA
example: DiTkXJgLqBBxCs7zaYsbtA
default: HyuV8ml52TYmyUjyrDq1CQ
example: HyuV8ml52TYmyUjyrDq1CQ
type: string
- content:
application/json:
@ -5876,8 +5887,8 @@ paths:
name: pathQueryId
required: true
schema:
default: HJFjzBgCs16TqxewQOeLNg
example: HJFjzBgCs16TqxewQOeLNg
default: E6AtJXVPtK7nIHAntKc5fA
example: E6AtJXVPtK7nIHAntKc5fA
type: string
- content:
application/json:
@ -5914,8 +5925,8 @@ paths:
- includePromotedContent
- latestControlAvailable
- requestContext
- withCommunity
- seenTweetIds
- withCommunity
type: object
in: query
name: variables
@ -6089,8 +6100,8 @@ paths:
name: pathQueryId
required: true
schema:
default: aeJWz--kknVBOl7wQ7gh7Q
example: aeJWz--kknVBOl7wQ7gh7Q
default: px6_YxfWkXo0odY84iqqmw
example: px6_YxfWkXo0odY84iqqmw
type: string
- content:
application/json:
@ -6260,6 +6271,20 @@ paths:
in: query
name: features
required: true
- content:
application/json:
schema:
properties:
withArticlePlainText:
default: false
example: false
type: boolean
required:
- withArticlePlainText
type: object
in: query
name: fieldToggles
required: true
responses:
'200':
content:
@ -6305,8 +6330,8 @@ paths:
name: pathQueryId
required: true
schema:
default: Pa45JvqZuKcW1plybfgBlQ
example: Pa45JvqZuKcW1plybfgBlQ
default: f-Lsj0rHCztXcgdo585UUw
example: f-Lsj0rHCztXcgdo585UUw
type: string
- content:
application/json:
@ -6564,8 +6589,8 @@ paths:
name: pathQueryId
required: true
schema:
default: 8019obfgnveiPiJuS2Rtow
example: 8019obfgnveiPiJuS2Rtow
default: rPcOnVhyaTBQrVgPuY7x7A
example: rPcOnVhyaTBQrVgPuY7x7A
type: string
- content:
application/json:
@ -6760,8 +6785,8 @@ paths:
name: pathQueryId
required: true
schema:
default: UN1i3zUiCWa-6r-Uaho4fw
example: UN1i3zUiCWa-6r-Uaho4fw
default: MJpyQGqgklrVl_0X9gNy3A
example: MJpyQGqgklrVl_0X9gNy3A
type: string
- content:
application/json:
@ -6961,8 +6986,8 @@ paths:
name: pathQueryId
required: true
schema:
default: QuBlQ6SxNAQCt6-kBiCXCQ
example: QuBlQ6SxNAQCt6-kBiCXCQ
default: nBS-WpgA6ZG0CyNHD517JQ
example: nBS-WpgA6ZG0CyNHD517JQ
type: string
- content:
application/json:
@ -6976,6 +7001,10 @@ paths:
default: true
example: true
type: boolean
rankingMode:
default: Relevance
example: Relevance
type: string
referrer:
default: home
example: home
@ -6992,10 +7021,6 @@ paths:
default: true
example: true
type: boolean
withV2Timeline:
default: true
example: true
type: boolean
withVoice:
default: true
example: true
@ -7008,12 +7033,12 @@ paths:
- focalTweetId
- referrer
- with_rux_injections
- rankingMode
- includePromotedContent
- withCommunity
- withQuickPromoteEligibilityTweetFields
- withBirdwatchNotes
- withVoice
- withV2Timeline
type: object
in: query
name: variables
@ -7154,9 +7179,19 @@ paths:
default: true
example: true
type: boolean
withDisallowedReplyControls:
default: false
example: false
type: boolean
withGrokAnalyze:
default: false
example: false
type: boolean
required:
- withArticleRichContentState
- withArticlePlainText
- withGrokAnalyze
- withDisallowedReplyControls
type: object
in: query
name: fieldToggles
@ -7631,8 +7666,8 @@ paths:
name: pathQueryId
required: true
schema:
default: Yka-W8dz7RaEuQNkroPkYw
example: Yka-W8dz7RaEuQNkroPkYw
default: BQ6xjFU6Mgm-WhEP3OiT9w
example: BQ6xjFU6Mgm-WhEP3OiT9w
type: string
- content:
application/json:
@ -7642,13 +7677,8 @@ paths:
default: elonmusk
example: elonmusk
type: string
withSafetyModeUserFields:
default: true
example: true
type: boolean
required:
- screen_name
- withSafetyModeUserFields
type: object
in: query
name: variables
@ -7982,8 +8012,8 @@ paths:
name: pathQueryId
required: true
schema:
default: dexO_2tohK86JDudXXG3Yw
example: dexO_2tohK86JDudXXG3Yw
default: HaouMjBviBKKTYZGV_9qtg
example: HaouMjBviBKKTYZGV_9qtg
type: string
- content:
application/json:
@ -8153,6 +8183,20 @@ paths:
in: query
name: features
required: true
- content:
application/json:
schema:
properties:
withArticlePlainText:
default: false
example: false
type: boolean
required:
- withArticlePlainText
type: object
in: query
name: fieldToggles
required: true
responses:
'200':
content:
@ -8198,8 +8242,8 @@ paths:
name: pathQueryId
required: true
schema:
default: E3opETHurmVJflFsUBVuUQ
example: E3opETHurmVJflFsUBVuUQ
default: Tg82Ez_kxVaJf7OPbUdbCg
example: Tg82Ez_kxVaJf7OPbUdbCg
type: string
- content:
application/json:
@ -8364,6 +8408,20 @@ paths:
in: query
name: features
required: true
- content:
application/json:
schema:
properties:
withArticlePlainText:
default: false
example: false
type: boolean
required:
- withArticlePlainText
type: object
in: query
name: fieldToggles
required: true
responses:
'200':
content:
@ -8409,8 +8467,8 @@ paths:
name: pathQueryId
required: true
schema:
default: bt4TKuFz4T7Ckk-VvQVSow
example: bt4TKuFz4T7Ckk-VvQVSow
default: HmWGzuzXoI6uFqqX6QNhEg
example: HmWGzuzXoI6uFqqX6QNhEg
type: string
- content:
application/json:
@ -8575,6 +8633,20 @@ paths:
in: query
name: features
required: true
- content:
application/json:
schema:
properties:
withArticlePlainText:
default: false
example: false
type: boolean
required:
- withArticlePlainText
type: object
in: query
name: fieldToggles
required: true
responses:
'200':
content:
@ -8620,8 +8692,8 @@ paths:
name: pathQueryId
required: true
schema:
default: GYBpHkmyXjeuX9IeNJmweA
example: GYBpHkmyXjeuX9IeNJmweA
default: lc85bOG5T3IIS4u485VtBg
example: lc85bOG5T3IIS4u485VtBg
type: string
- content:
application/json: