1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-09 14:50:25 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2025-05-07 01:18:01 +09:00
parent c7d323f781
commit 99c7c0f4b9
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
6 changed files with 1455 additions and 110 deletions

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -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"

View file

@ -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

View file

@ -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]+$"

View file

@ -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]: