From 99c7c0f4b9002b1c5932a4e0ef74ccd9cd99329c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Wed, 7 May 2025 01:18:01 +0900 Subject: [PATCH] add #89 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- dist/compatible/openapi-3.0.yaml | 478 ++++++++++++-- dist/docs/openapi-3.0.yaml | 892 +++++++++++++++++++++++++-- src/openapi/paths/timeline.yaml | 161 ++++- src/openapi/schemas/content.yaml | 8 +- src/openapi/schemas/instruction.yaml | 2 +- test/python/test_serialize.py | 24 +- 6 files changed, 1455 insertions(+), 110 deletions(-) diff --git a/dist/compatible/openapi-3.0.yaml b/dist/compatible/openapi-3.0.yaml index 48e99c1..473549c 100644 --- a/dist/compatible/openapi-3.0.yaml +++ b/dist/compatible/openapi-3.0.yaml @@ -1,5 +1,26 @@ components: schemas: + AboutCommunityResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + about_timeline: + $ref: '#/components/schemas/TimelineResult' + required: + - __typename + - about_timeline + AboutCommunityResults: + properties: + result: + $ref: '#/components/schemas/AboutCommunityResult' + required: + - result + AboutCommunityTweetData: + properties: + communityResults: + $ref: '#/components/schemas/AboutCommunityResults' + required: + - communityResults AdditionalMediaInfo: properties: call_to_actions: @@ -317,6 +338,16 @@ components: $ref: '#/components/schemas/CommunityData' required: - result + CommunityAboutTimelineResponse: + properties: + data: + $ref: '#/components/schemas/AboutCommunityTweetData' + errors: + items: + $ref: '#/components/schemas/ErrorResponse' + type: array + required: + - data CommunityActions: properties: delete_action_result: @@ -480,6 +511,16 @@ components: - __typename - reason - message + CommunityMediaTimelineResponse: + properties: + data: + $ref: '#/components/schemas/MediaCommunityTweetData' + errors: + items: + $ref: '#/components/schemas/ErrorResponse' + type: array + required: + - data CommunityPinActionResult: properties: __typename: @@ -515,6 +556,16 @@ components: required: - rest_id - name + CommunityTweetsTimelineResponse: + properties: + data: + $ref: '#/components/schemas/RankedCommunityTweetData' + errors: + items: + $ref: '#/components/schemas/ErrorResponse' + type: array + required: + - data CommunityUnpinActionResult: properties: __typename: @@ -970,6 +1021,8 @@ components: properties: home: $ref: '#/components/schemas/HomeTimelineHome' + required: + - home InstructionType: enum: - TimelineAddEntries @@ -1060,18 +1113,16 @@ components: type: array required: - data - ListTweetsTimeline: - properties: - timeline: - $ref: '#/components/schemas/Timeline' ListTweetsTimelineData: properties: list: $ref: '#/components/schemas/ListTweetsTimelineList' + required: + - list ListTweetsTimelineList: properties: tweets_timeline: - $ref: '#/components/schemas/ListTweetsTimeline' + $ref: '#/components/schemas/TimelineResult' required: - tweets_timeline Location: @@ -1151,6 +1202,28 @@ components: - original_info - media_key - ext_media_availability + MediaCommunityResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + community_media_timeline: + $ref: '#/components/schemas/TimelineResult' + required: + - __typename + - community_media_timeline + MediaCommunityResults: + properties: + result: + $ref: '#/components/schemas/MediaCommunityResult' + required: + - result + MediaCommunityTweetData: + properties: + communityResults: + $ref: '#/components/schemas/MediaCommunityResults' + required: + - __typename + - communityResults MediaExtended: properties: additional_media_info: @@ -1358,7 +1431,7 @@ components: dispensable: type: boolean entryId: - pattern: ^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+ + pattern: ^(([a-zA-Z]+|[0-9]+|[0-9a-f]+)(-|$))+ type: string item: $ref: '#/components/schemas/ModuleEntry' @@ -1495,6 +1568,27 @@ components: - url - expanded - display + RankedCommunityResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + ranked_community_timeline: + $ref: '#/components/schemas/TimelineResult' + required: + - __typename + - ranked_community_timeline + RankedCommunityResults: + properties: + result: + $ref: '#/components/schemas/RankedCommunityResult' + required: + - result + RankedCommunityTweetData: + properties: + communityResults: + $ref: '#/components/schemas/RankedCommunityResults' + required: + - communityResults Retweet: properties: legacy: @@ -1526,6 +1620,8 @@ components: properties: search_by_raw_query: $ref: '#/components/schemas/SearchByRawQuery' + required: + - search_by_raw_query SearchTimelineResponse: properties: data: @@ -1745,7 +1841,7 @@ components: content: $ref: '#/components/schemas/ContentUnion' entryId: - pattern: ^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+ + pattern: ^(([a-zA-Z]+|[0-9]+|[0-9a-f]+)(-|$))+ type: string sortIndex: pattern: '[0-9]+$' @@ -2032,7 +2128,6 @@ components: - __typename - entryType - displayType - - clientEventInfo TimelineTombstone: properties: __typename: @@ -2125,6 +2220,7 @@ components: - User - UserDetailed - SubscribableUser + - UserConcise type: string user_results: $ref: '#/components/schemas/UserResults' @@ -4362,8 +4458,8 @@ paths: name: pathQueryId required: true schema: - default: -LGfdImKeQz0xS_jjUwzlA - example: -LGfdImKeQz0xS_jjUwzlA + default: 2neUNDqrrFzbLui8yallcQ + example: 2neUNDqrrFzbLui8yallcQ type: string - in: query name: variables @@ -4447,6 +4543,292 @@ paths: type: string tags: - tweet + /graphql/{pathQueryId}/CommunityAboutTimeline: + get: + description: get about of community + operationId: getCommunityAboutTimeline + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: hSZPW3bFfaXkhJRBnZpLMA + example: hSZPW3bFfaXkhJRBnZpLMA + type: string + - in: query + name: variables + required: true + schema: + default: '{"communityId": "1489422448332197888", "withCommunity": true}' + example: '{"communityId": "1489422448332197888", "withCommunity": true}' + type: string + - in: query + name: features + required: true + schema: + default: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": + true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": + false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": + false, "responsive_web_grok_share_attachment_enabled": true, "articles_preview_enabled": + true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": + true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": + true, "responsive_web_twitter_article_tweet_consumption_enabled": true, + "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": + false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": + true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": + true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": + true, "responsive_web_grok_image_annotation_enabled": true, "responsive_web_enhance_cards_enabled": + false}' + example: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": + true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": + false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": + false, "responsive_web_grok_share_attachment_enabled": true, "articles_preview_enabled": + true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": + true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": + true, "responsive_web_twitter_article_tweet_consumption_enabled": true, + "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": + false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": + true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": + true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": + true, "responsive_web_grok_image_annotation_enabled": true, "responsive_web_enhance_cards_enabled": + false}' + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommunityAboutTimelineResponse' + description: Successful operation + headers: + x-connection-hash: + 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 + tags: + - tweet + /graphql/{pathQueryId}/CommunityMediaTimeline: + get: + description: get media list of community + operationId: getCommunityMediaTimeline + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: eJqXEMJZ0w89TEGgPwEatw + example: eJqXEMJZ0w89TEGgPwEatw + type: string + - in: query + name: variables + required: true + schema: + default: '{"communityId": "1489422448332197888", "count": 20, "withCommunity": + true}' + example: '{"communityId": "1489422448332197888", "count": 20, "withCommunity": + true}' + type: string + - in: query + name: features + required: true + schema: + default: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": + true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": + false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": + false, "responsive_web_grok_share_attachment_enabled": true, "articles_preview_enabled": + true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": + true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": + true, "responsive_web_twitter_article_tweet_consumption_enabled": true, + "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": + false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": + true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": + true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": + true, "responsive_web_grok_image_annotation_enabled": true, "responsive_web_enhance_cards_enabled": + false}' + example: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": + true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": + false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": + false, "responsive_web_grok_share_attachment_enabled": true, "articles_preview_enabled": + true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": + true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": + true, "responsive_web_twitter_article_tweet_consumption_enabled": true, + "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": + false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": + true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": + true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": + true, "responsive_web_grok_image_annotation_enabled": true, "responsive_web_enhance_cards_enabled": + false}' + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommunityMediaTimelineResponse' + description: Successful operation + headers: + x-connection-hash: + 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 + tags: + - tweet + /graphql/{pathQueryId}/CommunityTweetsTimeline: + get: + description: get tweet list of community. rankingMode:[Recency, Relevance] + operationId: getCommunityTweetsTimeline + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: rp4YNcEs-BXdkm1DA4PMhw + example: rp4YNcEs-BXdkm1DA4PMhw + type: string + - in: query + name: variables + required: true + schema: + default: '{"communityId": "1489422448332197888", "count": 20, "displayLocation": + "Community", "rankingMode": "Relevance", "withCommunity": true}' + example: '{"communityId": "1489422448332197888", "count": 20, "displayLocation": + "Community", "rankingMode": "Relevance", "withCommunity": true}' + type: string + - in: query + name: features + required: true + schema: + default: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": + true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": + false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": + false, "responsive_web_grok_share_attachment_enabled": true, "articles_preview_enabled": + true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": + true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": + true, "responsive_web_twitter_article_tweet_consumption_enabled": true, + "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": + false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": + true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": + true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": + true, "responsive_web_grok_image_annotation_enabled": true, "responsive_web_enhance_cards_enabled": + false}' + example: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": + true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": + false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": + false, "responsive_web_grok_share_attachment_enabled": true, "articles_preview_enabled": + true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": + true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": + true, "responsive_web_twitter_article_tweet_consumption_enabled": true, + "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": + false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": + true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": + true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": + true, "responsive_web_grok_image_annotation_enabled": true, "responsive_web_enhance_cards_enabled": + false}' + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommunityTweetsTimelineResponse' + description: Successful operation + headers: + x-connection-hash: + 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 + tags: + - tweet /graphql/{pathQueryId}/CreateBookmark: post: description: create Bookmark @@ -5242,8 +5624,8 @@ paths: name: pathQueryId required: true schema: - default: 4AzoFlLkEcs2bx5pO1mvsQ - example: 4AzoFlLkEcs2bx5pO1mvsQ + default: G27_CXbgIP3G9Fod_2RMUA + example: G27_CXbgIP3G9Fod_2RMUA type: string - in: query name: variables @@ -5338,8 +5720,8 @@ paths: name: pathQueryId required: true schema: - default: Elc_-qTARceHpztqhI9PQA - example: Elc_-qTARceHpztqhI9PQA + default: IOh4aS6UdGWGJUYTqliQ7Q + example: IOh4aS6UdGWGJUYTqliQ7Q type: string - in: query name: variables @@ -5434,8 +5816,8 @@ paths: name: pathQueryId required: true schema: - default: 25T3tmcTp4XRUrFhlMa56Q - example: 25T3tmcTp4XRUrFhlMa56Q + default: pNK460VRQKGuLfDcesjNEQ + example: pNK460VRQKGuLfDcesjNEQ type: string - in: query name: variables @@ -5530,8 +5912,8 @@ paths: name: pathQueryId required: true schema: - default: C1qZ6bs-L3oc_TKSZyxkXQ - example: C1qZ6bs-L3oc_TKSZyxkXQ + default: zx6e-TLzRkeDO_a7p4b3JQ + example: zx6e-TLzRkeDO_a7p4b3JQ type: string - in: query name: variables @@ -5626,8 +6008,8 @@ paths: name: pathQueryId required: true schema: - default: CRprHpVA12yhsub-KRERIg - example: CRprHpVA12yhsub-KRERIg + default: BKB7oi212Fi7kQtCBGE4zA + example: BKB7oi212Fi7kQtCBGE4zA type: string - in: query name: variables @@ -5722,8 +6104,8 @@ paths: name: pathQueryId required: true schema: - default: Q_P3YVnmHunGFkZ8ISM-7w - example: Q_P3YVnmHunGFkZ8ISM-7w + default: c-CzHF1LboFilMpsx4ZCrQ + example: c-CzHF1LboFilMpsx4ZCrQ type: string - in: query name: variables @@ -5820,8 +6202,8 @@ paths: name: pathQueryId required: true schema: - default: eQl7iWsCr2fChppuJdAeRw - example: eQl7iWsCr2fChppuJdAeRw + default: lIDpu_NWL7_VhimGGt0o6A + example: lIDpu_NWL7_VhimGGt0o6A type: string - in: query name: variables @@ -5850,7 +6232,7 @@ paths: true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": true, "responsive_web_twitter_article_tweet_consumption_enabled": true, "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": - false, "responsive_web_grok_analysis_button_from_backend": true, "creator_subscriptions_quote_tweet_preview_enabled": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": @@ -5868,7 +6250,7 @@ paths: true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled": true, "responsive_web_twitter_article_tweet_consumption_enabled": true, "tweet_awards_web_tipping_enabled": false, "responsive_web_grok_show_grok_translated_post": - false, "responsive_web_grok_analysis_button_from_backend": true, "creator_subscriptions_quote_tweet_preview_enabled": + false, "responsive_web_grok_analysis_button_from_backend": false, "creator_subscriptions_quote_tweet_preview_enabled": false, "freedom_of_speech_not_reach_fetch_enabled": true, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled": @@ -5925,8 +6307,8 @@ paths: name: pathQueryId required: true schema: - default: BkauSnPUDQTeeJsxq17opA - example: BkauSnPUDQTeeJsxq17opA + default: RlZzktZY_9wJynoepm8ZsA + example: RlZzktZY_9wJynoepm8ZsA type: string - in: query name: variables @@ -6077,8 +6459,8 @@ paths: name: pathQueryId required: true schema: - default: i-CI8t2pJD15euZJErEDrg - example: i-CI8t2pJD15euZJErEDrg + default: Mbs-2NiTvy32oHDerWtVhg + example: Mbs-2NiTvy32oHDerWtVhg type: string - in: query name: variables @@ -6173,8 +6555,8 @@ paths: name: pathQueryId required: true schema: - default: AIdc203rPpK_k_2KWSdm7g - example: AIdc203rPpK_k_2KWSdm7g + default: VhUd6vHVmLBcw0uX-6jMLA + example: VhUd6vHVmLBcw0uX-6jMLA type: string - in: query name: variables @@ -6269,8 +6651,8 @@ paths: name: pathQueryId required: true schema: - default: _8aYOgEDz35BrBcBal1-_w - example: _8aYOgEDz35BrBcBal1-_w + default: xd_EMdYvB9hfZsZ6Idri0w + example: xd_EMdYvB9hfZsZ6Idri0w type: string - in: query name: variables @@ -6710,8 +7092,8 @@ paths: name: pathQueryId required: true schema: - default: y0aDPjeWFCpvY3GOmGXKhQ - example: y0aDPjeWFCpvY3GOmGXKhQ + default: 70Yf8aSyhGOXaKRLJdVA2A + example: 70Yf8aSyhGOXaKRLJdVA2A type: string - in: query name: variables @@ -6727,9 +7109,9 @@ paths: required: true schema: default: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": - true, "rweb_tipjar_consumption_enabled": true, "responsive_web_graphql_exclude_directive_enabled": - true, "verified_phone_label_enabled": false, "creator_subscriptions_tweet_preview_api_enabled": - true, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": @@ -6745,9 +7127,9 @@ paths: true, "responsive_web_grok_image_annotation_enabled": true, "responsive_web_enhance_cards_enabled": false}' example: '{"rweb_video_screen_enabled": false, "profile_label_improvements_pcf_label_in_post_enabled": - true, "rweb_tipjar_consumption_enabled": true, "responsive_web_graphql_exclude_directive_enabled": - true, "verified_phone_label_enabled": false, "creator_subscriptions_tweet_preview_api_enabled": - true, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": + true, "rweb_tipjar_consumption_enabled": true, "verified_phone_label_enabled": + false, "creator_subscriptions_tweet_preview_api_enabled": true, "responsive_web_graphql_timeline_navigation_enabled": + true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled": false, "premium_content_api_read_enabled": false, "communities_web_enable_tweet_community_results_fetch": true, "c9s_tweet_anatomy_moderator_badge_enabled": true, "responsive_web_grok_analyze_button_fetch_trends_enabled": false, "responsive_web_grok_analyze_post_followups_enabled": true, "responsive_web_jetfuel_frame": @@ -6813,8 +7195,8 @@ paths: name: pathQueryId required: true schema: - default: vFPc2LVIu7so2uA_gHQAdg - example: vFPc2LVIu7so2uA_gHQAdg + default: 1H9ibIdchWO0_vz3wJLDTA + example: 1H9ibIdchWO0_vz3wJLDTA type: string - in: query name: variables @@ -6918,8 +7300,8 @@ paths: name: pathQueryId required: true schema: - default: HeWHY26ItCfUmm1e6ITjeA - example: HeWHY26ItCfUmm1e6ITjeA + default: q6xj5bs0hapm9309hexA_g + example: q6xj5bs0hapm9309hexA_g type: string - in: query name: variables @@ -7021,8 +7403,8 @@ paths: name: pathQueryId required: true schema: - default: OAx9yEcW3JA9bPo63pcYlA - example: OAx9yEcW3JA9bPo63pcYlA + default: 6hvhmQQ9zPIR8RZWHFAm4w + example: 6hvhmQQ9zPIR8RZWHFAm4w type: string - in: query name: variables diff --git a/dist/docs/openapi-3.0.yaml b/dist/docs/openapi-3.0.yaml index 3a3a460..1136f38 100644 --- a/dist/docs/openapi-3.0.yaml +++ b/dist/docs/openapi-3.0.yaml @@ -1,5 +1,26 @@ components: schemas: + AboutCommunityResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + about_timeline: + $ref: '#/components/schemas/TimelineResult' + required: + - __typename + - about_timeline + AboutCommunityResults: + properties: + result: + $ref: '#/components/schemas/AboutCommunityResult' + required: + - result + AboutCommunityTweetData: + properties: + communityResults: + $ref: '#/components/schemas/AboutCommunityResults' + required: + - communityResults AdditionalMediaInfo: properties: call_to_actions: @@ -317,6 +338,16 @@ components: $ref: '#/components/schemas/CommunityData' required: - result + CommunityAboutTimelineResponse: + properties: + data: + $ref: '#/components/schemas/AboutCommunityTweetData' + errors: + items: + $ref: '#/components/schemas/ErrorResponse' + type: array + required: + - data CommunityActions: properties: delete_action_result: @@ -480,6 +511,16 @@ components: - __typename - reason - message + CommunityMediaTimelineResponse: + properties: + data: + $ref: '#/components/schemas/MediaCommunityTweetData' + errors: + items: + $ref: '#/components/schemas/ErrorResponse' + type: array + required: + - data CommunityPinActionResult: properties: __typename: @@ -515,6 +556,16 @@ components: required: - rest_id - name + CommunityTweetsTimelineResponse: + properties: + data: + $ref: '#/components/schemas/RankedCommunityTweetData' + errors: + items: + $ref: '#/components/schemas/ErrorResponse' + type: array + required: + - data CommunityUnpinActionResult: properties: __typename: @@ -970,6 +1021,8 @@ components: properties: home: $ref: '#/components/schemas/HomeTimelineHome' + required: + - home InstructionType: enum: - TimelineAddEntries @@ -1060,18 +1113,16 @@ components: type: array required: - data - ListTweetsTimeline: - properties: - timeline: - $ref: '#/components/schemas/Timeline' ListTweetsTimelineData: properties: list: $ref: '#/components/schemas/ListTweetsTimelineList' + required: + - list ListTweetsTimelineList: properties: tweets_timeline: - $ref: '#/components/schemas/ListTweetsTimeline' + $ref: '#/components/schemas/TimelineResult' required: - tweets_timeline Location: @@ -1151,6 +1202,28 @@ components: - original_info - media_key - ext_media_availability + MediaCommunityResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + community_media_timeline: + $ref: '#/components/schemas/TimelineResult' + required: + - __typename + - community_media_timeline + MediaCommunityResults: + properties: + result: + $ref: '#/components/schemas/MediaCommunityResult' + required: + - result + MediaCommunityTweetData: + properties: + communityResults: + $ref: '#/components/schemas/MediaCommunityResults' + required: + - __typename + - communityResults MediaExtended: properties: additional_media_info: @@ -1358,7 +1431,7 @@ components: dispensable: type: boolean entryId: - pattern: ^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+ + pattern: ^(([a-zA-Z]+|[0-9]+|[0-9a-f]+)(-|$))+ type: string item: $ref: '#/components/schemas/ModuleEntry' @@ -1495,6 +1568,27 @@ components: - url - expanded - display + RankedCommunityResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + ranked_community_timeline: + $ref: '#/components/schemas/TimelineResult' + required: + - __typename + - ranked_community_timeline + RankedCommunityResults: + properties: + result: + $ref: '#/components/schemas/RankedCommunityResult' + required: + - result + RankedCommunityTweetData: + properties: + communityResults: + $ref: '#/components/schemas/RankedCommunityResults' + required: + - communityResults Retweet: properties: legacy: @@ -1526,6 +1620,8 @@ components: properties: search_by_raw_query: $ref: '#/components/schemas/SearchByRawQuery' + required: + - search_by_raw_query SearchTimelineResponse: properties: data: @@ -1745,7 +1841,7 @@ components: content: $ref: '#/components/schemas/ContentUnion' entryId: - pattern: ^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+ + pattern: ^(([a-zA-Z]+|[0-9]+|[0-9a-f]+)(-|$))+ type: string sortIndex: pattern: '[0-9]+$' @@ -2032,7 +2128,6 @@ components: - __typename - entryType - displayType - - clientEventInfo TimelineTombstone: properties: __typename: @@ -2125,6 +2220,7 @@ components: - User - UserDetailed - SubscribableUser + - UserConcise type: string user_results: $ref: '#/components/schemas/UserResults' @@ -4362,8 +4458,8 @@ paths: name: pathQueryId required: true schema: - default: -LGfdImKeQz0xS_jjUwzlA - example: -LGfdImKeQz0xS_jjUwzlA + default: 2neUNDqrrFzbLui8yallcQ + example: 2neUNDqrrFzbLui8yallcQ type: string - content: application/json: @@ -4582,6 +4678,713 @@ paths: type: string tags: - tweet + /graphql/{pathQueryId}/CommunityAboutTimeline: + get: + description: get about of community + operationId: getCommunityAboutTimeline + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: hSZPW3bFfaXkhJRBnZpLMA + example: hSZPW3bFfaXkhJRBnZpLMA + type: string + - content: + application/json: + schema: + properties: + communityId: + default: '1489422448332197888' + example: '1489422448332197888' + type: string + withCommunity: + default: true + example: true + type: boolean + required: + - communityId + - withCommunity + type: object + in: query + name: variables + required: true + - content: + 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 + type: boolean + freedom_of_speech_not_reach_fetch_enabled: + default: true + example: true + type: boolean + graphql_is_translatable_rweb_tweet_is_translatable_enabled: + default: true + example: true + type: boolean + longform_notetweets_consumption_enabled: + default: true + example: true + type: boolean + longform_notetweets_inline_media_enabled: + default: true + example: true + type: boolean + longform_notetweets_rich_text_read_enabled: + default: true + example: true + type: boolean + premium_content_api_read_enabled: + default: false + example: false + type: boolean + profile_label_improvements_pcf_label_in_post_enabled: + default: true + example: true + type: boolean + responsive_web_edit_tweet_api_enabled: + default: true + example: true + type: boolean + responsive_web_enhance_cards_enabled: + default: false + example: false + type: boolean + responsive_web_graphql_skip_user_profile_image_extensions_enabled: + default: false + example: false + type: boolean + responsive_web_graphql_timeline_navigation_enabled: + default: true + example: true + type: boolean + responsive_web_grok_analysis_button_from_backend: + default: false + example: false + type: boolean + responsive_web_grok_analyze_button_fetch_trends_enabled: + default: false + example: false + type: boolean + responsive_web_grok_analyze_post_followups_enabled: + default: true + example: true + type: boolean + responsive_web_grok_image_annotation_enabled: + default: true + example: true + type: boolean + responsive_web_grok_share_attachment_enabled: + default: true + example: true + type: boolean + responsive_web_grok_show_grok_translated_post: + default: false + example: false + type: boolean + responsive_web_jetfuel_frame: + 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_screen_enabled: + default: false + example: false + type: boolean + standardized_nudges_misinfo: + default: true + example: true + type: boolean + tweet_awards_web_tipping_enabled: + default: false + example: false + type: boolean + tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: + default: true + example: true + type: boolean + verified_phone_label_enabled: + default: false + example: false + type: boolean + view_counts_everywhere_api_enabled: + default: true + example: true + type: boolean + required: + - rweb_video_screen_enabled + - profile_label_improvements_pcf_label_in_post_enabled + - rweb_tipjar_consumption_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 + - premium_content_api_read_enabled + - communities_web_enable_tweet_community_results_fetch + - c9s_tweet_anatomy_moderator_badge_enabled + - responsive_web_grok_analyze_button_fetch_trends_enabled + - responsive_web_grok_analyze_post_followups_enabled + - responsive_web_jetfuel_frame + - responsive_web_grok_share_attachment_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 + - responsive_web_grok_show_grok_translated_post + - responsive_web_grok_analysis_button_from_backend + - 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 + - longform_notetweets_rich_text_read_enabled + - longform_notetweets_inline_media_enabled + - responsive_web_grok_image_annotation_enabled + - responsive_web_enhance_cards_enabled + type: object + in: query + name: features + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommunityAboutTimelineResponse' + description: Successful operation + headers: + x-connection-hash: + 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 + tags: + - tweet + /graphql/{pathQueryId}/CommunityMediaTimeline: + get: + description: get media list of community + operationId: getCommunityMediaTimeline + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: eJqXEMJZ0w89TEGgPwEatw + example: eJqXEMJZ0w89TEGgPwEatw + type: string + - content: + application/json: + schema: + properties: + communityId: + default: '1489422448332197888' + example: '1489422448332197888' + type: string + count: + default: 20 + example: 20 + type: integer + withCommunity: + default: true + example: true + type: boolean + required: + - communityId + - count + - withCommunity + type: object + in: query + name: variables + required: true + - content: + 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 + type: boolean + freedom_of_speech_not_reach_fetch_enabled: + default: true + example: true + type: boolean + graphql_is_translatable_rweb_tweet_is_translatable_enabled: + default: true + example: true + type: boolean + longform_notetweets_consumption_enabled: + default: true + example: true + type: boolean + longform_notetweets_inline_media_enabled: + default: true + example: true + type: boolean + longform_notetweets_rich_text_read_enabled: + default: true + example: true + type: boolean + premium_content_api_read_enabled: + default: false + example: false + type: boolean + profile_label_improvements_pcf_label_in_post_enabled: + default: true + example: true + type: boolean + responsive_web_edit_tweet_api_enabled: + default: true + example: true + type: boolean + responsive_web_enhance_cards_enabled: + default: false + example: false + type: boolean + responsive_web_graphql_skip_user_profile_image_extensions_enabled: + default: false + example: false + type: boolean + responsive_web_graphql_timeline_navigation_enabled: + default: true + example: true + type: boolean + responsive_web_grok_analysis_button_from_backend: + default: false + example: false + type: boolean + responsive_web_grok_analyze_button_fetch_trends_enabled: + default: false + example: false + type: boolean + responsive_web_grok_analyze_post_followups_enabled: + default: true + example: true + type: boolean + responsive_web_grok_image_annotation_enabled: + default: true + example: true + type: boolean + responsive_web_grok_share_attachment_enabled: + default: true + example: true + type: boolean + responsive_web_grok_show_grok_translated_post: + default: false + example: false + type: boolean + responsive_web_jetfuel_frame: + 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_screen_enabled: + default: false + example: false + type: boolean + standardized_nudges_misinfo: + default: true + example: true + type: boolean + tweet_awards_web_tipping_enabled: + default: false + example: false + type: boolean + tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: + default: true + example: true + type: boolean + verified_phone_label_enabled: + default: false + example: false + type: boolean + view_counts_everywhere_api_enabled: + default: true + example: true + type: boolean + required: + - rweb_video_screen_enabled + - profile_label_improvements_pcf_label_in_post_enabled + - rweb_tipjar_consumption_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 + - premium_content_api_read_enabled + - communities_web_enable_tweet_community_results_fetch + - c9s_tweet_anatomy_moderator_badge_enabled + - responsive_web_grok_analyze_button_fetch_trends_enabled + - responsive_web_grok_analyze_post_followups_enabled + - responsive_web_jetfuel_frame + - responsive_web_grok_share_attachment_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 + - responsive_web_grok_show_grok_translated_post + - responsive_web_grok_analysis_button_from_backend + - 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 + - longform_notetweets_rich_text_read_enabled + - longform_notetweets_inline_media_enabled + - responsive_web_grok_image_annotation_enabled + - responsive_web_enhance_cards_enabled + type: object + in: query + name: features + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommunityMediaTimelineResponse' + description: Successful operation + headers: + x-connection-hash: + 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 + tags: + - tweet + /graphql/{pathQueryId}/CommunityTweetsTimeline: + get: + description: get tweet list of community. rankingMode:[Recency, Relevance] + operationId: getCommunityTweetsTimeline + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: rp4YNcEs-BXdkm1DA4PMhw + example: rp4YNcEs-BXdkm1DA4PMhw + type: string + - content: + application/json: + schema: + properties: + communityId: + default: '1489422448332197888' + example: '1489422448332197888' + type: string + count: + default: 20 + example: 20 + type: integer + displayLocation: + default: Community + example: Community + type: string + rankingMode: + default: Relevance + example: Relevance + type: string + withCommunity: + default: true + example: true + type: boolean + required: + - communityId + - count + - displayLocation + - rankingMode + - withCommunity + type: object + in: query + name: variables + required: true + - content: + 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 + type: boolean + freedom_of_speech_not_reach_fetch_enabled: + default: true + example: true + type: boolean + graphql_is_translatable_rweb_tweet_is_translatable_enabled: + default: true + example: true + type: boolean + longform_notetweets_consumption_enabled: + default: true + example: true + type: boolean + longform_notetweets_inline_media_enabled: + default: true + example: true + type: boolean + longform_notetweets_rich_text_read_enabled: + default: true + example: true + type: boolean + premium_content_api_read_enabled: + default: false + example: false + type: boolean + profile_label_improvements_pcf_label_in_post_enabled: + default: true + example: true + type: boolean + responsive_web_edit_tweet_api_enabled: + default: true + example: true + type: boolean + responsive_web_enhance_cards_enabled: + default: false + example: false + type: boolean + responsive_web_graphql_skip_user_profile_image_extensions_enabled: + default: false + example: false + type: boolean + responsive_web_graphql_timeline_navigation_enabled: + default: true + example: true + type: boolean + responsive_web_grok_analysis_button_from_backend: + default: false + example: false + type: boolean + responsive_web_grok_analyze_button_fetch_trends_enabled: + default: false + example: false + type: boolean + responsive_web_grok_analyze_post_followups_enabled: + default: true + example: true + type: boolean + responsive_web_grok_image_annotation_enabled: + default: true + example: true + type: boolean + responsive_web_grok_share_attachment_enabled: + default: true + example: true + type: boolean + responsive_web_grok_show_grok_translated_post: + default: false + example: false + type: boolean + responsive_web_jetfuel_frame: + 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_screen_enabled: + default: false + example: false + type: boolean + standardized_nudges_misinfo: + default: true + example: true + type: boolean + tweet_awards_web_tipping_enabled: + default: false + example: false + type: boolean + tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: + default: true + example: true + type: boolean + verified_phone_label_enabled: + default: false + example: false + type: boolean + view_counts_everywhere_api_enabled: + default: true + example: true + type: boolean + required: + - rweb_video_screen_enabled + - profile_label_improvements_pcf_label_in_post_enabled + - rweb_tipjar_consumption_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 + - premium_content_api_read_enabled + - communities_web_enable_tweet_community_results_fetch + - c9s_tweet_anatomy_moderator_badge_enabled + - responsive_web_grok_analyze_button_fetch_trends_enabled + - responsive_web_grok_analyze_post_followups_enabled + - responsive_web_jetfuel_frame + - responsive_web_grok_share_attachment_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 + - responsive_web_grok_show_grok_translated_post + - responsive_web_grok_analysis_button_from_backend + - 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 + - longform_notetweets_rich_text_read_enabled + - longform_notetweets_inline_media_enabled + - responsive_web_grok_image_annotation_enabled + - responsive_web_enhance_cards_enabled + type: object + in: query + name: features + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CommunityTweetsTimelineResponse' + description: Successful operation + headers: + x-connection-hash: + 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 + tags: + - tweet /graphql/{pathQueryId}/CreateBookmark: post: description: create Bookmark @@ -5377,8 +6180,8 @@ paths: name: pathQueryId required: true schema: - default: 4AzoFlLkEcs2bx5pO1mvsQ - example: 4AzoFlLkEcs2bx5pO1mvsQ + default: G27_CXbgIP3G9Fod_2RMUA + example: G27_CXbgIP3G9Fod_2RMUA type: string - content: application/json: @@ -5611,8 +6414,8 @@ paths: name: pathQueryId required: true schema: - default: Elc_-qTARceHpztqhI9PQA - example: Elc_-qTARceHpztqhI9PQA + default: IOh4aS6UdGWGJUYTqliQ7Q + example: IOh4aS6UdGWGJUYTqliQ7Q type: string - content: application/json: @@ -5845,8 +6648,8 @@ paths: name: pathQueryId required: true schema: - default: 25T3tmcTp4XRUrFhlMa56Q - example: 25T3tmcTp4XRUrFhlMa56Q + default: pNK460VRQKGuLfDcesjNEQ + example: pNK460VRQKGuLfDcesjNEQ type: string - content: application/json: @@ -6079,8 +6882,8 @@ paths: name: pathQueryId required: true schema: - default: C1qZ6bs-L3oc_TKSZyxkXQ - example: C1qZ6bs-L3oc_TKSZyxkXQ + default: zx6e-TLzRkeDO_a7p4b3JQ + example: zx6e-TLzRkeDO_a7p4b3JQ type: string - content: application/json: @@ -6313,8 +7116,8 @@ paths: name: pathQueryId required: true schema: - default: CRprHpVA12yhsub-KRERIg - example: CRprHpVA12yhsub-KRERIg + default: BKB7oi212Fi7kQtCBGE4zA + example: BKB7oi212Fi7kQtCBGE4zA type: string - content: application/json: @@ -6559,8 +7362,8 @@ paths: name: pathQueryId required: true schema: - default: Q_P3YVnmHunGFkZ8ISM-7w - example: Q_P3YVnmHunGFkZ8ISM-7w + default: c-CzHF1LboFilMpsx4ZCrQ + example: c-CzHF1LboFilMpsx4ZCrQ type: string - content: application/json: @@ -6810,8 +7613,8 @@ paths: name: pathQueryId required: true schema: - default: eQl7iWsCr2fChppuJdAeRw - example: eQl7iWsCr2fChppuJdAeRw + default: lIDpu_NWL7_VhimGGt0o6A + example: lIDpu_NWL7_VhimGGt0o6A type: string - content: application/json: @@ -6921,8 +7724,8 @@ paths: example: true type: boolean responsive_web_grok_analysis_button_from_backend: - default: true - example: true + default: false + example: false type: boolean responsive_web_grok_analyze_button_fetch_trends_enabled: default: false @@ -7073,8 +7876,8 @@ paths: name: pathQueryId required: true schema: - default: BkauSnPUDQTeeJsxq17opA - example: BkauSnPUDQTeeJsxq17opA + default: RlZzktZY_9wJynoepm8ZsA + example: RlZzktZY_9wJynoepm8ZsA type: string - content: application/json: @@ -7368,8 +8171,8 @@ paths: name: pathQueryId required: true schema: - default: i-CI8t2pJD15euZJErEDrg - example: i-CI8t2pJD15euZJErEDrg + default: Mbs-2NiTvy32oHDerWtVhg + example: Mbs-2NiTvy32oHDerWtVhg type: string - content: application/json: @@ -7602,8 +8405,8 @@ paths: name: pathQueryId required: true schema: - default: AIdc203rPpK_k_2KWSdm7g - example: AIdc203rPpK_k_2KWSdm7g + default: VhUd6vHVmLBcw0uX-6jMLA + example: VhUd6vHVmLBcw0uX-6jMLA type: string - content: application/json: @@ -7841,8 +8644,8 @@ paths: name: pathQueryId required: true schema: - default: _8aYOgEDz35BrBcBal1-_w - example: _8aYOgEDz35BrBcBal1-_w + default: xd_EMdYvB9hfZsZ6Idri0w + example: xd_EMdYvB9hfZsZ6Idri0w type: string - content: application/json: @@ -8706,8 +9509,8 @@ paths: name: pathQueryId required: true schema: - default: y0aDPjeWFCpvY3GOmGXKhQ - example: y0aDPjeWFCpvY3GOmGXKhQ + default: 70Yf8aSyhGOXaKRLJdVA2A + example: 70Yf8aSyhGOXaKRLJdVA2A type: string - content: application/json: @@ -8798,10 +9601,6 @@ paths: default: false example: false type: boolean - responsive_web_graphql_exclude_directive_enabled: - default: true - example: true - type: boolean responsive_web_graphql_skip_user_profile_image_extensions_enabled: default: false example: false @@ -8874,7 +9673,6 @@ paths: - rweb_video_screen_enabled - profile_label_improvements_pcf_label_in_post_enabled - 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 @@ -8964,8 +9762,8 @@ paths: name: pathQueryId required: true schema: - default: vFPc2LVIu7so2uA_gHQAdg - example: vFPc2LVIu7so2uA_gHQAdg + default: 1H9ibIdchWO0_vz3wJLDTA + example: 1H9ibIdchWO0_vz3wJLDTA type: string - content: application/json: @@ -9227,8 +10025,8 @@ paths: name: pathQueryId required: true schema: - default: HeWHY26ItCfUmm1e6ITjeA - example: HeWHY26ItCfUmm1e6ITjeA + default: q6xj5bs0hapm9309hexA_g + example: q6xj5bs0hapm9309hexA_g type: string - content: application/json: @@ -9485,8 +10283,8 @@ paths: name: pathQueryId required: true schema: - default: OAx9yEcW3JA9bPo63pcYlA - example: OAx9yEcW3JA9bPo63pcYlA + default: 6hvhmQQ9zPIR8RZWHFAm4w + example: 6hvhmQQ9zPIR8RZWHFAm4w type: string - content: application/json: diff --git a/src/openapi/paths/timeline.yaml b/src/openapi/paths/timeline.yaml index e80487f..a83c134 100644 --- a/src/openapi/paths/timeline.yaml +++ b/src/openapi/paths/timeline.yaml @@ -60,6 +60,48 @@ paths: tags: - "tweet" + /graphql/{pathQueryId}/CommunityTweetsTimeline: + get: + operationId: getCommunityTweetsTimeline + description: get tweet list of community. rankingMode:[Recency, Relevance] + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/CommunityTweetsTimelineResponse" + tags: + - "tweet" + + /graphql/{pathQueryId}/CommunityMediaTimeline: + get: + operationId: getCommunityMediaTimeline + description: get media list of community + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/CommunityMediaTimelineResponse" + tags: + - "tweet" + + /graphql/{pathQueryId}/CommunityAboutTimeline: + get: + operationId: getCommunityAboutTimeline + description: get about of community + responses: + "200": + description: Successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/CommunityAboutTimelineResponse" + tags: + - "tweet" + components: schemas: TimelineResponse: @@ -74,6 +116,8 @@ components: $ref: "./../response/error.yaml#/components/schemas/ErrorResponse" HomeTimelineResponseData: + required: + - "home" properties: home: $ref: "#/components/schemas/HomeTimelineHome" @@ -97,6 +141,8 @@ components: $ref: "./../response/error.yaml#/components/schemas/ErrorResponse" ListTweetsTimelineData: + required: + - "list" properties: list: $ref: "#/components/schemas/ListTweetsTimelineList" @@ -106,12 +152,7 @@ components: - "tweets_timeline" properties: tweets_timeline: - $ref: "#/components/schemas/ListTweetsTimeline" - - ListTweetsTimeline: - properties: - timeline: - $ref: "./../schemas/timeline.yaml#/components/schemas/Timeline" + $ref: "#/components/schemas/TimelineResult" SearchTimelineResponse: required: @@ -125,6 +166,8 @@ components: $ref: "./../response/error.yaml#/components/schemas/ErrorResponse" SearchTimelineData: + required: + - "search_by_raw_query" properties: search_by_raw_query: $ref: "#/components/schemas/SearchByRawQuery" @@ -142,3 +185,109 @@ components: properties: timeline: $ref: "./../schemas/timeline.yaml#/components/schemas/Timeline" + + CommunityTweetsTimelineResponse: + required: + - "data" + properties: + data: + $ref: "#/components/schemas/RankedCommunityTweetData" + errors: + type: array + items: + $ref: "./../response/error.yaml#/components/schemas/ErrorResponse" + + RankedCommunityTweetData: + required: + - "communityResults" + properties: + communityResults: + $ref: "#/components/schemas/RankedCommunityResults" + + RankedCommunityResults: + required: + - "result" + properties: + result: + $ref: "#/components/schemas/RankedCommunityResult" + + RankedCommunityResult: + required: + - "__typename" + - "ranked_community_timeline" + properties: + __typename: + $ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # Community + ranked_community_timeline: + $ref: "./../schemas/timeline.yaml#/components/schemas/TimelineResult" + + CommunityMediaTimelineResponse: + required: + - "data" + properties: + data: + $ref: "#/components/schemas/MediaCommunityTweetData" + errors: + type: array + items: + $ref: "./../response/error.yaml#/components/schemas/ErrorResponse" + + MediaCommunityTweetData: + required: + - "__typename" + - "communityResults" + properties: + communityResults: + $ref: "#/components/schemas/MediaCommunityResults" + + MediaCommunityResults: + required: + - "result" + properties: + result: + $ref: "#/components/schemas/MediaCommunityResult" + + MediaCommunityResult: + required: + - "__typename" + - "community_media_timeline" + properties: + __typename: + $ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # Community + community_media_timeline: + $ref: "./../schemas/timeline.yaml#/components/schemas/TimelineResult" + + CommunityAboutTimelineResponse: + required: + - "data" + properties: + data: + $ref: "#/components/schemas/AboutCommunityTweetData" + errors: + type: array + items: + $ref: "./../response/error.yaml#/components/schemas/ErrorResponse" + + AboutCommunityTweetData: + required: + - "communityResults" + properties: + communityResults: + $ref: "#/components/schemas/AboutCommunityResults" + + AboutCommunityResults: + required: + - "result" + properties: + result: + $ref: "#/components/schemas/AboutCommunityResult" + + AboutCommunityResult: + required: + - "__typename" + - "about_timeline" + properties: + __typename: + $ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # Community + about_timeline: + $ref: "./../schemas/timeline.yaml#/components/schemas/TimelineResult" diff --git a/src/openapi/schemas/content.yaml b/src/openapi/schemas/content.yaml index b3ed92b..7440e06 100644 --- a/src/openapi/schemas/content.yaml +++ b/src/openapi/schemas/content.yaml @@ -51,7 +51,7 @@ components: - "entryType" - "displayType" # - "items" - - "clientEventInfo" + # - "clientEventInfo" properties: __typename: type: string @@ -126,7 +126,7 @@ components: properties: entryId: type: string - pattern: "^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+" + pattern: "^(([a-zA-Z]+|[0-9]+|[0-9a-f]+)(-|$))+" item: $ref: "#/components/schemas/ModuleEntry" dispensable: @@ -233,7 +233,7 @@ components: $ref: "#/components/schemas/SocialContextUnion" userDisplayType: type: string - enum: [User, UserDetailed, SubscribableUser] + enum: [User, UserDetailed, SubscribableUser, UserConcise] user_results: $ref: "./user.yaml#/components/schemas/UserResults" @@ -395,7 +395,7 @@ components: element: type: string # august-2023-privacy-prompt-candidate - # pattern: "(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+" + # pattern: "^(([a-zA-Z]+|[0-9]+|[0-9a-f]+)(-|$))+" # pattern: "^(january|february|march|april|may|june|july|august|september|october|november|december)-[0-9]{4}-([a-z]-)+[a-z]+$" details: type: object diff --git a/src/openapi/schemas/instruction.yaml b/src/openapi/schemas/instruction.yaml index 4bf0ff7..95586d8 100644 --- a/src/openapi/schemas/instruction.yaml +++ b/src/openapi/schemas/instruction.yaml @@ -162,7 +162,7 @@ components: $ref: "./content.yaml#/components/schemas/ContentUnion" entryId: type: string - pattern: "^(([a-z]+|[0-9]+|[0-9a-f]+)(-|$))+" + pattern: "^(([a-zA-Z]+|[0-9]+|[0-9a-f]+)(-|$))+" sortIndex: type: string pattern: "[0-9]+$" diff --git a/test/python/test_serialize.py b/test/python/test_serialize.py index 07fb9fc..78e1db3 100644 --- a/test/python/test_serialize.py +++ b/test/python/test_serialize.py @@ -12,11 +12,16 @@ from enum import Enum from pathlib import Path from typing import Any +import bs4 import openapi_client as pt import requests import urllib3 from x_client_transaction import ClientTransaction -from x_client_transaction.utils import handle_x_migration +from x_client_transaction.utils import ( + generate_headers, + get_ondemand_file_url, + handle_x_migration, +) warnings.filterwarnings("ignore") logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(levelname)s %(message)s") @@ -60,7 +65,20 @@ def find_name(x): return [x["name"]] -def get_transaction_id(key): +def get_transaction_base(): + session = requests.Session() + session.headers = generate_headers() + home_page_response = handle_x_migration(session=session) + home_page = session.get(url="https://x.com") + home_page_response = bs4.BeautifulSoup(home_page.content, "html.parser") + ondemand_file_url = get_ondemand_file_url(response=home_page_response) + ondemand_file = session.get(url=ondemand_file_url) + ondemand_file_response = bs4.BeautifulSoup(ondemand_file.content, "html.parser") + ct = ClientTransaction(home_page_response, ondemand_file_response) + return ct + + +def get_transaction_id(key, ct=get_transaction_base()): return ct.generate_transaction_id( method=placeholder[key]["@method"], path=placeholder[key]["@path"] ) @@ -282,8 +300,6 @@ if __name__ == "__main__": session = requests.Session() session.headers = get_header(latest_user_agent, "chrome") - ct = ClientTransaction(handle_x_migration(session)) - error_count = 0 for x in [pt.DefaultApi, pt.TweetApi, pt.UserApi, pt.UsersApi, pt.UserListApi]: