mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
add post API (temporal)
This commit is contained in:
parent
4f250ecec6
commit
749668901f
3 changed files with 341 additions and 0 deletions
77
src/config/placeholder_post.json
Normal file
77
src/config/placeholder_post.json
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
{
|
||||||
|
"FavoriteTweet": {
|
||||||
|
"Query": "lI07N6Otwv1PhnEgXILM7A",
|
||||||
|
"Variables": {
|
||||||
|
"tweet_id": "1349129669258448897"
|
||||||
|
},
|
||||||
|
"Features": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"UnfavoriteTweet": {
|
||||||
|
"Query": "ZYKSe-w7KEslx3JhSIk5LA",
|
||||||
|
"Variables": {
|
||||||
|
"tweet_id": "1349129669258448897"
|
||||||
|
},
|
||||||
|
"Features": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CreateRetweet": {
|
||||||
|
"Query": "ojPdsZsimiJrUGLR1sjUtA",
|
||||||
|
"Variables": {
|
||||||
|
"tweet_id": "1349129669258448897"
|
||||||
|
},
|
||||||
|
"Features": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DeleteRetweet": {
|
||||||
|
"Query": "iQtK4dl5hBmXewYZuEOKVw",
|
||||||
|
"Variables": {
|
||||||
|
"tweet_id": "1349129669258448897"
|
||||||
|
},
|
||||||
|
"Features": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"CreateTweet": {
|
||||||
|
"Query": "1RyAhNwby-gzGCRVsMxKbQ",
|
||||||
|
"Variables": {
|
||||||
|
"tweet_text": "test",
|
||||||
|
"media": {
|
||||||
|
"media_entities":[],
|
||||||
|
"possibly_sensitive": false
|
||||||
|
},
|
||||||
|
"semantic_annotation_ids":[]
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
"Features": {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Template": {
|
||||||
|
"Query": "",
|
||||||
|
"Variables": {},
|
||||||
|
"Features": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
193
src/openapi/paths/post.yaml
Normal file
193
src/openapi/paths/post.yaml
Normal file
|
|
@ -0,0 +1,193 @@
|
||||||
|
openapi: 3.0.3
|
||||||
|
info:
|
||||||
|
title: Twitter OpenAPI
|
||||||
|
version: 0.0.1
|
||||||
|
|
||||||
|
paths:
|
||||||
|
/{{FavoriteTweetQuery}}/FavoriteTweet:
|
||||||
|
post:
|
||||||
|
operationId: favoriteTweet
|
||||||
|
description: favorite Tweet
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/FavoriteTweetResponseData"
|
||||||
|
tags:
|
||||||
|
- "Post"
|
||||||
|
|
||||||
|
/{{UnfavoriteTweetQuery}}/UnfavoriteTweet:
|
||||||
|
post:
|
||||||
|
operationId: unfavoriteTweet
|
||||||
|
description: unfavorite Tweet
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/UnfavoriteTweetResponseData"
|
||||||
|
tags:
|
||||||
|
- "Post"
|
||||||
|
|
||||||
|
/{{CreateRetweetQuery}}/CreateRetweet:
|
||||||
|
post:
|
||||||
|
operationId: createRetweet
|
||||||
|
description: create Retweet
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/CreateRetweetResponse"
|
||||||
|
tags:
|
||||||
|
- "Post"
|
||||||
|
|
||||||
|
/{{DeleteRetweetQuery}}/DeleteRetweet:
|
||||||
|
post:
|
||||||
|
operationId: deleteRetweet
|
||||||
|
description: delete Retweet
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/DeleteRetweetResponse"
|
||||||
|
tags:
|
||||||
|
- "Post"
|
||||||
|
|
||||||
|
/{{CreateTweetQuery}}/CreateTweet:
|
||||||
|
post:
|
||||||
|
operationId: createTweet
|
||||||
|
description: create Tweet
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/CreateTweetResponse"
|
||||||
|
tags:
|
||||||
|
- "Post"
|
||||||
|
|
||||||
|
/{{DeleteTweetQuery}}/DeleteTweet:
|
||||||
|
post:
|
||||||
|
operationId: deleteTweet
|
||||||
|
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: "./../schemas/post.yaml#/components/schemas/FavoriteTweet"
|
||||||
|
|
||||||
|
UnfavoriteTweetResponseData:
|
||||||
|
required:
|
||||||
|
- "data"
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
$ref: "./../schemas/post.yaml#/components/schemas/UnfavoriteTweet"
|
||||||
|
|
||||||
|
# ---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: "./../schemas/post.yaml#/components/schemas/CreateRetweet"
|
||||||
|
|
||||||
|
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: "./../schemas/post.yaml#/components/schemas/DeleteRetweet"
|
||||||
|
|
||||||
|
# ---Tweet---
|
||||||
|
|
||||||
|
CreateTweetResponse:
|
||||||
|
required:
|
||||||
|
- "data"
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
$ref: "#/components/schemas/CreateTweetResponseData"
|
||||||
|
|
||||||
|
CreateTweetResponseData:
|
||||||
|
required:
|
||||||
|
- "create_tweet"
|
||||||
|
properties:
|
||||||
|
create_retweet:
|
||||||
|
$ref: "#/components/schemas/CreateTweetResponseResult"
|
||||||
|
|
||||||
|
CreateTweetResponseResult:
|
||||||
|
required:
|
||||||
|
- "tweet_results"
|
||||||
|
properties:
|
||||||
|
tweet_results:
|
||||||
|
$ref: "./../schemas/post.yaml#/components/schemas/CreateTweet"
|
||||||
|
|
||||||
|
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:
|
||||||
|
$ref: "./../schemas/post.yaml#/components/schemas/DeleteTweet"
|
||||||
71
src/openapi/schemas/post.yaml
Normal file
71
src/openapi/schemas/post.yaml
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
openapi: 3.0.3
|
||||||
|
info:
|
||||||
|
title: Twitter OpenAPI
|
||||||
|
version: 0.0.1
|
||||||
|
|
||||||
|
paths: {}
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
FavoriteTweet:
|
||||||
|
required:
|
||||||
|
- "favorite_tweet"
|
||||||
|
properties:
|
||||||
|
favorite_tweet:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
UnfavoriteTweet:
|
||||||
|
required:
|
||||||
|
- "unfavorite_tweet"
|
||||||
|
properties:
|
||||||
|
unfavorite_tweet:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
# ---Retweet---
|
||||||
|
|
||||||
|
CreateRetweet:
|
||||||
|
required:
|
||||||
|
- "result"
|
||||||
|
properties:
|
||||||
|
result:
|
||||||
|
type: object
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/Retweet"
|
||||||
|
|
||||||
|
DeleteRetweet:
|
||||||
|
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
|
||||||
|
|
||||||
|
# ---Tweet---
|
||||||
|
|
||||||
|
CreateTweet:
|
||||||
|
required:
|
||||||
|
- "result"
|
||||||
|
properties:
|
||||||
|
result:
|
||||||
|
type: object
|
||||||
|
items:
|
||||||
|
$ref: "./tweet.yaml#/components/schemas/Tweet"
|
||||||
|
|
||||||
|
DeleteTweet:
|
||||||
|
properties:
|
||||||
|
type: object
|
||||||
|
nullable: true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue