twitter-openapi-typescript-generated 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +5 -0
- package/LICENSE +31 -31
- package/LICENSE.AGPL +660 -660
- package/README.md +2 -2
- package/dist/apis/DefaultApi.d.ts.map +1 -1
- package/dist/apis/DefaultApi.js +86 -18
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/apis/OtherApi.d.ts.map +1 -1
- package/dist/apis/OtherApi.js +43 -9
- package/dist/apis/OtherApi.js.map +1 -1
- package/dist/apis/PostApi.d.ts.map +1 -1
- package/dist/apis/PostApi.js +264 -60
- package/dist/apis/PostApi.js.map +1 -1
- package/dist/apis/TweetApi.d.ts +1 -2
- package/dist/apis/TweetApi.d.ts.map +1 -1
- package/dist/apis/TweetApi.js +479 -111
- package/dist/apis/TweetApi.js.map +1 -1
- package/dist/apis/UserApi.d.ts +1 -0
- package/dist/apis/UserApi.d.ts.map +1 -1
- package/dist/apis/UserApi.js +92 -18
- package/dist/apis/UserApi.js.map +1 -1
- package/dist/apis/UserListApi.d.ts +0 -1
- package/dist/apis/UserListApi.d.ts.map +1 -1
- package/dist/apis/UserListApi.js +215 -51
- package/dist/apis/UserListApi.js.map +1 -1
- package/dist/apis/UsersApi.d.ts.map +1 -1
- package/dist/apis/UsersApi.js +43 -9
- package/dist/apis/UsersApi.js.map +1 -1
- package/dist/apis/V11GetApi.d.ts.map +1 -1
- package/dist/apis/V11GetApi.js +86 -18
- package/dist/apis/V11GetApi.js.map +1 -1
- package/dist/apis/V11PostApi.d.ts.map +1 -1
- package/dist/apis/V11PostApi.js +72 -6
- package/dist/apis/V11PostApi.js.map +1 -1
- package/dist/apis/V20GetApi.d.ts.map +1 -1
- package/dist/apis/V20GetApi.js +43 -9
- package/dist/apis/V20GetApi.js.map +1 -1
- package/dist/models/CoverCta.d.ts +1 -1
- package/dist/models/CoverCta.d.ts.map +1 -1
- package/dist/models/CoverCta.js +1 -2
- package/dist/models/CoverCta.js.map +1 -1
- package/dist/models/DeleteRetweet.d.ts +33 -0
- package/dist/models/DeleteRetweet.d.ts.map +1 -0
- package/dist/models/DeleteRetweet.js +52 -0
- package/dist/models/DeleteRetweet.js.map +1 -0
- package/dist/models/DeleteRetweetResponseResult.d.ts +33 -0
- package/dist/models/DeleteRetweetResponseResult.d.ts.map +1 -0
- package/dist/models/DeleteRetweetResponseResult.js +52 -0
- package/dist/models/DeleteRetweetResponseResult.js.map +1 -0
- package/dist/models/ErrorResponse.d.ts +33 -0
- package/dist/models/ErrorResponse.d.ts.map +1 -0
- package/dist/models/ErrorResponse.js +52 -0
- package/dist/models/ErrorResponse.js.map +1 -0
- package/dist/models/Extensions.d.ts +57 -0
- package/dist/models/Extensions.d.ts.map +1 -0
- package/dist/models/Extensions.js +64 -0
- package/dist/models/Extensions.js.map +1 -0
- package/dist/models/ListTweetsTimeline.d.ts +1 -1
- package/dist/models/ListTweetsTimeline.d.ts.map +1 -1
- package/dist/models/ListTweetsTimeline.js +2 -2
- package/dist/models/ListTweetsTimeline.js.map +1 -1
- package/dist/models/MediaExtended.d.ts +1 -1
- package/dist/models/MediaExtended.d.ts.map +1 -1
- package/dist/models/MediaExtended.js +1 -2
- package/dist/models/MediaExtended.js.map +1 -1
- package/dist/models/PostCreateTweetRequestFeatures.d.ts +9 -15
- package/dist/models/PostCreateTweetRequestFeatures.d.ts.map +1 -1
- package/dist/models/PostCreateTweetRequestFeatures.js +9 -12
- package/dist/models/PostCreateTweetRequestFeatures.js.map +1 -1
- package/dist/models/PostCreateTweetRequestVariablesMedia.d.ts +3 -2
- package/dist/models/PostCreateTweetRequestVariablesMedia.d.ts.map +1 -1
- package/dist/models/PostCreateTweetRequestVariablesMedia.js +3 -2
- package/dist/models/PostCreateTweetRequestVariablesMedia.js.map +1 -1
- package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.d.ts +38 -0
- package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.d.ts.map +1 -0
- package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.js +54 -0
- package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.js.map +1 -0
- package/dist/models/UserResults.d.ts +1 -1
- package/dist/models/UserResults.d.ts.map +1 -1
- package/dist/models/UserResults.js +2 -2
- package/dist/models/UserResults.js.map +1 -1
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +5 -0
- package/dist/models/index.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +94 -6
- package/src/apis/OtherApi.ts +47 -3
- package/src/apis/PostApi.ts +282 -18
- package/src/apis/TweetApi.ts +526 -51
- package/src/apis/UserApi.ts +103 -6
- package/src/apis/UserListApi.ts +235 -24
- package/src/apis/UsersApi.ts +47 -3
- package/src/apis/V11GetApi.ts +94 -6
- package/src/apis/V11PostApi.ts +94 -6
- package/src/apis/V20GetApi.ts +47 -3
- package/src/models/CoverCta.ts +2 -3
- package/src/models/DeleteRetweet.ts +73 -0
- package/src/models/DeleteRetweetResponseResult.ts +72 -0
- package/src/models/ErrorResponse.ts +73 -0
- package/src/models/Extensions.ts +109 -0
- package/src/models/ListTweetsTimeline.ts +2 -3
- package/src/models/MediaExtended.ts +2 -3
- package/src/models/PostCreateTweetRequestFeatures.ts +18 -27
- package/src/models/PostCreateTweetRequestVariablesMedia.ts +11 -4
- package/src/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.ts +75 -0
- package/src/models/UserResults.ts +2 -3
- package/src/models/index.ts +5 -0
- package/tools/openapi-generator-config.yaml +1 -1
- package/twitter-openapi/.vscode/launch.json +8 -0
- package/twitter-openapi/dist/compatible/openapi-3.0.yaml +5017 -34
- package/twitter-openapi/dist/docs/openapi-3.0.yaml +6815 -34
- package/twitter-openapi/src/config/component/security_schemes.yaml +148 -0
- package/twitter-openapi/src/config/placeholder.json +145 -112
- package/twitter-openapi/src/openapi/paths/timeline.yaml +0 -2
- package/twitter-openapi/src/openapi/schemas/content.yaml +0 -1
- package/twitter-openapi/src/openapi/schemas/general.yaml +2 -2
- package/twitter-openapi/src/openapi/schemas/instruction.yaml +0 -1
- package/twitter-openapi/src/openapi/schemas/tweet.yaml +1 -1
- package/twitter-openapi/src/openapi/schemas/user.yaml +0 -2
- package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
- package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
- package/twitter-openapi/tools/build.py +35 -31
- package/twitter-openapi/tools/build_config.py +7 -10
- package/twitter-openapi/dist/compatible/paths/bookmarks.yaml +0 -107
- package/twitter-openapi/dist/compatible/paths/follow.yaml +0 -301
- package/twitter-openapi/dist/compatible/paths/other.yaml +0 -99
- package/twitter-openapi/dist/compatible/paths/post.yaml +0 -714
- package/twitter-openapi/dist/compatible/paths/profile.yaml +0 -126
- package/twitter-openapi/dist/compatible/paths/timeline.yaml +0 -416
- package/twitter-openapi/dist/compatible/paths/tweet.yaml +0 -397
- package/twitter-openapi/dist/compatible/paths/user.yaml +0 -233
- package/twitter-openapi/dist/compatible/paths/usertweets.yaml +0 -504
- package/twitter-openapi/dist/compatible/paths/v1.1-get.yaml +0 -242
- package/twitter-openapi/dist/compatible/paths/v1.1-post.yaml +0 -237
- package/twitter-openapi/dist/compatible/paths/v2.0-get.yaml +0 -302
- package/twitter-openapi/dist/compatible/resources/parameters.yaml +0 -13
- package/twitter-openapi/dist/compatible/response/error.yaml +0 -90
- package/twitter-openapi/dist/compatible/schemas/content.yaml +0 -214
- package/twitter-openapi/dist/compatible/schemas/error.yaml +0 -94
- package/twitter-openapi/dist/compatible/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/compatible/schemas/instruction.yaml +0 -286
- package/twitter-openapi/dist/compatible/schemas/timeline.yaml +0 -27
- package/twitter-openapi/dist/compatible/schemas/tweet.yaml +0 -508
- package/twitter-openapi/dist/compatible/schemas/typename.yaml +0 -23
- package/twitter-openapi/dist/compatible/schemas/user.yaml +0 -222
- package/twitter-openapi/dist/docs/paths/bookmarks.yaml +0 -201
- package/twitter-openapi/dist/docs/paths/follow.yaml +0 -587
- package/twitter-openapi/dist/docs/paths/other.yaml +0 -99
- package/twitter-openapi/dist/docs/paths/post.yaml +0 -692
- package/twitter-openapi/dist/docs/paths/profile.yaml +0 -134
- package/twitter-openapi/dist/docs/paths/timeline.yaml +0 -811
- package/twitter-openapi/dist/docs/paths/tweet.yaml +0 -797
- package/twitter-openapi/dist/docs/paths/user.yaml +0 -338
- package/twitter-openapi/dist/docs/paths/usertweets.yaml +0 -1046
- package/twitter-openapi/dist/docs/paths/v1.1-get.yaml +0 -242
- package/twitter-openapi/dist/docs/paths/v1.1-post.yaml +0 -237
- package/twitter-openapi/dist/docs/paths/v2.0-get.yaml +0 -302
- package/twitter-openapi/dist/docs/resources/parameters.yaml +0 -13
- package/twitter-openapi/dist/docs/response/error.yaml +0 -90
- package/twitter-openapi/dist/docs/schemas/content.yaml +0 -214
- package/twitter-openapi/dist/docs/schemas/error.yaml +0 -94
- package/twitter-openapi/dist/docs/schemas/general.yaml +0 -13
- package/twitter-openapi/dist/docs/schemas/instruction.yaml +0 -286
- package/twitter-openapi/dist/docs/schemas/timeline.yaml +0 -27
- package/twitter-openapi/dist/docs/schemas/tweet.yaml +0 -508
- package/twitter-openapi/dist/docs/schemas/typename.yaml +0 -23
- package/twitter-openapi/dist/docs/schemas/user.yaml +0 -222
|
Binary file
|
|
Binary file
|
|
@@ -1,79 +1,83 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import glob
|
|
3
|
-
import json
|
|
4
3
|
import yaml
|
|
5
4
|
import shutil
|
|
6
|
-
import copy
|
|
7
|
-
import re
|
|
8
5
|
from build_config import Config
|
|
9
|
-
from hooks import OpenapiHookBase, RequestHookBase, SchemasHookBase,OtherHookBase
|
|
6
|
+
from hooks import OpenapiHookBase, RequestHookBase, SchemasHookBase, OtherHookBase
|
|
10
7
|
from tqdm import tqdm
|
|
11
8
|
|
|
12
9
|
|
|
10
|
+
def replace_ref(x):
|
|
11
|
+
if isinstance(x, dict):
|
|
12
|
+
return {
|
|
13
|
+
key: "#" + value.split("#")[-1] if key == "$ref" else replace_ref(value)
|
|
14
|
+
for key, value in x.items()
|
|
15
|
+
}
|
|
16
|
+
elif isinstance(x, list):
|
|
17
|
+
return [replace_ref(value) for value in x]
|
|
18
|
+
return x
|
|
19
|
+
|
|
20
|
+
|
|
13
21
|
print("=== Build Start ===")
|
|
14
22
|
|
|
15
23
|
|
|
16
24
|
config = Config()
|
|
17
25
|
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
shutil.rmtree("dist")
|
|
21
|
-
except:
|
|
22
|
-
pass
|
|
23
|
-
|
|
24
|
-
for lang, profile in tqdm(config.main().items(), leave=False):
|
|
25
|
-
dist_replace = lambda x: x.replace(
|
|
26
|
-
config.INPUT_DIR, config.OUTPUT_DIR.format(lang), 1
|
|
27
|
-
)
|
|
27
|
+
shutil.rmtree("dist", ignore_errors=True)
|
|
28
28
|
|
|
29
|
-
for dir in glob.glob(os.path.join(config.INPUT_DIR, "**/")):
|
|
30
|
-
os.makedirs(dist_replace(dir), exist_ok=True)
|
|
31
29
|
|
|
30
|
+
for lang, profile in tqdm(config.main().items(), leave=False):
|
|
32
31
|
paths = {}
|
|
32
|
+
schemas = {}
|
|
33
33
|
files = glob.glob(os.path.join(config.INPUT_DIR, "**/*.yaml"))
|
|
34
34
|
for file in tqdm(files, leave=False):
|
|
35
35
|
file = file.replace(os.path.sep, "/")
|
|
36
36
|
with open(file, mode="r", encoding="utf-8") as f:
|
|
37
37
|
load = yaml.safe_load(f)
|
|
38
|
+
|
|
39
|
+
# RequestHookBase hook
|
|
38
40
|
for path in list(load["paths"]):
|
|
39
41
|
for method in list(load["paths"][path]):
|
|
42
|
+
key, value = path, load["paths"][path][method]
|
|
40
43
|
for tag in list(load["paths"][path][method].get("tags", ["default"])):
|
|
41
|
-
key, value = path, load["paths"][path][method]
|
|
42
44
|
for hook in profile["request"][tag]:
|
|
43
45
|
hook: RequestHookBase
|
|
44
46
|
key, value = hook.hook(key, value)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
paths.update({key: {}})
|
|
48
|
+
paths[key].update({method: value})
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
relative = file.replace(config.INPUT_DIR, "", 1)
|
|
50
|
-
paths.update({key: {"$ref": f".{relative}#/paths/{escape}"}})
|
|
50
|
+
# SchemasHookBase hook
|
|
51
51
|
for name in list(load.get("components", {}).get("schemas", {})):
|
|
52
52
|
value = load["components"]["schemas"][name]
|
|
53
53
|
for hook in profile["schemas"]:
|
|
54
54
|
hook: SchemasHookBase
|
|
55
55
|
value = hook.hook(value)
|
|
56
|
-
|
|
56
|
+
schemas.update({name: value})
|
|
57
|
+
|
|
58
|
+
# OtherHookBase hook
|
|
57
59
|
if file == "src/openapi/paths/other.yaml":
|
|
58
60
|
for hook in profile["other"]:
|
|
59
61
|
hook: OtherHookBase
|
|
60
62
|
key, value = hook.hook()
|
|
61
|
-
|
|
62
|
-
load["components"]["schemas"]["OtherResponse"]["properties"][key] = {
|
|
63
|
-
"$ref": f"#/components/schemas/{key}"
|
|
64
|
-
}
|
|
65
|
-
with open(dist_replace(file), mode="w+", encoding="utf-8") as f:
|
|
66
|
-
f.write(yaml.dump(load))
|
|
63
|
+
schemas["OtherResponse"]["properties"].append({key: value})
|
|
67
64
|
|
|
68
65
|
file = "src/openapi/openapi-3.0.yaml"
|
|
66
|
+
|
|
69
67
|
with open(file, mode="r", encoding="utf-8") as f:
|
|
70
68
|
openapi = yaml.safe_load(f)
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
|
|
70
|
+
# OpenapiHookBase hook
|
|
73
71
|
for hook in profile["openapi"]:
|
|
74
72
|
hook: OpenapiHookBase
|
|
75
73
|
openapi = hook.hook(openapi)
|
|
76
|
-
|
|
74
|
+
|
|
75
|
+
openapi["paths"] = replace_ref(paths)
|
|
76
|
+
openapi["components"]["schemas"] = replace_ref(schemas)
|
|
77
|
+
output = config.OUTPUT_DIR.format(lang)
|
|
78
|
+
os.makedirs(output, exist_ok=True)
|
|
79
|
+
|
|
80
|
+
with open(output + "/openapi-3.0.yaml", mode="w+", encoding="utf-8") as f:
|
|
77
81
|
f.write(yaml.dump(openapi))
|
|
78
82
|
|
|
79
83
|
print("=== Build End ===")
|
|
@@ -8,26 +8,19 @@ class Config:
|
|
|
8
8
|
def hooks_generator(self, queryParameterJson=True):
|
|
9
9
|
# https://stackoverflow.com/questions/34820064/defining-an-api-with-swagger-get-call-that-uses-json-in-parameters/45223964
|
|
10
10
|
if queryParameterJson:
|
|
11
|
+
# ["parameters"][0]["content"]["application/json"]["schema"]
|
|
11
12
|
getParamHook = AddParametersOnContent(
|
|
12
13
|
split=-1,
|
|
13
14
|
contentType="application/json",
|
|
14
15
|
ignoreKeys=["queryId"],
|
|
15
16
|
)
|
|
16
|
-
postParamHook = AddParametersOnParameters(
|
|
17
|
-
split=-1,
|
|
18
|
-
schemaType=None,
|
|
19
|
-
)
|
|
20
17
|
else:
|
|
18
|
+
# ["parameters"][0]["schema"]
|
|
21
19
|
getParamHook = AddParametersOnParameters(
|
|
22
20
|
split=-1,
|
|
23
21
|
schemaType="string",
|
|
24
22
|
ignoreKeys=["queryId"],
|
|
25
23
|
)
|
|
26
|
-
postParamHook = AddParametersOnBody(
|
|
27
|
-
split=-1,
|
|
28
|
-
schemaType=None,
|
|
29
|
-
contentType="application/json",
|
|
30
|
-
)
|
|
31
24
|
|
|
32
25
|
return {
|
|
33
26
|
"openapi": [AddSecuritySchemesOnSecuritySchemes()],
|
|
@@ -45,7 +38,11 @@ class Config:
|
|
|
45
38
|
key: [
|
|
46
39
|
SetResponsesHeader(suffix=None),
|
|
47
40
|
AddPathQueryIdOnParameters(split=-1),
|
|
48
|
-
|
|
41
|
+
AddParametersOnBody(
|
|
42
|
+
split=-1,
|
|
43
|
+
schemaType=None,
|
|
44
|
+
contentType="application/json",
|
|
45
|
+
),
|
|
49
46
|
]
|
|
50
47
|
for key in ["post"]
|
|
51
48
|
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
components:
|
|
2
|
-
schemas:
|
|
3
|
-
BookmarksResponse:
|
|
4
|
-
properties:
|
|
5
|
-
data:
|
|
6
|
-
$ref: '#/components/schemas/BookmarksResponseData'
|
|
7
|
-
required:
|
|
8
|
-
- data
|
|
9
|
-
BookmarksResponseData:
|
|
10
|
-
properties:
|
|
11
|
-
bookmark_timeline_v2:
|
|
12
|
-
$ref: '#/components/schemas/BookmarksTimeline'
|
|
13
|
-
required:
|
|
14
|
-
- bookmark_timeline_v2
|
|
15
|
-
BookmarksTimeline:
|
|
16
|
-
properties:
|
|
17
|
-
timeline:
|
|
18
|
-
$ref: ./../schemas/timeline.yaml#/components/schemas/Timeline
|
|
19
|
-
required:
|
|
20
|
-
- timeline
|
|
21
|
-
info:
|
|
22
|
-
title: Twitter OpenAPI
|
|
23
|
-
version: 0.0.1
|
|
24
|
-
openapi: 3.0.3
|
|
25
|
-
paths:
|
|
26
|
-
/graphql/{pathQueryId}/Bookmarks:
|
|
27
|
-
get:
|
|
28
|
-
description: get bookmarks
|
|
29
|
-
operationId: getBookmarks
|
|
30
|
-
parameters:
|
|
31
|
-
- in: path
|
|
32
|
-
name: pathQueryId
|
|
33
|
-
required: true
|
|
34
|
-
schema:
|
|
35
|
-
default: tmd4ifV8RHltzn8ymGg1aw
|
|
36
|
-
example: tmd4ifV8RHltzn8ymGg1aw
|
|
37
|
-
type: string
|
|
38
|
-
- in: query
|
|
39
|
-
name: variables
|
|
40
|
-
required: true
|
|
41
|
-
schema:
|
|
42
|
-
default: '{"count": 20, "includePromotedContent": true}'
|
|
43
|
-
example: '{"count": 20, "includePromotedContent": true}'
|
|
44
|
-
type: string
|
|
45
|
-
- in: query
|
|
46
|
-
name: features
|
|
47
|
-
required: true
|
|
48
|
-
schema:
|
|
49
|
-
default: '{"graphql_timeline_v2_bookmark_timeline": true, "blue_business_profile_image_shape_enabled":
|
|
50
|
-
true, "responsive_web_graphql_exclude_directive_enabled": true, "verified_phone_label_enabled":
|
|
51
|
-
false, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
52
|
-
false, "tweetypie_unmention_optimization_enabled": true, "vibe_api_enabled":
|
|
53
|
-
true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled":
|
|
54
|
-
true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
55
|
-
true, "tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
56
|
-
false, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
57
|
-
false, "interactive_text_enabled": true, "responsive_web_text_conversations_enabled":
|
|
58
|
-
false, "longform_notetweets_rich_text_read_enabled": true, "responsive_web_enhance_cards_enabled":
|
|
59
|
-
false}'
|
|
60
|
-
example: '{"graphql_timeline_v2_bookmark_timeline": true, "blue_business_profile_image_shape_enabled":
|
|
61
|
-
true, "responsive_web_graphql_exclude_directive_enabled": true, "verified_phone_label_enabled":
|
|
62
|
-
false, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
63
|
-
false, "tweetypie_unmention_optimization_enabled": true, "vibe_api_enabled":
|
|
64
|
-
true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled":
|
|
65
|
-
true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
66
|
-
true, "tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
67
|
-
false, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
68
|
-
false, "interactive_text_enabled": true, "responsive_web_text_conversations_enabled":
|
|
69
|
-
false, "longform_notetweets_rich_text_read_enabled": true, "responsive_web_enhance_cards_enabled":
|
|
70
|
-
false}'
|
|
71
|
-
type: string
|
|
72
|
-
responses:
|
|
73
|
-
'200':
|
|
74
|
-
content:
|
|
75
|
-
application/json:
|
|
76
|
-
schema:
|
|
77
|
-
oneOf:
|
|
78
|
-
- $ref: '#/components/schemas/BookmarksResponse'
|
|
79
|
-
- $ref: ./../schemas/error.yaml#/components/schemas/Errors
|
|
80
|
-
description: Successful operation
|
|
81
|
-
headers:
|
|
82
|
-
x-connection-hash:
|
|
83
|
-
schema:
|
|
84
|
-
type: string
|
|
85
|
-
x-rate-limit-limit:
|
|
86
|
-
schema:
|
|
87
|
-
type: integer
|
|
88
|
-
x-rate-limit-remaining:
|
|
89
|
-
schema:
|
|
90
|
-
type: integer
|
|
91
|
-
x-rate-limit-reset:
|
|
92
|
-
schema:
|
|
93
|
-
type: integer
|
|
94
|
-
x-response-time:
|
|
95
|
-
schema:
|
|
96
|
-
type: integer
|
|
97
|
-
x-tfe-preserve-body:
|
|
98
|
-
schema:
|
|
99
|
-
type: boolean
|
|
100
|
-
x-transaction-id:
|
|
101
|
-
schema:
|
|
102
|
-
type: string
|
|
103
|
-
x-twitter-response-tags:
|
|
104
|
-
schema:
|
|
105
|
-
type: string
|
|
106
|
-
tags:
|
|
107
|
-
- tweet
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
components:
|
|
2
|
-
schemas:
|
|
3
|
-
FollowResponse:
|
|
4
|
-
properties:
|
|
5
|
-
data:
|
|
6
|
-
$ref: '#/components/schemas/FollowResponseData'
|
|
7
|
-
required:
|
|
8
|
-
- data
|
|
9
|
-
FollowResponseData:
|
|
10
|
-
properties:
|
|
11
|
-
user:
|
|
12
|
-
$ref: '#/components/schemas/FollowResponseUser'
|
|
13
|
-
required:
|
|
14
|
-
- user
|
|
15
|
-
FollowResponseResult:
|
|
16
|
-
properties:
|
|
17
|
-
__typename:
|
|
18
|
-
$ref: ./../schemas/typename.yaml#/components/schemas/TypeName
|
|
19
|
-
timeline:
|
|
20
|
-
$ref: '#/components/schemas/FollowTimeline'
|
|
21
|
-
required:
|
|
22
|
-
- __typename
|
|
23
|
-
- timeline
|
|
24
|
-
FollowResponseUser:
|
|
25
|
-
properties:
|
|
26
|
-
result:
|
|
27
|
-
$ref: '#/components/schemas/FollowResponseResult'
|
|
28
|
-
required:
|
|
29
|
-
- result
|
|
30
|
-
FollowTimeline:
|
|
31
|
-
properties:
|
|
32
|
-
timeline:
|
|
33
|
-
$ref: ./../schemas/timeline.yaml#/components/schemas/Timeline
|
|
34
|
-
required:
|
|
35
|
-
- timeline
|
|
36
|
-
info:
|
|
37
|
-
title: Twitter OpenAPI
|
|
38
|
-
version: 0.0.1
|
|
39
|
-
openapi: 3.0.3
|
|
40
|
-
paths:
|
|
41
|
-
/graphql/{pathQueryId}/Followers:
|
|
42
|
-
get:
|
|
43
|
-
description: get user list of followers
|
|
44
|
-
operationId: getFollowers
|
|
45
|
-
parameters:
|
|
46
|
-
- in: path
|
|
47
|
-
name: pathQueryId
|
|
48
|
-
required: true
|
|
49
|
-
schema:
|
|
50
|
-
default: djdTXDIk2qhd4OStqlUFeQ
|
|
51
|
-
example: djdTXDIk2qhd4OStqlUFeQ
|
|
52
|
-
type: string
|
|
53
|
-
- in: query
|
|
54
|
-
name: variables
|
|
55
|
-
required: true
|
|
56
|
-
schema:
|
|
57
|
-
default: '{"userId": "44196397", "count": 20, "includePromotedContent":
|
|
58
|
-
false}'
|
|
59
|
-
example: '{"userId": "44196397", "count": 20, "includePromotedContent":
|
|
60
|
-
false}'
|
|
61
|
-
type: string
|
|
62
|
-
- in: query
|
|
63
|
-
name: features
|
|
64
|
-
required: true
|
|
65
|
-
schema:
|
|
66
|
-
default: '{"blue_business_profile_image_shape_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
|
67
|
-
true, "verified_phone_label_enabled": false, "responsive_web_graphql_timeline_navigation_enabled":
|
|
68
|
-
true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
69
|
-
false, "tweetypie_unmention_optimization_enabled": true, "vibe_api_enabled":
|
|
70
|
-
true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled":
|
|
71
|
-
true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
72
|
-
true, "tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
73
|
-
false, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
74
|
-
false, "interactive_text_enabled": true, "responsive_web_text_conversations_enabled":
|
|
75
|
-
false, "longform_notetweets_rich_text_read_enabled": true, "responsive_web_enhance_cards_enabled":
|
|
76
|
-
false}'
|
|
77
|
-
example: '{"blue_business_profile_image_shape_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
|
78
|
-
true, "verified_phone_label_enabled": false, "responsive_web_graphql_timeline_navigation_enabled":
|
|
79
|
-
true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
80
|
-
false, "tweetypie_unmention_optimization_enabled": true, "vibe_api_enabled":
|
|
81
|
-
true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled":
|
|
82
|
-
true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
83
|
-
true, "tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
84
|
-
false, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
85
|
-
false, "interactive_text_enabled": true, "responsive_web_text_conversations_enabled":
|
|
86
|
-
false, "longform_notetweets_rich_text_read_enabled": true, "responsive_web_enhance_cards_enabled":
|
|
87
|
-
false}'
|
|
88
|
-
type: string
|
|
89
|
-
responses:
|
|
90
|
-
'200':
|
|
91
|
-
content:
|
|
92
|
-
application/json:
|
|
93
|
-
schema:
|
|
94
|
-
oneOf:
|
|
95
|
-
- $ref: '#/components/schemas/FollowResponse'
|
|
96
|
-
- $ref: ./../schemas/error.yaml#/components/schemas/Errors
|
|
97
|
-
description: Successful operation
|
|
98
|
-
headers:
|
|
99
|
-
x-connection-hash:
|
|
100
|
-
schema:
|
|
101
|
-
type: string
|
|
102
|
-
x-rate-limit-limit:
|
|
103
|
-
schema:
|
|
104
|
-
type: integer
|
|
105
|
-
x-rate-limit-remaining:
|
|
106
|
-
schema:
|
|
107
|
-
type: integer
|
|
108
|
-
x-rate-limit-reset:
|
|
109
|
-
schema:
|
|
110
|
-
type: integer
|
|
111
|
-
x-response-time:
|
|
112
|
-
schema:
|
|
113
|
-
type: integer
|
|
114
|
-
x-tfe-preserve-body:
|
|
115
|
-
schema:
|
|
116
|
-
type: boolean
|
|
117
|
-
x-transaction-id:
|
|
118
|
-
schema:
|
|
119
|
-
type: string
|
|
120
|
-
x-twitter-response-tags:
|
|
121
|
-
schema:
|
|
122
|
-
type: string
|
|
123
|
-
tags:
|
|
124
|
-
- user-list
|
|
125
|
-
/graphql/{pathQueryId}/FollowersYouKnow:
|
|
126
|
-
get:
|
|
127
|
-
description: get followers you know
|
|
128
|
-
operationId: getFollowersYouKnow
|
|
129
|
-
parameters:
|
|
130
|
-
- in: path
|
|
131
|
-
name: pathQueryId
|
|
132
|
-
required: true
|
|
133
|
-
schema:
|
|
134
|
-
default: W9Iz6TVLymzCWjG2uOFKZg
|
|
135
|
-
example: W9Iz6TVLymzCWjG2uOFKZg
|
|
136
|
-
type: string
|
|
137
|
-
- in: query
|
|
138
|
-
name: variables
|
|
139
|
-
required: true
|
|
140
|
-
schema:
|
|
141
|
-
default: '{"userId": "44196397", "count": 20, "includePromotedContent":
|
|
142
|
-
false}'
|
|
143
|
-
example: '{"userId": "44196397", "count": 20, "includePromotedContent":
|
|
144
|
-
false}'
|
|
145
|
-
type: string
|
|
146
|
-
- in: query
|
|
147
|
-
name: features
|
|
148
|
-
required: true
|
|
149
|
-
schema:
|
|
150
|
-
default: '{"rweb_lists_timeline_redesign_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
|
151
|
-
true, "verified_phone_label_enabled": false, "creator_subscriptions_tweet_preview_api_enabled":
|
|
152
|
-
true, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
153
|
-
false, "tweetypie_unmention_optimization_enabled": true, "responsive_web_edit_tweet_api_enabled":
|
|
154
|
-
true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": true,
|
|
155
|
-
"view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
156
|
-
true, "responsive_web_twitter_article_tweet_consumption_enabled": false,
|
|
157
|
-
"tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
158
|
-
true, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
159
|
-
true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled":
|
|
160
|
-
true, "responsive_web_media_download_video_enabled": false, "responsive_web_enhance_cards_enabled":
|
|
161
|
-
false}'
|
|
162
|
-
example: '{"rweb_lists_timeline_redesign_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
|
163
|
-
true, "verified_phone_label_enabled": false, "creator_subscriptions_tweet_preview_api_enabled":
|
|
164
|
-
true, "responsive_web_graphql_timeline_navigation_enabled": true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
165
|
-
false, "tweetypie_unmention_optimization_enabled": true, "responsive_web_edit_tweet_api_enabled":
|
|
166
|
-
true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled": true,
|
|
167
|
-
"view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
168
|
-
true, "responsive_web_twitter_article_tweet_consumption_enabled": false,
|
|
169
|
-
"tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
170
|
-
true, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
171
|
-
true, "longform_notetweets_rich_text_read_enabled": true, "longform_notetweets_inline_media_enabled":
|
|
172
|
-
true, "responsive_web_media_download_video_enabled": false, "responsive_web_enhance_cards_enabled":
|
|
173
|
-
false}'
|
|
174
|
-
type: string
|
|
175
|
-
- in: query
|
|
176
|
-
name: fieldToggles
|
|
177
|
-
required: true
|
|
178
|
-
schema:
|
|
179
|
-
default: '{"withArticleRichContentState": false}'
|
|
180
|
-
example: '{"withArticleRichContentState": false}'
|
|
181
|
-
type: string
|
|
182
|
-
responses:
|
|
183
|
-
'200':
|
|
184
|
-
content:
|
|
185
|
-
application/json:
|
|
186
|
-
schema:
|
|
187
|
-
oneOf:
|
|
188
|
-
- $ref: '#/components/schemas/FollowResponse'
|
|
189
|
-
- $ref: ./../schemas/error.yaml#/components/schemas/Errors
|
|
190
|
-
description: Successful operation
|
|
191
|
-
headers:
|
|
192
|
-
x-connection-hash:
|
|
193
|
-
schema:
|
|
194
|
-
type: string
|
|
195
|
-
x-rate-limit-limit:
|
|
196
|
-
schema:
|
|
197
|
-
type: integer
|
|
198
|
-
x-rate-limit-remaining:
|
|
199
|
-
schema:
|
|
200
|
-
type: integer
|
|
201
|
-
x-rate-limit-reset:
|
|
202
|
-
schema:
|
|
203
|
-
type: integer
|
|
204
|
-
x-response-time:
|
|
205
|
-
schema:
|
|
206
|
-
type: integer
|
|
207
|
-
x-tfe-preserve-body:
|
|
208
|
-
schema:
|
|
209
|
-
type: boolean
|
|
210
|
-
x-transaction-id:
|
|
211
|
-
schema:
|
|
212
|
-
type: string
|
|
213
|
-
x-twitter-response-tags:
|
|
214
|
-
schema:
|
|
215
|
-
type: string
|
|
216
|
-
tags:
|
|
217
|
-
- user-list
|
|
218
|
-
/graphql/{pathQueryId}/Following:
|
|
219
|
-
get:
|
|
220
|
-
description: get user list of following
|
|
221
|
-
operationId: getFollowing
|
|
222
|
-
parameters:
|
|
223
|
-
- in: path
|
|
224
|
-
name: pathQueryId
|
|
225
|
-
required: true
|
|
226
|
-
schema:
|
|
227
|
-
default: IWP6Zt14sARO29lJT35bBw
|
|
228
|
-
example: IWP6Zt14sARO29lJT35bBw
|
|
229
|
-
type: string
|
|
230
|
-
- in: query
|
|
231
|
-
name: variables
|
|
232
|
-
required: true
|
|
233
|
-
schema:
|
|
234
|
-
default: '{"userId": "44196397", "count": 20, "includePromotedContent":
|
|
235
|
-
false}'
|
|
236
|
-
example: '{"userId": "44196397", "count": 20, "includePromotedContent":
|
|
237
|
-
false}'
|
|
238
|
-
type: string
|
|
239
|
-
- in: query
|
|
240
|
-
name: features
|
|
241
|
-
required: true
|
|
242
|
-
schema:
|
|
243
|
-
default: '{"blue_business_profile_image_shape_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
|
244
|
-
true, "verified_phone_label_enabled": false, "responsive_web_graphql_timeline_navigation_enabled":
|
|
245
|
-
true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
246
|
-
false, "tweetypie_unmention_optimization_enabled": true, "vibe_api_enabled":
|
|
247
|
-
true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled":
|
|
248
|
-
true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
249
|
-
true, "tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
250
|
-
false, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
251
|
-
false, "interactive_text_enabled": true, "responsive_web_text_conversations_enabled":
|
|
252
|
-
false, "longform_notetweets_rich_text_read_enabled": true, "responsive_web_enhance_cards_enabled":
|
|
253
|
-
false}'
|
|
254
|
-
example: '{"blue_business_profile_image_shape_enabled": true, "responsive_web_graphql_exclude_directive_enabled":
|
|
255
|
-
true, "verified_phone_label_enabled": false, "responsive_web_graphql_timeline_navigation_enabled":
|
|
256
|
-
true, "responsive_web_graphql_skip_user_profile_image_extensions_enabled":
|
|
257
|
-
false, "tweetypie_unmention_optimization_enabled": true, "vibe_api_enabled":
|
|
258
|
-
true, "responsive_web_edit_tweet_api_enabled": true, "graphql_is_translatable_rweb_tweet_is_translatable_enabled":
|
|
259
|
-
true, "view_counts_everywhere_api_enabled": true, "longform_notetweets_consumption_enabled":
|
|
260
|
-
true, "tweet_awards_web_tipping_enabled": false, "freedom_of_speech_not_reach_fetch_enabled":
|
|
261
|
-
false, "standardized_nudges_misinfo": true, "tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled":
|
|
262
|
-
false, "interactive_text_enabled": true, "responsive_web_text_conversations_enabled":
|
|
263
|
-
false, "longform_notetweets_rich_text_read_enabled": true, "responsive_web_enhance_cards_enabled":
|
|
264
|
-
false}'
|
|
265
|
-
type: string
|
|
266
|
-
responses:
|
|
267
|
-
'200':
|
|
268
|
-
content:
|
|
269
|
-
application/json:
|
|
270
|
-
schema:
|
|
271
|
-
oneOf:
|
|
272
|
-
- $ref: '#/components/schemas/FollowResponse'
|
|
273
|
-
- $ref: ./../schemas/error.yaml#/components/schemas/Errors
|
|
274
|
-
description: Successful operation
|
|
275
|
-
headers:
|
|
276
|
-
x-connection-hash:
|
|
277
|
-
schema:
|
|
278
|
-
type: string
|
|
279
|
-
x-rate-limit-limit:
|
|
280
|
-
schema:
|
|
281
|
-
type: integer
|
|
282
|
-
x-rate-limit-remaining:
|
|
283
|
-
schema:
|
|
284
|
-
type: integer
|
|
285
|
-
x-rate-limit-reset:
|
|
286
|
-
schema:
|
|
287
|
-
type: integer
|
|
288
|
-
x-response-time:
|
|
289
|
-
schema:
|
|
290
|
-
type: integer
|
|
291
|
-
x-tfe-preserve-body:
|
|
292
|
-
schema:
|
|
293
|
-
type: boolean
|
|
294
|
-
x-transaction-id:
|
|
295
|
-
schema:
|
|
296
|
-
type: string
|
|
297
|
-
x-twitter-response-tags:
|
|
298
|
-
schema:
|
|
299
|
-
type: string
|
|
300
|
-
tags:
|
|
301
|
-
- user-list
|