diff --git a/dist/compatible/openapi-3.0.yaml b/dist/compatible/openapi-3.0.yaml index afac807..1828bf8 100644 --- a/dist/compatible/openapi-3.0.yaml +++ b/dist/compatible/openapi-3.0.yaml @@ -29,6 +29,12 @@ components: type: string required: - url + AllowDownloadStatus: + properties: + allow_download: + type: boolean + required: + - allow_download Article: properties: article_results: @@ -98,12 +104,28 @@ components: - original_img_width - original_img_url - color_info + ArticleLifecycleState: + properties: + modified_at_secs: + type: integer + required: + - modified_at_secs + ArticleMetadata: + properties: + first_published_at_secs: + type: integer + required: + - first_published_at_secs ArticleResult: properties: cover_media: $ref: '#/components/schemas/ArticleCoverMedia' id: type: string + lifecycle_state: + $ref: '#/components/schemas/ArticleLifecycleState' + metadata: + $ref: '#/components/schemas/ArticleMetadata' preview_text: type: string rest_id: @@ -117,6 +139,7 @@ components: - title - preview_text - cover_media + - metadata ArticleResults: properties: result: @@ -522,6 +545,18 @@ components: - ctaBehavior - callbacks - clientEventInfo + CreateBookmarkResponse: + properties: + data: + $ref: '#/components/schemas/CreateBookmarkResponseData' + required: + - data + CreateBookmarkResponseData: + properties: + tweet_bookmark_put: + type: string + required: + - tweet_bookmark_put CreateRetweet: properties: result: @@ -586,6 +621,18 @@ components: - ShowMoreThreads - Gap type: string + DeleteBookmarkResponse: + properties: + data: + $ref: '#/components/schemas/DeleteBookmarkResponseData' + required: + - data + DeleteBookmarkResponseData: + properties: + tweet_bookmark_delete: + type: string + required: + - tweet_bookmark_delete DeleteRetweet: properties: result: @@ -955,8 +1002,9 @@ components: Media: properties: additional_media_info: - additionalProperties: true - type: object + $ref: '#/components/schemas/AdditionalMediaInfo' + allow_download_status: + $ref: '#/components/schemas/AllowDownloadStatus' display_url: format: uri type: string @@ -978,6 +1026,8 @@ components: type: array media_key: type: string + media_results: + $ref: '#/components/schemas/MediaResults' media_url_https: format: uri type: string @@ -1003,8 +1053,7 @@ components: format: uri type: string video_info: - additionalProperties: true - type: object + $ref: '#/components/schemas/MediaVideoInfo' required: - display_url - expanded_url @@ -1021,6 +1070,8 @@ components: properties: additional_media_info: $ref: '#/components/schemas/AdditionalMediaInfo' + allow_download_status: + $ref: '#/components/schemas/AllowDownloadStatus' display_url: format: uri type: string @@ -1044,6 +1095,8 @@ components: $ref: '#/components/schemas/MediaStats' media_key: type: string + media_results: + $ref: '#/components/schemas/MediaResults' media_url_https: format: uri type: string @@ -1110,6 +1163,18 @@ components: - w - h type: object + MediaResult: + properties: + media_key: + type: string + required: + - media_key + MediaResults: + properties: + result: + $ref: '#/components/schemas/MediaResult' + required: + - result MediaSize: properties: h: @@ -1173,6 +1238,24 @@ components: required: - content_type - url + MediaVisibilityResults: + properties: + blurred_image_interstitial: + $ref: '#/components/schemas/MediaVisibilityResultsBlurredImageInterstitial' + required: + - blurred_image_interstitial + MediaVisibilityResultsBlurredImageInterstitial: + properties: + opacity: + type: number + text: + $ref: '#/components/schemas/TweetInterstitialText' + title: + $ref: '#/components/schemas/TweetInterstitialText' + required: + - opacity + - text + - title ModuleEntry: properties: clientEventInfo: @@ -2416,6 +2499,8 @@ components: limitedActionResults: additionalProperties: true type: object + mediaVisibilityResults: + $ref: '#/components/schemas/MediaVisibilityResults' tweet: $ref: '#/components/schemas/Tweet' tweetInterstitial: @@ -2546,6 +2631,8 @@ components: type: boolean legacy: $ref: '#/components/schemas/UserLegacy' + legacy_extended_profile: + $ref: '#/components/schemas/UserLegacyExtendedProfile' professional: $ref: '#/components/schemas/UserProfessional' profile_image_shape: @@ -2566,6 +2653,8 @@ components: super_following: default: false type: boolean + tipjar_settings: + $ref: '#/components/schemas/UserTipJarSettings' user_seed_tweet_count: type: integer verification_info: @@ -2779,6 +2868,40 @@ components: - translator_type - verified - want_retweets + UserLegacyExtendedProfile: + properties: + birthdate: + $ref: '#/components/schemas/UserLegacyExtendedProfileBirthdate' + UserLegacyExtendedProfileBirthdate: + properties: + day: + type: integer + month: + type: integer + visibility: + enum: + - Self + - Public + - MutualFollow + - Followers + - Following + type: string + year: + type: integer + year_visibility: + enum: + - Self + - Public + - MutualFollow + - Followers + - Following + type: string + required: + - day + - month + - year + - visibility + - year_visibility UserMention: additionalProperties: true type: object @@ -2881,6 +3004,22 @@ components: properties: result: $ref: '#/components/schemas/UserUnion' + UserTipJarSettings: + properties: + bitcoin_handle: + type: string + cash_app_handle: + type: string + ethereum_handle: + type: string + gofundme_handle: + type: string + is_enabled: + type: boolean + patreon_handle: + type: string + venmo_handle: + type: string UserTweetsData: properties: user: @@ -3969,6 +4108,77 @@ paths: type: string tags: - tweet + /graphql/{pathQueryId}/CreateBookmark: + post: + description: create Bookmark + operationId: postCreateBookmark + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: aoDbu3RHznuiSkQ9aNM67Q + example: aoDbu3RHznuiSkQ9aNM67Q + type: string + requestBody: + content: + application/json: + schema: + properties: + queryId: + default: aoDbu3RHznuiSkQ9aNM67Q + example: aoDbu3RHznuiSkQ9aNM67Q + type: string + variables: + properties: + tweet_id: + default: '1349129669258448897' + example: '1349129669258448897' + type: string + required: + - tweet_id + type: object + required: + - queryId + - variables + description: body + required: true + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/CreateBookmarkResponse' + - $ref: '#/components/schemas/Errors' + 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: + - post /graphql/{pathQueryId}/CreateRetweet: post: description: create Retweet @@ -4272,6 +4482,77 @@ paths: type: string tags: - post + /graphql/{pathQueryId}/DeleteBookmark: + post: + description: delete Bookmark + operationId: postDeleteBookmark + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: Wlmlj2-xzyS1GN3a6cj-mQ + example: Wlmlj2-xzyS1GN3a6cj-mQ + type: string + requestBody: + content: + application/json: + schema: + properties: + queryId: + default: Wlmlj2-xzyS1GN3a6cj-mQ + example: Wlmlj2-xzyS1GN3a6cj-mQ + type: string + variables: + properties: + tweet_id: + default: '1349129669258448897' + example: '1349129669258448897' + type: string + required: + - tweet_id + type: object + required: + - queryId + - variables + description: body + required: true + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/DeleteBookmarkResponse' + - $ref: '#/components/schemas/Errors' + 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: + - post /graphql/{pathQueryId}/DeleteRetweet: post: description: delete Retweet @@ -5127,17 +5408,15 @@ paths: name: pathQueryId required: true schema: - default: eL8vHLgEw2ZL9X9dKdakLQ - example: eL8vHLgEw2ZL9X9dKdakLQ + default: GX5ovLTwyoN1Td13GHvhIg + example: GX5ovLTwyoN1Td13GHvhIg type: string - in: query name: variables required: true schema: - default: '{"count": 20, "includePromotedContent": true, "latestControlAvailable": - true}' - example: '{"count": 20, "includePromotedContent": true, "latestControlAvailable": - true}' + default: '{"listId": "1539453138322673664", "count": 20}' + example: '{"listId": "1539453138322673664", "count": 20}' type: string - in: query name: features diff --git a/dist/compatible_discriminator/openapi-3.0.yaml b/dist/compatible_discriminator/openapi-3.0.yaml index 7e4839e..40099f6 100644 --- a/dist/compatible_discriminator/openapi-3.0.yaml +++ b/dist/compatible_discriminator/openapi-3.0.yaml @@ -29,6 +29,12 @@ components: type: string required: - url + AllowDownloadStatus: + properties: + allow_download: + type: boolean + required: + - allow_download Article: properties: article_results: @@ -98,12 +104,28 @@ components: - original_img_width - original_img_url - color_info + ArticleLifecycleState: + properties: + modified_at_secs: + type: integer + required: + - modified_at_secs + ArticleMetadata: + properties: + first_published_at_secs: + type: integer + required: + - first_published_at_secs ArticleResult: properties: cover_media: $ref: '#/components/schemas/ArticleCoverMedia' id: type: string + lifecycle_state: + $ref: '#/components/schemas/ArticleLifecycleState' + metadata: + $ref: '#/components/schemas/ArticleMetadata' preview_text: type: string rest_id: @@ -117,6 +139,7 @@ components: - title - preview_text - cover_media + - metadata ArticleResults: properties: result: @@ -522,6 +545,18 @@ components: - ctaBehavior - callbacks - clientEventInfo + CreateBookmarkResponse: + properties: + data: + $ref: '#/components/schemas/CreateBookmarkResponseData' + required: + - data + CreateBookmarkResponseData: + properties: + tweet_bookmark_put: + type: string + required: + - tweet_bookmark_put CreateRetweet: properties: result: @@ -586,6 +621,18 @@ components: - ShowMoreThreads - Gap type: string + DeleteBookmarkResponse: + properties: + data: + $ref: '#/components/schemas/DeleteBookmarkResponseData' + required: + - data + DeleteBookmarkResponseData: + properties: + tweet_bookmark_delete: + type: string + required: + - tweet_bookmark_delete DeleteRetweet: properties: result: @@ -955,8 +1002,9 @@ components: Media: properties: additional_media_info: - additionalProperties: true - type: object + $ref: '#/components/schemas/AdditionalMediaInfo' + allow_download_status: + $ref: '#/components/schemas/AllowDownloadStatus' display_url: format: uri type: string @@ -978,6 +1026,8 @@ components: type: array media_key: type: string + media_results: + $ref: '#/components/schemas/MediaResults' media_url_https: format: uri type: string @@ -1003,8 +1053,7 @@ components: format: uri type: string video_info: - additionalProperties: true - type: object + $ref: '#/components/schemas/MediaVideoInfo' required: - display_url - expanded_url @@ -1021,6 +1070,8 @@ components: properties: additional_media_info: $ref: '#/components/schemas/AdditionalMediaInfo' + allow_download_status: + $ref: '#/components/schemas/AllowDownloadStatus' display_url: format: uri type: string @@ -1044,6 +1095,8 @@ components: $ref: '#/components/schemas/MediaStats' media_key: type: string + media_results: + $ref: '#/components/schemas/MediaResults' media_url_https: format: uri type: string @@ -1110,6 +1163,18 @@ components: - w - h type: object + MediaResult: + properties: + media_key: + type: string + required: + - media_key + MediaResults: + properties: + result: + $ref: '#/components/schemas/MediaResult' + required: + - result MediaSize: properties: h: @@ -1173,6 +1238,24 @@ components: required: - content_type - url + MediaVisibilityResults: + properties: + blurred_image_interstitial: + $ref: '#/components/schemas/MediaVisibilityResultsBlurredImageInterstitial' + required: + - blurred_image_interstitial + MediaVisibilityResultsBlurredImageInterstitial: + properties: + opacity: + type: number + text: + $ref: '#/components/schemas/TweetInterstitialText' + title: + $ref: '#/components/schemas/TweetInterstitialText' + required: + - opacity + - text + - title ModuleEntry: properties: clientEventInfo: @@ -2416,6 +2499,8 @@ components: limitedActionResults: additionalProperties: true type: object + mediaVisibilityResults: + $ref: '#/components/schemas/MediaVisibilityResults' tweet: $ref: '#/components/schemas/Tweet' tweetInterstitial: @@ -2546,6 +2631,8 @@ components: type: boolean legacy: $ref: '#/components/schemas/UserLegacy' + legacy_extended_profile: + $ref: '#/components/schemas/UserLegacyExtendedProfile' professional: $ref: '#/components/schemas/UserProfessional' profile_image_shape: @@ -2566,6 +2653,8 @@ components: super_following: default: false type: boolean + tipjar_settings: + $ref: '#/components/schemas/UserTipJarSettings' user_seed_tweet_count: type: integer verification_info: @@ -2779,6 +2868,40 @@ components: - translator_type - verified - want_retweets + UserLegacyExtendedProfile: + properties: + birthdate: + $ref: '#/components/schemas/UserLegacyExtendedProfileBirthdate' + UserLegacyExtendedProfileBirthdate: + properties: + day: + type: integer + month: + type: integer + visibility: + enum: + - Self + - Public + - MutualFollow + - Followers + - Following + type: string + year: + type: integer + year_visibility: + enum: + - Self + - Public + - MutualFollow + - Followers + - Following + type: string + required: + - day + - month + - year + - visibility + - year_visibility UserMention: additionalProperties: true type: object @@ -2881,6 +3004,22 @@ components: properties: result: $ref: '#/components/schemas/UserUnion' + UserTipJarSettings: + properties: + bitcoin_handle: + type: string + cash_app_handle: + type: string + ethereum_handle: + type: string + gofundme_handle: + type: string + is_enabled: + type: boolean + patreon_handle: + type: string + venmo_handle: + type: string UserTweetsData: properties: user: @@ -3967,6 +4106,75 @@ paths: type: string tags: - tweet + /graphql/{pathQueryId}/CreateBookmark: + post: + description: create Bookmark + operationId: postCreateBookmark + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: aoDbu3RHznuiSkQ9aNM67Q + example: aoDbu3RHznuiSkQ9aNM67Q + type: string + requestBody: + content: + application/json: + schema: + properties: + queryId: + default: aoDbu3RHznuiSkQ9aNM67Q + example: aoDbu3RHznuiSkQ9aNM67Q + type: string + variables: + properties: + tweet_id: + default: '1349129669258448897' + example: '1349129669258448897' + type: string + required: + - tweet_id + type: object + required: + - queryId + - variables + description: body + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBookmarkResponse' + 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: + - post /graphql/{pathQueryId}/CreateRetweet: post: description: create Retweet @@ -4266,6 +4474,75 @@ paths: type: string tags: - post + /graphql/{pathQueryId}/DeleteBookmark: + post: + description: delete Bookmark + operationId: postDeleteBookmark + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: Wlmlj2-xzyS1GN3a6cj-mQ + example: Wlmlj2-xzyS1GN3a6cj-mQ + type: string + requestBody: + content: + application/json: + schema: + properties: + queryId: + default: Wlmlj2-xzyS1GN3a6cj-mQ + example: Wlmlj2-xzyS1GN3a6cj-mQ + type: string + variables: + properties: + tweet_id: + default: '1349129669258448897' + example: '1349129669258448897' + type: string + required: + - tweet_id + type: object + required: + - queryId + - variables + description: body + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteBookmarkResponse' + 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: + - post /graphql/{pathQueryId}/DeleteRetweet: post: description: delete Retweet @@ -5101,17 +5378,15 @@ paths: name: pathQueryId required: true schema: - default: eL8vHLgEw2ZL9X9dKdakLQ - example: eL8vHLgEw2ZL9X9dKdakLQ + default: GX5ovLTwyoN1Td13GHvhIg + example: GX5ovLTwyoN1Td13GHvhIg type: string - in: query name: variables required: true schema: - default: '{"count": 20, "includePromotedContent": true, "latestControlAvailable": - true}' - example: '{"count": 20, "includePromotedContent": true, "latestControlAvailable": - true}' + default: '{"listId": "1539453138322673664", "count": 20}' + example: '{"listId": "1539453138322673664", "count": 20}' type: string - in: query name: features diff --git a/dist/docs/openapi-3.0.yaml b/dist/docs/openapi-3.0.yaml index 5b93cae..66bcf01 100644 --- a/dist/docs/openapi-3.0.yaml +++ b/dist/docs/openapi-3.0.yaml @@ -29,6 +29,12 @@ components: type: string required: - url + AllowDownloadStatus: + properties: + allow_download: + type: boolean + required: + - allow_download Article: properties: article_results: @@ -98,12 +104,28 @@ components: - original_img_width - original_img_url - color_info + ArticleLifecycleState: + properties: + modified_at_secs: + type: integer + required: + - modified_at_secs + ArticleMetadata: + properties: + first_published_at_secs: + type: integer + required: + - first_published_at_secs ArticleResult: properties: cover_media: $ref: '#/components/schemas/ArticleCoverMedia' id: type: string + lifecycle_state: + $ref: '#/components/schemas/ArticleLifecycleState' + metadata: + $ref: '#/components/schemas/ArticleMetadata' preview_text: type: string rest_id: @@ -117,6 +139,7 @@ components: - title - preview_text - cover_media + - metadata ArticleResults: properties: result: @@ -522,6 +545,18 @@ components: - ctaBehavior - callbacks - clientEventInfo + CreateBookmarkResponse: + properties: + data: + $ref: '#/components/schemas/CreateBookmarkResponseData' + required: + - data + CreateBookmarkResponseData: + properties: + tweet_bookmark_put: + type: string + required: + - tweet_bookmark_put CreateRetweet: properties: result: @@ -586,6 +621,18 @@ components: - ShowMoreThreads - Gap type: string + DeleteBookmarkResponse: + properties: + data: + $ref: '#/components/schemas/DeleteBookmarkResponseData' + required: + - data + DeleteBookmarkResponseData: + properties: + tweet_bookmark_delete: + type: string + required: + - tweet_bookmark_delete DeleteRetweet: properties: result: @@ -955,8 +1002,9 @@ components: Media: properties: additional_media_info: - additionalProperties: true - type: object + $ref: '#/components/schemas/AdditionalMediaInfo' + allow_download_status: + $ref: '#/components/schemas/AllowDownloadStatus' display_url: format: uri type: string @@ -978,6 +1026,8 @@ components: type: array media_key: type: string + media_results: + $ref: '#/components/schemas/MediaResults' media_url_https: format: uri type: string @@ -1003,8 +1053,7 @@ components: format: uri type: string video_info: - additionalProperties: true - type: object + $ref: '#/components/schemas/MediaVideoInfo' required: - display_url - expanded_url @@ -1021,6 +1070,8 @@ components: properties: additional_media_info: $ref: '#/components/schemas/AdditionalMediaInfo' + allow_download_status: + $ref: '#/components/schemas/AllowDownloadStatus' display_url: format: uri type: string @@ -1044,6 +1095,8 @@ components: $ref: '#/components/schemas/MediaStats' media_key: type: string + media_results: + $ref: '#/components/schemas/MediaResults' media_url_https: format: uri type: string @@ -1110,6 +1163,18 @@ components: - w - h type: object + MediaResult: + properties: + media_key: + type: string + required: + - media_key + MediaResults: + properties: + result: + $ref: '#/components/schemas/MediaResult' + required: + - result MediaSize: properties: h: @@ -1173,6 +1238,24 @@ components: required: - content_type - url + MediaVisibilityResults: + properties: + blurred_image_interstitial: + $ref: '#/components/schemas/MediaVisibilityResultsBlurredImageInterstitial' + required: + - blurred_image_interstitial + MediaVisibilityResultsBlurredImageInterstitial: + properties: + opacity: + type: number + text: + $ref: '#/components/schemas/TweetInterstitialText' + title: + $ref: '#/components/schemas/TweetInterstitialText' + required: + - opacity + - text + - title ModuleEntry: properties: clientEventInfo: @@ -2416,6 +2499,8 @@ components: limitedActionResults: additionalProperties: true type: object + mediaVisibilityResults: + $ref: '#/components/schemas/MediaVisibilityResults' tweet: $ref: '#/components/schemas/Tweet' tweetInterstitial: @@ -2546,6 +2631,8 @@ components: type: boolean legacy: $ref: '#/components/schemas/UserLegacy' + legacy_extended_profile: + $ref: '#/components/schemas/UserLegacyExtendedProfile' professional: $ref: '#/components/schemas/UserProfessional' profile_image_shape: @@ -2566,6 +2653,8 @@ components: super_following: default: false type: boolean + tipjar_settings: + $ref: '#/components/schemas/UserTipJarSettings' user_seed_tweet_count: type: integer verification_info: @@ -2779,6 +2868,40 @@ components: - translator_type - verified - want_retweets + UserLegacyExtendedProfile: + properties: + birthdate: + $ref: '#/components/schemas/UserLegacyExtendedProfileBirthdate' + UserLegacyExtendedProfileBirthdate: + properties: + day: + type: integer + month: + type: integer + visibility: + enum: + - Self + - Public + - MutualFollow + - Followers + - Following + type: string + year: + type: integer + year_visibility: + enum: + - Self + - Public + - MutualFollow + - Followers + - Following + type: string + required: + - day + - month + - year + - visibility + - year_visibility UserMention: additionalProperties: true type: object @@ -2881,6 +3004,22 @@ components: properties: result: $ref: '#/components/schemas/UserUnion' + UserTipJarSettings: + properties: + bitcoin_handle: + type: string + cash_app_handle: + type: string + ethereum_handle: + type: string + gofundme_handle: + type: string + is_enabled: + type: boolean + patreon_handle: + type: string + venmo_handle: + type: string UserTweetsData: properties: user: @@ -4071,6 +4210,77 @@ paths: type: string tags: - tweet + /graphql/{pathQueryId}/CreateBookmark: + post: + description: create Bookmark + operationId: postCreateBookmark + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: aoDbu3RHznuiSkQ9aNM67Q + example: aoDbu3RHznuiSkQ9aNM67Q + type: string + requestBody: + content: + application/json: + schema: + properties: + queryId: + default: aoDbu3RHznuiSkQ9aNM67Q + example: aoDbu3RHznuiSkQ9aNM67Q + type: string + variables: + properties: + tweet_id: + default: '1349129669258448897' + example: '1349129669258448897' + type: string + required: + - tweet_id + type: object + required: + - queryId + - variables + description: body + required: true + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/CreateBookmarkResponse' + - $ref: '#/components/schemas/Errors' + 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: + - post /graphql/{pathQueryId}/CreateRetweet: post: description: create Retweet @@ -4374,6 +4584,77 @@ paths: type: string tags: - post + /graphql/{pathQueryId}/DeleteBookmark: + post: + description: delete Bookmark + operationId: postDeleteBookmark + parameters: + - in: path + name: pathQueryId + required: true + schema: + default: Wlmlj2-xzyS1GN3a6cj-mQ + example: Wlmlj2-xzyS1GN3a6cj-mQ + type: string + requestBody: + content: + application/json: + schema: + properties: + queryId: + default: Wlmlj2-xzyS1GN3a6cj-mQ + example: Wlmlj2-xzyS1GN3a6cj-mQ + type: string + variables: + properties: + tweet_id: + default: '1349129669258448897' + example: '1349129669258448897' + type: string + required: + - tweet_id + type: object + required: + - queryId + - variables + description: body + required: true + responses: + '200': + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/DeleteBookmarkResponse' + - $ref: '#/components/schemas/Errors' + 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: + - post /graphql/{pathQueryId}/DeleteRetweet: post: description: delete Retweet @@ -6002,8 +6283,8 @@ paths: name: pathQueryId required: true schema: - default: eL8vHLgEw2ZL9X9dKdakLQ - example: eL8vHLgEw2ZL9X9dKdakLQ + default: GX5ovLTwyoN1Td13GHvhIg + example: GX5ovLTwyoN1Td13GHvhIg type: string - content: application/json: @@ -6013,18 +6294,13 @@ paths: default: 20 example: 20 type: integer - includePromotedContent: - default: true - example: true - type: boolean - latestControlAvailable: - default: true - example: true - type: boolean + listId: + default: '1539453138322673664' + example: '1539453138322673664' + type: string required: + - listId - count - - includePromotedContent - - latestControlAvailable type: object in: query name: variables diff --git a/src/config/placeholder.json b/src/config/placeholder.json index 441d9e5..7816714 100644 --- a/src/config/placeholder.json +++ b/src/config/placeholder.json @@ -756,6 +756,18 @@ "dark_request": false } }, + "CreateBookmark": { + "queryId": "aoDbu3RHznuiSkQ9aNM67Q", + "variables": { + "tweet_id": "1349129669258448897" + } + }, + "DeleteBookmark": { + "queryId": "Wlmlj2-xzyS1GN3a6cj-mQ", + "variables": { + "tweet_id": "1349129669258448897" + } + }, "#=====v1.1====": { "url": "https://twitter.com/i/api/1.1/" }, diff --git a/src/openapi/paths/post.yaml b/src/openapi/paths/post.yaml index 86680fd..cb9f623 100644 --- a/src/openapi/paths/post.yaml +++ b/src/openapi/paths/post.yaml @@ -100,6 +100,38 @@ paths: tags: - "post" + /graphql/{pathQueryId}/CreateBookmark: + post: + operationId: postCreateBookmark + description: create Bookmark + responses: + "200": + description: Successful operation + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/CreateBookmarkResponse" + - $ref: "./../schemas/error.yaml#/components/schemas/Errors" + tags: + - "post" + + /graphql/{pathQueryId}/DeleteBookmark: + post: + operationId: postDeleteBookmark + description: delete Bookmark + responses: + "200": + description: Successful operation + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/DeleteBookmarkResponse" + - $ref: "./../schemas/error.yaml#/components/schemas/Errors" + tags: + - "post" + components: schemas: FavoriteTweetResponseData: @@ -256,3 +288,31 @@ components: properties: tweet_results: type: object + + CreateBookmarkResponse: + required: + - "data" + properties: + data: + $ref: "#/components/schemas/CreateBookmarkResponseData" + + CreateBookmarkResponseData: + required: + - "tweet_bookmark_put" + properties: + tweet_bookmark_put: + type: string + + DeleteBookmarkResponse: + required: + - "data" + properties: + data: + $ref: "#/components/schemas/DeleteBookmarkResponseData" + + DeleteBookmarkResponseData: + required: + - "tweet_bookmark_delete" + properties: + tweet_bookmark_delete: + type: string diff --git a/src/openapi/schemas/tweet.yaml b/src/openapi/schemas/tweet.yaml index 280cc1b..36aff59 100644 --- a/src/openapi/schemas/tweet.yaml +++ b/src/openapi/schemas/tweet.yaml @@ -33,6 +33,8 @@ components: additionalProperties: true # todo tweetInterstitial: $ref: "#/components/schemas/TweetInterstitial" + mediaVisibilityResults: + $ref: "#/components/schemas/MediaVisibilityResults" TweetInterstitial: required: @@ -95,6 +97,26 @@ components: type: string enum: [ExternalUrl] + MediaVisibilityResults: + required: + - "blurred_image_interstitial" + properties: + blurred_image_interstitial: + $ref: "#/components/schemas/MediaVisibilityResultsBlurredImageInterstitial" + + MediaVisibilityResultsBlurredImageInterstitial: + required: + - "opacity" + - "text" + - "title" + properties: + opacity: + type: number + text: + $ref: "#/components/schemas/TweetInterstitialText" + title: + $ref: "#/components/schemas/TweetInterstitialText" + TweetInterstitialRevealText: required: - "rtl" @@ -1033,11 +1055,9 @@ components: ext_media_availability: $ref: "#/components/schemas/ExtMediaAvailability" video_info: - type: object - additionalProperties: true # todo + $ref: "#/components/schemas/MediaVideoInfo" additional_media_info: - type: object - additionalProperties: true # todo + $ref: "#/components/schemas/AdditionalMediaInfo" source_user_id_str: type: string pattern: "^[0-9]+$" @@ -1048,6 +1068,10 @@ components: type: string sensitive_media_warning: $ref: "#/components/schemas/SensitiveMediaWarning" + allow_download_status: + $ref: "#/components/schemas/AllowDownloadStatus" + media_results: + $ref: "#/components/schemas/MediaResults" TweetLegacyScopes: required: @@ -1144,6 +1168,10 @@ components: type: string sensitive_media_warning: $ref: "#/components/schemas/SensitiveMediaWarning" + allow_download_status: + $ref: "#/components/schemas/AllowDownloadStatus" + media_results: + $ref: "#/components/schemas/MediaResults" MediaOriginalInfo: required: @@ -1336,6 +1364,7 @@ components: - "title" - "preview_text" - "cover_media" + - "metadata" properties: rest_id: type: string @@ -1348,6 +1377,10 @@ components: type: string cover_media: $ref: "#/components/schemas/ArticleCoverMedia" + metadata: + $ref: "#/components/schemas/ArticleMetadata" + lifecycle_state: + $ref: "#/components/schemas/ArticleLifecycleState" ArticleCoverMedia: required: @@ -1416,3 +1449,38 @@ components: type: integer red: type: integer + + ArticleMetadata: + required: + - "first_published_at_secs" + properties: + first_published_at_secs: + type: integer + + ArticleLifecycleState: + required: + - "modified_at_secs" + properties: + modified_at_secs: + type: integer + + AllowDownloadStatus: + required: + - "allow_download" + properties: + allow_download: + type: boolean + + MediaResults: + required: + - "result" + properties: + result: + $ref: "#/components/schemas/MediaResult" + + MediaResult: + required: + - "media_key" + properties: + media_key: + type: string diff --git a/src/openapi/schemas/user.yaml b/src/openapi/schemas/user.yaml index 89755af..95d9c29 100644 --- a/src/openapi/schemas/user.yaml +++ b/src/openapi/schemas/user.yaml @@ -92,6 +92,10 @@ components: $ref: "#/components/schemas/UserVerificationInfo" is_profile_translatable: type: boolean + tipjar_settings: + $ref: "#/components/schemas/UserTipJarSettings" + legacy_extended_profile: + $ref: "#/components/schemas/UserLegacyExtendedProfile" UserProfessional: required: @@ -194,6 +198,49 @@ components: type: string enum: ["ExternalUrl"] + UserTipJarSettings: + properties: + is_enabled: + type: boolean + patreon_handle: + type: string + bitcoin_handle: + type: string + ethereum_handle: + type: string + cash_app_handle: + type: string + venmo_handle: + type: string + gofundme_handle: + type: string # uri + + UserLegacyExtendedProfile: + properties: + birthdate: + $ref: "#/components/schemas/UserLegacyExtendedProfileBirthdate" + + UserLegacyExtendedProfileBirthdate: + required: + - "day" + - "month" + - "year" + - "visibility" + - "year_visibility" + properties: + day: + type: integer + month: + type: integer + year: + type: integer + visibility: + type: string + enum: ["Self", "Public", "MutualFollow", "Followers", "Following"] + year_visibility: + type: string + enum: ["Self", "Public", "MutualFollow", "Followers", "Following"] + UserLegacy: required: - "blocked_by" diff --git a/test/python/test_serialize.py b/test/python/test_serialize.py index 624e4d3..bef87aa 100644 --- a/test/python/test_serialize.py +++ b/test/python/test_serialize.py @@ -11,6 +11,7 @@ from enum import Enum from pathlib import Path import openapi_client as pt +import urllib3 warnings.filterwarnings("ignore") logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(levelname)s %(message)s") @@ -216,11 +217,17 @@ if __name__ == "__main__": }, ) + latest_user_agent_res = urllib3.PoolManager().request( + "GET", + "https://raw.githubusercontent.com/fa0311/latest-user-agent/main/output.json", + ) + + latest_user_agent = json.loads(latest_user_agent_res.data.decode("utf-8")) + api_conf.access_token = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA" api_client = pt.ApiClient(configuration=api_conf, cookie=cookies_str) - api_client.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" - + api_client.user_agent = latest_user_agent["chrome"] error_count = 0 for x in [pt.DefaultApi, pt.TweetApi, pt.UserApi, pt.UsersApi, pt.UserListApi]: @@ -277,7 +284,7 @@ if __name__ == "__main__": try: logger.info("Try: Self UserByScreenName Test") - kwargs = get_kwargs("UserByScreenName", {"screen_name": "a810810931931"}) + kwargs = get_kwargs("UserByScreenName", {"screen_name": "NxWDOyLMd483329"}) res = pt.UserApi(api_client).get_user_by_screen_name_with_http_info(**kwargs) data = res.data.to_dict() @@ -288,14 +295,14 @@ if __name__ == "__main__": ) logger.info(f"Match rate: {rate}") screen_name = data["data"]["user"]["result"]["legacy"]["screen_name"] - if not screen_name == "a810810931931": + if not screen_name == "NxWDOyLMd483329": raise Exception("UserByScreenName failed") except Exception as e: error_dump(e) error_count += 1 ids = [ - "1180389371481976833", + # "1180389371481976833", banned "900282258736545792", "1212617657003859968", "2455740283",