mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
Merge pull request #5 from fa0311/add-post-API
Re: add post API (temporal) #3
This commit is contained in:
commit
283d94fabf
12 changed files with 1928 additions and 23 deletions
12
dist/dart/openapi-3.0.yaml
vendored
12
dist/dart/openapi-3.0.yaml
vendored
|
|
@ -33,6 +33,8 @@ info:
|
|||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/1RyAhNwby-gzGCRVsMxKbQ/CreateTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~11RyAhNwby-gzGCRVsMxKbQ~1CreateTweet
|
||||
/2TemLyqrMpTeAmysdbnVqw/ListLatestTweetsTimeline:
|
||||
$ref: ./paths/timeline.yaml#/paths/~12TemLyqrMpTeAmysdbnVqw~1ListLatestTweetsTimeline
|
||||
/5fmEkRT-1AdHqEsbVgehMg/Likes:
|
||||
|
|
@ -47,10 +49,20 @@ paths:
|
|||
$ref: ./paths/follow.yaml#/paths/~1IWP6Zt14sARO29lJT35bBw~1Following
|
||||
/RIWc55YCNyUJ-U3HHGYkdg/UserTweetsAndReplies:
|
||||
$ref: ./paths/usertweets.yaml#/paths/~1RIWc55YCNyUJ-U3HHGYkdg~1UserTweetsAndReplies
|
||||
/VaenaVgh5q5ih7kvyVjgtg/DeleteTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1VaenaVgh5q5ih7kvyVjgtg~1DeleteTweet
|
||||
/YqiE3JL1KNgf9nSljYdxaA/UserMedia:
|
||||
$ref: ./paths/usertweets.yaml#/paths/~1YqiE3JL1KNgf9nSljYdxaA~1UserMedia
|
||||
/ZYKSe-w7KEslx3JhSIk5LA/UnfavoriteTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1ZYKSe-w7KEslx3JhSIk5LA~1UnfavoriteTweet
|
||||
/djdTXDIk2qhd4OStqlUFeQ/Followers:
|
||||
$ref: ./paths/follow.yaml#/paths/~1djdTXDIk2qhd4OStqlUFeQ~1Followers
|
||||
/iQtK4dl5hBmXewYZuEOKVw/DeleteRetweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1iQtK4dl5hBmXewYZuEOKVw~1DeleteRetweet
|
||||
/lI07N6Otwv1PhnEgXILM7A/FavoriteTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1lI07N6Otwv1PhnEgXILM7A~1FavoriteTweet
|
||||
/ojPdsZsimiJrUGLR1sjUtA/CreateRetweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1ojPdsZsimiJrUGLR1sjUtA~1CreateRetweet
|
||||
/sLVLhk0bGj3MVFEKTdax1w/UserByScreenName:
|
||||
$ref: ./paths/user.yaml#/paths/~1sLVLhk0bGj3MVFEKTdax1w~1UserByScreenName
|
||||
/tmd4ifV8RHltzn8ymGg1aw/Bookmarks:
|
||||
|
|
|
|||
678
dist/dart/paths/post.yaml
vendored
Normal file
678
dist/dart/paths/post.yaml
vendored
Normal file
|
|
@ -0,0 +1,678 @@
|
|||
components:
|
||||
schemas:
|
||||
CreateRetweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/CreateRetweetResponseData'
|
||||
required:
|
||||
- data
|
||||
CreateRetweetResponseData:
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: '#/components/schemas/CreateRetweetResponseResult'
|
||||
required:
|
||||
- create_retweet
|
||||
CreateRetweetResponseResult:
|
||||
properties:
|
||||
retweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/CreateRetweet
|
||||
required:
|
||||
- retweet_results
|
||||
CreateTweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/CreateTweetResponseData'
|
||||
required:
|
||||
- data
|
||||
CreateTweetResponseData:
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: '#/components/schemas/CreateTweetResponseResult'
|
||||
required:
|
||||
- create_tweet
|
||||
CreateTweetResponseResult:
|
||||
properties:
|
||||
tweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/CreateTweet
|
||||
required:
|
||||
- tweet_results
|
||||
DeleteRetweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/DeleteRetweetResponseData'
|
||||
required:
|
||||
- data
|
||||
DeleteRetweetResponseData:
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: '#/components/schemas/CreateRetweetResponseResult'
|
||||
required:
|
||||
- unretweet
|
||||
DeleteRetweetResponseResult:
|
||||
properties:
|
||||
retweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/DeleteRetweet
|
||||
required:
|
||||
- source_tweet_results
|
||||
DeleteTweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/DeleteTweetResponseData'
|
||||
required:
|
||||
- data
|
||||
DeleteTweetResponseData:
|
||||
properties:
|
||||
delete_retweet:
|
||||
$ref: '#/components/schemas/DeleteTweetResponseResult'
|
||||
required:
|
||||
- delete_tweet
|
||||
DeleteTweetResponseResult:
|
||||
properties:
|
||||
tweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/DeleteTweet
|
||||
required:
|
||||
- tweet_results
|
||||
FavoriteTweetResponseData:
|
||||
properties:
|
||||
data:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/FavoriteTweet
|
||||
required:
|
||||
- data
|
||||
UnfavoriteTweetResponseData:
|
||||
properties:
|
||||
data:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/UnfavoriteTweet
|
||||
required:
|
||||
- data
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/1RyAhNwby-gzGCRVsMxKbQ/CreateTweet:
|
||||
post:
|
||||
description: create Tweet
|
||||
operationId: createTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_text": "test", "media": {"media_entities": [], "possibly_sensitive":
|
||||
false}, "semantic_annotation_ids": []}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweetypie_unmention_optimization_enabled": true, "vibe_api_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, "tweet_awards_web_tipping_enabled": false, "interactive_text_enabled":
|
||||
true, "responsive_web_text_conversations_enabled": false, "longform_notetweets_rich_text_read_enabled":
|
||||
true, "blue_business_profile_image_shape_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
||||
true, "verified_phone_label_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
||||
true, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
||||
false, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
||||
false, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_enhance_cards_enabled":
|
||||
false}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: 1RyAhNwby-gzGCRVsMxKbQ
|
||||
example: 1RyAhNwby-gzGCRVsMxKbQ
|
||||
type: string
|
||||
- in: header
|
||||
name: authorization
|
||||
required: true
|
||||
schema:
|
||||
default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA
|
||||
description: It is a constant value and does not need to be changed.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-active-user
|
||||
required: true
|
||||
schema:
|
||||
default: 'yes'
|
||||
description: Unknown what this value means.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-client-language
|
||||
required: true
|
||||
schema:
|
||||
default: en
|
||||
description: language code.
|
||||
type: string
|
||||
- in: header
|
||||
name: user-agent
|
||||
required: true
|
||||
schema:
|
||||
default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/112.0.0.0 Safari/537.36
|
||||
description: UserAgent, some APIs may be rejected if changed.
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateTweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/VaenaVgh5q5ih7kvyVjgtg/DeleteTweet:
|
||||
post:
|
||||
description: delete Retweet
|
||||
operationId: deleteTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: VaenaVgh5q5ih7kvyVjgtg
|
||||
example: VaenaVgh5q5ih7kvyVjgtg
|
||||
type: string
|
||||
- in: header
|
||||
name: authorization
|
||||
required: true
|
||||
schema:
|
||||
default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA
|
||||
description: It is a constant value and does not need to be changed.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-active-user
|
||||
required: true
|
||||
schema:
|
||||
default: 'yes'
|
||||
description: Unknown what this value means.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-client-language
|
||||
required: true
|
||||
schema:
|
||||
default: en
|
||||
description: language code.
|
||||
type: string
|
||||
- in: header
|
||||
name: user-agent
|
||||
required: true
|
||||
schema:
|
||||
default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/112.0.0.0 Safari/537.36
|
||||
description: UserAgent, some APIs may be rejected if changed.
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DeleteTweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/ZYKSe-w7KEslx3JhSIk5LA/UnfavoriteTweet:
|
||||
post:
|
||||
description: unfavorite Tweet
|
||||
operationId: unfavoriteTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: ZYKSe-w7KEslx3JhSIk5LA
|
||||
example: ZYKSe-w7KEslx3JhSIk5LA
|
||||
type: string
|
||||
- in: header
|
||||
name: authorization
|
||||
required: true
|
||||
schema:
|
||||
default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA
|
||||
description: It is a constant value and does not need to be changed.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-active-user
|
||||
required: true
|
||||
schema:
|
||||
default: 'yes'
|
||||
description: Unknown what this value means.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-client-language
|
||||
required: true
|
||||
schema:
|
||||
default: en
|
||||
description: language code.
|
||||
type: string
|
||||
- in: header
|
||||
name: user-agent
|
||||
required: true
|
||||
schema:
|
||||
default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/112.0.0.0 Safari/537.36
|
||||
description: UserAgent, some APIs may be rejected if changed.
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnfavoriteTweetResponseData'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/iQtK4dl5hBmXewYZuEOKVw/DeleteRetweet:
|
||||
post:
|
||||
description: delete Retweet
|
||||
operationId: deleteRetweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: iQtK4dl5hBmXewYZuEOKVw
|
||||
example: iQtK4dl5hBmXewYZuEOKVw
|
||||
type: string
|
||||
- in: header
|
||||
name: authorization
|
||||
required: true
|
||||
schema:
|
||||
default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA
|
||||
description: It is a constant value and does not need to be changed.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-active-user
|
||||
required: true
|
||||
schema:
|
||||
default: 'yes'
|
||||
description: Unknown what this value means.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-client-language
|
||||
required: true
|
||||
schema:
|
||||
default: en
|
||||
description: language code.
|
||||
type: string
|
||||
- in: header
|
||||
name: user-agent
|
||||
required: true
|
||||
schema:
|
||||
default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/112.0.0.0 Safari/537.36
|
||||
description: UserAgent, some APIs may be rejected if changed.
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DeleteRetweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/lI07N6Otwv1PhnEgXILM7A/FavoriteTweet:
|
||||
post:
|
||||
description: favorite Tweet
|
||||
operationId: favoriteTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: lI07N6Otwv1PhnEgXILM7A
|
||||
example: lI07N6Otwv1PhnEgXILM7A
|
||||
type: string
|
||||
- in: header
|
||||
name: authorization
|
||||
required: true
|
||||
schema:
|
||||
default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA
|
||||
description: It is a constant value and does not need to be changed.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-active-user
|
||||
required: true
|
||||
schema:
|
||||
default: 'yes'
|
||||
description: Unknown what this value means.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-client-language
|
||||
required: true
|
||||
schema:
|
||||
default: en
|
||||
description: language code.
|
||||
type: string
|
||||
- in: header
|
||||
name: user-agent
|
||||
required: true
|
||||
schema:
|
||||
default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/112.0.0.0 Safari/537.36
|
||||
description: UserAgent, some APIs may be rejected if changed.
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FavoriteTweetResponseData'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/ojPdsZsimiJrUGLR1sjUtA/CreateRetweet:
|
||||
post:
|
||||
description: create Retweet
|
||||
operationId: createRetweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: ojPdsZsimiJrUGLR1sjUtA
|
||||
example: ojPdsZsimiJrUGLR1sjUtA
|
||||
type: string
|
||||
- in: header
|
||||
name: authorization
|
||||
required: true
|
||||
schema:
|
||||
default: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA
|
||||
description: It is a constant value and does not need to be changed.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-active-user
|
||||
required: true
|
||||
schema:
|
||||
default: 'yes'
|
||||
description: Unknown what this value means.
|
||||
type: string
|
||||
- in: header
|
||||
name: x-twitter-client-language
|
||||
required: true
|
||||
schema:
|
||||
default: en
|
||||
description: language code.
|
||||
type: string
|
||||
- in: header
|
||||
name: user-agent
|
||||
required: true
|
||||
schema:
|
||||
default: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
|
||||
like Gecko) Chrome/112.0.0.0 Safari/537.36
|
||||
description: UserAgent, some APIs may be rejected if changed.
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateRetweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
60
dist/dart/schemas/post.yaml
vendored
Normal file
60
dist/dart/schemas/post.yaml
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
components:
|
||||
schemas:
|
||||
CreateRetweet:
|
||||
properties:
|
||||
result:
|
||||
items:
|
||||
$ref: '#/components/schemas/Retweet'
|
||||
type: object
|
||||
required:
|
||||
- result
|
||||
CreateTweet:
|
||||
properties:
|
||||
result:
|
||||
items:
|
||||
$ref: ./tweet.yaml#/components/schemas/Tweet
|
||||
type: object
|
||||
required:
|
||||
- result
|
||||
DeleteRetweet:
|
||||
properties:
|
||||
result:
|
||||
items:
|
||||
$ref: '#/components/schemas/Retweet'
|
||||
type: object
|
||||
required:
|
||||
- result
|
||||
DeleteTweet:
|
||||
properties:
|
||||
nullable: true
|
||||
type: object
|
||||
FavoriteTweet:
|
||||
properties:
|
||||
favorite_tweet:
|
||||
type: string
|
||||
required:
|
||||
- favorite_tweet
|
||||
Retweet:
|
||||
properties:
|
||||
legacy:
|
||||
items:
|
||||
properties:
|
||||
full_text:
|
||||
type: string
|
||||
type: object
|
||||
rest_id:
|
||||
type: string
|
||||
required:
|
||||
- rest_id
|
||||
- legacy
|
||||
UnfavoriteTweet:
|
||||
properties:
|
||||
unfavorite_tweet:
|
||||
type: string
|
||||
required:
|
||||
- unfavorite_tweet
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths: {}
|
||||
12
dist/typescript/openapi-3.0.yaml
vendored
12
dist/typescript/openapi-3.0.yaml
vendored
|
|
@ -53,6 +53,8 @@ info:
|
|||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/1RyAhNwby-gzGCRVsMxKbQ/CreateTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~11RyAhNwby-gzGCRVsMxKbQ~1CreateTweet
|
||||
/2TemLyqrMpTeAmysdbnVqw/ListLatestTweetsTimeline:
|
||||
$ref: ./paths/timeline.yaml#/paths/~12TemLyqrMpTeAmysdbnVqw~1ListLatestTweetsTimeline
|
||||
/5fmEkRT-1AdHqEsbVgehMg/Likes:
|
||||
|
|
@ -67,10 +69,20 @@ paths:
|
|||
$ref: ./paths/follow.yaml#/paths/~1IWP6Zt14sARO29lJT35bBw~1Following
|
||||
/RIWc55YCNyUJ-U3HHGYkdg/UserTweetsAndReplies:
|
||||
$ref: ./paths/usertweets.yaml#/paths/~1RIWc55YCNyUJ-U3HHGYkdg~1UserTweetsAndReplies
|
||||
/VaenaVgh5q5ih7kvyVjgtg/DeleteTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1VaenaVgh5q5ih7kvyVjgtg~1DeleteTweet
|
||||
/YqiE3JL1KNgf9nSljYdxaA/UserMedia:
|
||||
$ref: ./paths/usertweets.yaml#/paths/~1YqiE3JL1KNgf9nSljYdxaA~1UserMedia
|
||||
/ZYKSe-w7KEslx3JhSIk5LA/UnfavoriteTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1ZYKSe-w7KEslx3JhSIk5LA~1UnfavoriteTweet
|
||||
/djdTXDIk2qhd4OStqlUFeQ/Followers:
|
||||
$ref: ./paths/follow.yaml#/paths/~1djdTXDIk2qhd4OStqlUFeQ~1Followers
|
||||
/iQtK4dl5hBmXewYZuEOKVw/DeleteRetweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1iQtK4dl5hBmXewYZuEOKVw~1DeleteRetweet
|
||||
/lI07N6Otwv1PhnEgXILM7A/FavoriteTweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1lI07N6Otwv1PhnEgXILM7A~1FavoriteTweet
|
||||
/ojPdsZsimiJrUGLR1sjUtA/CreateRetweet:
|
||||
$ref: ./paths/post.yaml#/paths/~1ojPdsZsimiJrUGLR1sjUtA~1CreateRetweet
|
||||
/sLVLhk0bGj3MVFEKTdax1w/UserByScreenName:
|
||||
$ref: ./paths/user.yaml#/paths/~1sLVLhk0bGj3MVFEKTdax1w~1UserByScreenName
|
||||
/tmd4ifV8RHltzn8ymGg1aw/Bookmarks:
|
||||
|
|
|
|||
504
dist/typescript/paths/post.yaml
vendored
Normal file
504
dist/typescript/paths/post.yaml
vendored
Normal file
|
|
@ -0,0 +1,504 @@
|
|||
components:
|
||||
schemas:
|
||||
CreateRetweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/CreateRetweetResponseData'
|
||||
required:
|
||||
- data
|
||||
CreateRetweetResponseData:
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: '#/components/schemas/CreateRetweetResponseResult'
|
||||
required:
|
||||
- create_retweet
|
||||
CreateRetweetResponseResult:
|
||||
properties:
|
||||
retweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/CreateRetweet
|
||||
required:
|
||||
- retweet_results
|
||||
CreateTweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/CreateTweetResponseData'
|
||||
required:
|
||||
- data
|
||||
CreateTweetResponseData:
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: '#/components/schemas/CreateTweetResponseResult'
|
||||
required:
|
||||
- create_tweet
|
||||
CreateTweetResponseResult:
|
||||
properties:
|
||||
tweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/CreateTweet
|
||||
required:
|
||||
- tweet_results
|
||||
DeleteRetweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/DeleteRetweetResponseData'
|
||||
required:
|
||||
- data
|
||||
DeleteRetweetResponseData:
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: '#/components/schemas/CreateRetweetResponseResult'
|
||||
required:
|
||||
- unretweet
|
||||
DeleteRetweetResponseResult:
|
||||
properties:
|
||||
retweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/DeleteRetweet
|
||||
required:
|
||||
- source_tweet_results
|
||||
DeleteTweetResponse:
|
||||
properties:
|
||||
data:
|
||||
$ref: '#/components/schemas/DeleteTweetResponseData'
|
||||
required:
|
||||
- data
|
||||
DeleteTweetResponseData:
|
||||
properties:
|
||||
delete_retweet:
|
||||
$ref: '#/components/schemas/DeleteTweetResponseResult'
|
||||
required:
|
||||
- delete_tweet
|
||||
DeleteTweetResponseResult:
|
||||
properties:
|
||||
tweet_results:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/DeleteTweet
|
||||
required:
|
||||
- tweet_results
|
||||
FavoriteTweetResponseData:
|
||||
properties:
|
||||
data:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/FavoriteTweet
|
||||
required:
|
||||
- data
|
||||
UnfavoriteTweetResponseData:
|
||||
properties:
|
||||
data:
|
||||
$ref: ./../schemas/post.yaml#/components/schemas/UnfavoriteTweet
|
||||
required:
|
||||
- data
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/1RyAhNwby-gzGCRVsMxKbQ/CreateTweet:
|
||||
post:
|
||||
description: create Tweet
|
||||
operationId: createTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_text": "test", "media": {"media_entities": [], "possibly_sensitive":
|
||||
false}, "semantic_annotation_ids": []}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweetypie_unmention_optimization_enabled": true, "vibe_api_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, "tweet_awards_web_tipping_enabled": false, "interactive_text_enabled":
|
||||
true, "responsive_web_text_conversations_enabled": false, "longform_notetweets_rich_text_read_enabled":
|
||||
true, "blue_business_profile_image_shape_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
||||
true, "verified_phone_label_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
||||
true, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
||||
false, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
||||
false, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_enhance_cards_enabled":
|
||||
false}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: 1RyAhNwby-gzGCRVsMxKbQ
|
||||
example: 1RyAhNwby-gzGCRVsMxKbQ
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateTweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/VaenaVgh5q5ih7kvyVjgtg/DeleteTweet:
|
||||
post:
|
||||
description: delete Retweet
|
||||
operationId: deleteTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: VaenaVgh5q5ih7kvyVjgtg
|
||||
example: VaenaVgh5q5ih7kvyVjgtg
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DeleteTweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/ZYKSe-w7KEslx3JhSIk5LA/UnfavoriteTweet:
|
||||
post:
|
||||
description: unfavorite Tweet
|
||||
operationId: unfavoriteTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: ZYKSe-w7KEslx3JhSIk5LA
|
||||
example: ZYKSe-w7KEslx3JhSIk5LA
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UnfavoriteTweetResponseData'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/iQtK4dl5hBmXewYZuEOKVw/DeleteRetweet:
|
||||
post:
|
||||
description: delete Retweet
|
||||
operationId: deleteRetweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: iQtK4dl5hBmXewYZuEOKVw
|
||||
example: iQtK4dl5hBmXewYZuEOKVw
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DeleteRetweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/lI07N6Otwv1PhnEgXILM7A/FavoriteTweet:
|
||||
post:
|
||||
description: favorite Tweet
|
||||
operationId: favoriteTweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: lI07N6Otwv1PhnEgXILM7A
|
||||
example: lI07N6Otwv1PhnEgXILM7A
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FavoriteTweetResponseData'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
/ojPdsZsimiJrUGLR1sjUtA/CreateRetweet:
|
||||
post:
|
||||
description: create Retweet
|
||||
operationId: createRetweet
|
||||
parameters:
|
||||
- in: query
|
||||
name: variables
|
||||
required: true
|
||||
schema:
|
||||
example: '{"tweet_id": "1349129669258448897"}'
|
||||
type: string
|
||||
- in: query
|
||||
name: features
|
||||
required: true
|
||||
schema:
|
||||
example: '{}'
|
||||
type: string
|
||||
- in: query
|
||||
name: queryId
|
||||
required: true
|
||||
schema:
|
||||
default: ojPdsZsimiJrUGLR1sjUtA
|
||||
example: ojPdsZsimiJrUGLR1sjUtA
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateRetweetResponse'
|
||||
description: Successful operation
|
||||
headers:
|
||||
x-connection-hash:
|
||||
schema:
|
||||
type: string
|
||||
x-content-type-options:
|
||||
schema:
|
||||
type: string
|
||||
x-frame-options:
|
||||
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
|
||||
x-xss-protection:
|
||||
schema:
|
||||
type: integer
|
||||
tags:
|
||||
- Post
|
||||
60
dist/typescript/schemas/post.yaml
vendored
Normal file
60
dist/typescript/schemas/post.yaml
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
components:
|
||||
schemas:
|
||||
CreateRetweet:
|
||||
properties:
|
||||
result:
|
||||
items:
|
||||
$ref: '#/components/schemas/Retweet'
|
||||
type: object
|
||||
required:
|
||||
- result
|
||||
CreateTweet:
|
||||
properties:
|
||||
result:
|
||||
items:
|
||||
$ref: ./tweet.yaml#/components/schemas/Tweet
|
||||
type: object
|
||||
required:
|
||||
- result
|
||||
DeleteRetweet:
|
||||
properties:
|
||||
result:
|
||||
items:
|
||||
$ref: '#/components/schemas/Retweet'
|
||||
type: object
|
||||
required:
|
||||
- result
|
||||
DeleteTweet:
|
||||
properties:
|
||||
nullable: true
|
||||
type: object
|
||||
FavoriteTweet:
|
||||
properties:
|
||||
favorite_tweet:
|
||||
type: string
|
||||
required:
|
||||
- favorite_tweet
|
||||
Retweet:
|
||||
properties:
|
||||
legacy:
|
||||
items:
|
||||
properties:
|
||||
full_text:
|
||||
type: string
|
||||
type: object
|
||||
rest_id:
|
||||
type: string
|
||||
required:
|
||||
- rest_id
|
||||
- legacy
|
||||
UnfavoriteTweet:
|
||||
properties:
|
||||
unfavorite_tweet:
|
||||
type: string
|
||||
required:
|
||||
- unfavorite_tweet
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths: {}
|
||||
|
|
@ -6,18 +6,6 @@ paths:
|
|||
/parameters:
|
||||
get:
|
||||
parameters:
|
||||
- name: variables
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: "{{Variables}}"
|
||||
- name: features
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: "{{Features}}"
|
||||
- name: queryId
|
||||
in: query
|
||||
required: true
|
||||
|
|
@ -26,6 +14,45 @@ paths:
|
|||
default: "{{Query}}"
|
||||
example: "{{Query}}"
|
||||
|
||||
# {% if get_parameters == string %}
|
||||
|
||||
- name: variables
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
default: "{{Variables}}"
|
||||
example: "{{Variables}}"
|
||||
- name: features
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
default: "{{Features}}"
|
||||
example: "{{Features}}"
|
||||
|
||||
# {% endif %}
|
||||
|
||||
# {% if get_parameters == object %}
|
||||
|
||||
- name: variables
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
- name: features
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
- name: queryId
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
|
||||
# {% endif %}
|
||||
|
||||
# {% if header == parameters %}
|
||||
|
||||
- name: authorization
|
||||
|
|
@ -58,7 +85,71 @@ paths:
|
|||
description: "UserAgent, some APIs may be rejected if changed."
|
||||
|
||||
# {% endif %}
|
||||
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
|
||||
post:
|
||||
# {% if header == parameters %}
|
||||
|
||||
parameters:
|
||||
- name: authorization
|
||||
in: header
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
default: "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
||||
description: "It is a constant value and does not need to be changed."
|
||||
- name: x-twitter-active-user
|
||||
in: header
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
default: "yes"
|
||||
description: "Unknown what this value means."
|
||||
- name: x-twitter-client-language
|
||||
in: header
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
default: "en"
|
||||
description: "language code."
|
||||
- name: user-agent
|
||||
in: header
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
default: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
|
||||
description: "UserAgent, some APIs may be rejected if changed."
|
||||
|
||||
# {% endif %}
|
||||
|
||||
# {% if post_parameters == object %}
|
||||
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- "queryId"
|
||||
- "variables"
|
||||
- "features"
|
||||
properties:
|
||||
queryId:
|
||||
type: string
|
||||
default: "{{Query}}"
|
||||
example: "{{Query}}"
|
||||
variables:
|
||||
type: object
|
||||
# default: "{{Variables}}"
|
||||
example: "{{Variables}}"
|
||||
features:
|
||||
type: object
|
||||
# default: "{{Features}}"
|
||||
example: "{{Features}}"
|
||||
|
||||
# {% endif %}
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
|
|
|
|||
|
|
@ -360,6 +360,69 @@
|
|||
"responsive_web_enhance_cards_enabled": false
|
||||
}
|
||||
},
|
||||
"FavoriteTweet": {
|
||||
"Query": "lI07N6Otwv1PhnEgXILM7A",
|
||||
"Variables": {
|
||||
"tweet_id": "1349129669258448897"
|
||||
}
|
||||
},
|
||||
"UnfavoriteTweet": {
|
||||
"Query": "ZYKSe-w7KEslx3JhSIk5LA",
|
||||
"Variables": {
|
||||
"tweet_id": "1349129669258448897"
|
||||
}
|
||||
},
|
||||
"CreateRetweet": {
|
||||
"Query": "ojPdsZsimiJrUGLR1sjUtA",
|
||||
"Variables": {
|
||||
"tweet_id": "1349129669258448897"
|
||||
}
|
||||
},
|
||||
"DeleteRetweet": {
|
||||
"Query": "iQtK4dl5hBmXewYZuEOKVw",
|
||||
"Variables": {
|
||||
"tweet_id": "1349129669258448897"
|
||||
}
|
||||
},
|
||||
"CreateTweet": {
|
||||
"Query": "1RyAhNwby-gzGCRVsMxKbQ",
|
||||
"Variables": {
|
||||
"tweet_text": "test",
|
||||
"media": {
|
||||
"media_entities": [],
|
||||
"possibly_sensitive": false
|
||||
},
|
||||
"semantic_annotation_ids": [],
|
||||
"dark_request": false
|
||||
},
|
||||
"Features": {
|
||||
"tweetypie_unmention_optimization_enabled": true,
|
||||
"vibe_api_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,
|
||||
"tweet_awards_web_tipping_enabled": false,
|
||||
"interactive_text_enabled": true,
|
||||
"responsive_web_text_conversations_enabled": false,
|
||||
"longform_notetweets_rich_text_read_enabled": true,
|
||||
"blue_business_profile_image_shape_enabled": true,
|
||||
"responsive_web_graphql_exclude_directive_enabled": true,
|
||||
"verified_phone_label_enabled": false,
|
||||
"freedom_of_speech_not_reach_fetch_enabled": true,
|
||||
"standardized_nudges_misinfo": true,
|
||||
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled": false,
|
||||
"responsive_web_graphql_skip_user_profile_image_extensions_enabled": false,
|
||||
"responsive_web_graphql_timeline_navigation_enabled": true,
|
||||
"responsive_web_enhance_cards_enabled": false
|
||||
}
|
||||
},
|
||||
"DeleteTweet": {
|
||||
"Query": "VaenaVgh5q5ih7kvyVjgtg",
|
||||
"Variables": {
|
||||
"tweet_id": "1349129669258448897"
|
||||
}
|
||||
},
|
||||
"Template": {
|
||||
"Query": "",
|
||||
"Variables": {},
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
{
|
||||
"dart": {
|
||||
"header": "parameters"
|
||||
"header": "parameters",
|
||||
"get_parameters": "string",
|
||||
"post_parameters": "object"
|
||||
},
|
||||
"typescript": {
|
||||
"header": "securitySchemes"
|
||||
"header": "securitySchemes",
|
||||
"get_parameters": "string",
|
||||
"post_parameters": "object"
|
||||
},
|
||||
"test": {
|
||||
"header": "securitySchemes",
|
||||
"get_parameters": "string",
|
||||
"post_parameters": "string"
|
||||
}
|
||||
}
|
||||
246
src/openapi/paths/post.yaml
Normal file
246
src/openapi/paths/post.yaml
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
|
||||
paths:
|
||||
/{{FavoriteTweetQuery}}/FavoriteTweet:
|
||||
post:
|
||||
operationId: postFavoriteTweet
|
||||
description: favorite Tweet
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/FavoriteTweetResponseData"
|
||||
tags:
|
||||
- "Post"
|
||||
|
||||
/{{UnfavoriteTweetQuery}}/UnfavoriteTweet:
|
||||
post:
|
||||
operationId: postUnfavoriteTweet
|
||||
description: unfavorite Tweet
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UnfavoriteTweetResponseData"
|
||||
tags:
|
||||
- "Post"
|
||||
|
||||
/{{CreateRetweetQuery}}/CreateRetweet:
|
||||
post:
|
||||
operationId: postCreateRetweet
|
||||
description: create Retweet
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateRetweetResponse"
|
||||
tags:
|
||||
- "Post"
|
||||
|
||||
/{{DeleteRetweetQuery}}/DeleteRetweet:
|
||||
post:
|
||||
operationId: postDeleteRetweet
|
||||
description: delete Retweet
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/DeleteRetweetResponse"
|
||||
tags:
|
||||
- "Post"
|
||||
|
||||
/{{CreateTweetQuery}}/CreateTweet:
|
||||
post:
|
||||
operationId: postCreateTweet
|
||||
description: create Tweet
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateTweetResponse"
|
||||
tags:
|
||||
- "Post"
|
||||
|
||||
/{{DeleteTweetQuery}}/DeleteTweet:
|
||||
post:
|
||||
operationId: postDeleteTweet
|
||||
description: delete Retweet
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/DeleteTweetResponse"
|
||||
tags:
|
||||
- "Post"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
FavoriteTweetResponseData:
|
||||
required:
|
||||
- "data"
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/FavoriteTweet"
|
||||
|
||||
FavoriteTweet:
|
||||
required:
|
||||
- "favorite_tweet"
|
||||
properties:
|
||||
favorite_tweet:
|
||||
type: string
|
||||
|
||||
UnfavoriteTweetResponseData:
|
||||
required:
|
||||
- "data"
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/UnfavoriteTweet"
|
||||
|
||||
UnfavoriteTweet:
|
||||
required:
|
||||
- "unfavorite_tweet"
|
||||
properties:
|
||||
unfavorite_tweet:
|
||||
type: string
|
||||
|
||||
# ---Retweet---
|
||||
|
||||
CreateRetweetResponse:
|
||||
required:
|
||||
- "data"
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/CreateRetweetResponseData"
|
||||
|
||||
CreateRetweetResponseData:
|
||||
required:
|
||||
- "create_retweet"
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: "#/components/schemas/CreateRetweetResponseResult"
|
||||
|
||||
CreateRetweetResponseResult:
|
||||
required:
|
||||
- "retweet_results"
|
||||
properties:
|
||||
retweet_results:
|
||||
$ref: "#/components/schemas/CreateRetweet"
|
||||
|
||||
CreateRetweet:
|
||||
required:
|
||||
- "result"
|
||||
properties:
|
||||
result:
|
||||
type: object
|
||||
items:
|
||||
$ref: "#/components/schemas/Retweet"
|
||||
|
||||
Retweet:
|
||||
required:
|
||||
- "rest_id"
|
||||
- "legacy"
|
||||
properties:
|
||||
rest_id:
|
||||
type: string
|
||||
legacy:
|
||||
type: object
|
||||
items:
|
||||
properties:
|
||||
full_text:
|
||||
type: string
|
||||
|
||||
DeleteRetweetResponse:
|
||||
required:
|
||||
- "data"
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/DeleteRetweetResponseData"
|
||||
|
||||
DeleteRetweetResponseData:
|
||||
required:
|
||||
- "unretweet"
|
||||
properties:
|
||||
create_retweet:
|
||||
$ref: "#/components/schemas/CreateRetweetResponseResult"
|
||||
|
||||
DeleteRetweetResponseResult:
|
||||
required:
|
||||
- "source_tweet_results"
|
||||
properties:
|
||||
retweet_results:
|
||||
$ref: "#/components/schemas/DeleteRetweet"
|
||||
|
||||
DeleteRetweet:
|
||||
required:
|
||||
- "result"
|
||||
properties:
|
||||
result:
|
||||
type: object
|
||||
items:
|
||||
$ref: "#/components/schemas/Retweet"
|
||||
|
||||
# ---Tweet---
|
||||
|
||||
CreateTweetResponse:
|
||||
required:
|
||||
- "data"
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/CreateTweetResponseData"
|
||||
|
||||
CreateTweetResponseData:
|
||||
required:
|
||||
- "create_tweet"
|
||||
properties:
|
||||
create_tweet:
|
||||
$ref: "#/components/schemas/CreateTweetResponseResult"
|
||||
|
||||
CreateTweetResponseResult:
|
||||
required:
|
||||
- "tweet_results"
|
||||
properties:
|
||||
tweet_results:
|
||||
$ref: "#/components/schemas/CreateTweet"
|
||||
|
||||
CreateTweet:
|
||||
required:
|
||||
- "result"
|
||||
properties:
|
||||
result:
|
||||
$ref: "./../schemas/tweet.yaml#/components/schemas/Tweet"
|
||||
|
||||
DeleteTweetResponse:
|
||||
required:
|
||||
- "data"
|
||||
properties:
|
||||
data:
|
||||
$ref: "#/components/schemas/DeleteTweetResponseData"
|
||||
|
||||
DeleteTweetResponseData:
|
||||
required:
|
||||
- "delete_tweet"
|
||||
properties:
|
||||
delete_retweet:
|
||||
$ref: "#/components/schemas/DeleteTweetResponseResult"
|
||||
|
||||
DeleteTweetResponseResult:
|
||||
required:
|
||||
- "tweet_results"
|
||||
properties:
|
||||
tweet_results:
|
||||
type: object
|
||||
97
src/openapi/response/error.yaml
Normal file
97
src/openapi/response/error.yaml
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
|
||||
paths: {}
|
||||
|
||||
components:
|
||||
schemas:
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required:
|
||||
- errors
|
||||
- data
|
||||
properties:
|
||||
errors:
|
||||
$ref: "#/components/schemas/Errors"
|
||||
|
||||
Errors:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Error"
|
||||
|
||||
Error:
|
||||
type: object
|
||||
required:
|
||||
- message
|
||||
- locations
|
||||
- path
|
||||
- extensions
|
||||
- code
|
||||
- kind
|
||||
- name
|
||||
- source
|
||||
- tracing
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
locations:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Location"
|
||||
path:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
extensions:
|
||||
$ref: "#/components/schemas/Extensions"
|
||||
code:
|
||||
type: integer
|
||||
kind:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
source:
|
||||
type: string
|
||||
tracing:
|
||||
$ref: "#/components/schemas/Tracing"
|
||||
|
||||
Location:
|
||||
type: object
|
||||
required:
|
||||
- line
|
||||
- column
|
||||
properties:
|
||||
line:
|
||||
type: integer
|
||||
column:
|
||||
type: integer
|
||||
|
||||
Extensions:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- source
|
||||
- code
|
||||
- kind
|
||||
- tracing
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
source:
|
||||
type: string
|
||||
code:
|
||||
type: integer
|
||||
kind:
|
||||
type: string
|
||||
tracing:
|
||||
$ref: "#/components/schemas/Tracing"
|
||||
|
||||
Tracing:
|
||||
type: object
|
||||
required:
|
||||
- trace_id
|
||||
properties:
|
||||
trace_id:
|
||||
type: string
|
||||
|
|
@ -38,8 +38,41 @@ class placeholder_manager:
|
|||
return file
|
||||
|
||||
|
||||
def placeholder_to_yaml(obj):
|
||||
if type(obj) is dict:
|
||||
return {
|
||||
"type": "object",
|
||||
"required": [i for i in obj],
|
||||
"properties": {i: placeholder_to_yaml(obj[i]) for i in obj},
|
||||
# "default": {i: placeholder_to_yaml(obj[i]) for i in obj},
|
||||
# "example": {i: placeholder_to_yaml(obj[i]) for i in obj},
|
||||
}
|
||||
elif type(obj) is list:
|
||||
if len(obj) == 0:
|
||||
return {
|
||||
"type": "array",
|
||||
"items": {"type": "object"},
|
||||
# "default": [],
|
||||
# "example": [],
|
||||
}
|
||||
return {
|
||||
"type": "array",
|
||||
"items": placeholder_to_yaml(obj[0]),
|
||||
# "default": placeholder_to_yaml(obj[0]),
|
||||
# "example": placeholder_to_yaml(obj[0]),
|
||||
}
|
||||
elif type(obj) is str:
|
||||
return {"type": "string", "example": obj, "default": obj}
|
||||
elif type(obj) is bool:
|
||||
return {"type": "boolean", "example": obj, "default": obj}
|
||||
elif type(obj) is int:
|
||||
return {"type": "integer", "example": obj, "default": obj}
|
||||
|
||||
|
||||
print("=== Build Start ===")
|
||||
OUTPUT_DIR = "dist/{0}"
|
||||
INPUT_DIR = "src/openapi"
|
||||
METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"]
|
||||
|
||||
try:
|
||||
shutil.rmtree("dist")
|
||||
|
|
@ -50,6 +83,8 @@ with open("src/config/variable.json", mode="r", encoding="utf-8") as f:
|
|||
variable = json.load(f)
|
||||
|
||||
|
||||
placeholder = placeholder_manager()
|
||||
|
||||
for lang in variable.keys():
|
||||
|
||||
def read(file: str):
|
||||
|
|
@ -83,7 +118,6 @@ for lang in variable.keys():
|
|||
for dir in glob.glob(os.path.join(INPUT_DIR, "**/")):
|
||||
os.makedirs(dir.replace(INPUT_DIR, OUTPUT_DIR.format(lang), 1), exist_ok=True)
|
||||
|
||||
placeholder = placeholder_manager()
|
||||
parameters = read("src/config/parameters.yaml")
|
||||
header = read("src/config/header.yaml")
|
||||
|
||||
|
|
@ -96,15 +130,52 @@ for lang in variable.keys():
|
|||
|
||||
for key in load["paths"].keys():
|
||||
append = get_yaml(parameters, key.split("/")[-1])
|
||||
req = load["paths"][key]["get"]
|
||||
req["parameters"] = append["paths"]["/parameters"]["get"]["parameters"]
|
||||
param = append["paths"]["/parameters"]
|
||||
for method in load["paths"][key].keys():
|
||||
req = load["paths"][key][method]
|
||||
|
||||
append = get_yaml(header, key.split("/")[-1])
|
||||
req = load["paths"][key]["get"]
|
||||
req["responses"]["200"]["headers"] = append["components"]["headers"]
|
||||
req["parameters"] = req.get("parameters", [])
|
||||
req["parameters"] += param[method].get("parameters", [])
|
||||
|
||||
escape = key.replace("/", "~1")
|
||||
paths.update({key: {"$ref": f".{relative}#/paths/{escape}"}})
|
||||
if param[method].get("requestBody") is not None:
|
||||
req["requestBody"] = param[method].get("requestBody")
|
||||
|
||||
if variable[lang].get(method + "_parameters") == "schema_parameters":
|
||||
for p_key in placeholder.data[key.split("/")[-1]].keys():
|
||||
if p_key.lower() == "query":
|
||||
continue
|
||||
req["parameters"].append(
|
||||
{
|
||||
"name": p_key.lower(),
|
||||
"in": "query",
|
||||
"schema": placeholder_to_yaml(
|
||||
placeholder.data[key.split("/")[-1]][p_key]
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
if variable[lang].get(method + "_parameters") == "schema_request_body":
|
||||
data = placeholder.data[key.split("/")[-1]]
|
||||
schema = {i: placeholder_to_yaml(data[i]) for i in data.keys()}
|
||||
|
||||
req["requestBody"] = {
|
||||
"description": key.split("/")[-1] + "body",
|
||||
"required": True,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": schema,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
append = get_yaml(header, key.split("/")[-1])
|
||||
req = load["paths"][key][method]
|
||||
req["responses"]["200"]["headers"] = append["components"]["headers"]
|
||||
|
||||
escape = key.replace("/", "~1")
|
||||
paths.update({key: {"$ref": f".{relative}#/paths/{escape}"}})
|
||||
write(file, yaml.dump(load))
|
||||
|
||||
file = "src/openapi/openapi-3.0.yaml"
|
||||
|
|
@ -114,3 +185,5 @@ for lang in variable.keys():
|
|||
load["paths"] = paths
|
||||
|
||||
write(file, yaml.dump(load))
|
||||
|
||||
print("=== Build End ===")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue