twitter-openapi-typescript-generated 0.0.1 → 0.0.2
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-ignore +1 -2
- package/README.md +2 -2
- package/package.json +25 -26
- package/tools/openapi-generator-config.yaml +10 -0
- package/tools/win/clean.ps1 +21 -0
- package/tools/win/gen.ps1 +8 -0
- package/tools/win/init.ps1 +1 -0
- package/tools/win/replace.py +40 -0
- package/twitter-openapi/.vscode/extensions.json +3 -0
- package/twitter-openapi/.vscode/settings.json +9 -0
- package/twitter-openapi/LICENSE.txt +661 -0
- package/twitter-openapi/README.md +38 -0
- package/twitter-openapi/dist/dart/openapi-3.0.yaml +111 -0
- package/twitter-openapi/dist/dart/paths/bookmarks.yaml +134 -0
- package/twitter-openapi/dist/dart/paths/follow.yaml +262 -0
- package/twitter-openapi/dist/dart/paths/other.yaml +96 -0
- package/twitter-openapi/dist/dart/paths/post.yaml +834 -0
- package/twitter-openapi/dist/dart/paths/profile.yaml +152 -0
- package/twitter-openapi/dist/dart/paths/timeline.yaml +380 -0
- package/twitter-openapi/dist/dart/paths/tweet.yaml +134 -0
- package/twitter-openapi/dist/dart/paths/user.yaml +112 -0
- package/twitter-openapi/dist/dart/paths/usertweets.yaml +484 -0
- package/twitter-openapi/dist/dart/paths/v1.1-get.yaml +300 -0
- package/twitter-openapi/dist/dart/paths/v1.1-post.yaml +295 -0
- package/twitter-openapi/dist/dart/paths/v2.0-get.yaml +331 -0
- package/twitter-openapi/dist/dart/response/error.yaml +90 -0
- package/twitter-openapi/dist/dart/schemas/content.yaml +181 -0
- package/twitter-openapi/dist/dart/schemas/general.yaml +13 -0
- package/twitter-openapi/dist/dart/schemas/instruction.yaml +83 -0
- package/twitter-openapi/dist/dart/schemas/timeline.yaml +25 -0
- package/twitter-openapi/dist/dart/schemas/tweet.yaml +251 -0
- package/twitter-openapi/dist/dart/schemas/typename.yaml +19 -0
- package/twitter-openapi/dist/dart/schemas/user.yaml +206 -0
- package/twitter-openapi/dist/docs/openapi-3.0.yaml +135 -0
- package/twitter-openapi/dist/docs/paths/bookmarks.yaml +248 -0
- package/twitter-openapi/dist/docs/paths/follow.yaml +486 -0
- package/twitter-openapi/dist/docs/paths/other.yaml +96 -0
- package/twitter-openapi/dist/docs/paths/post.yaml +638 -0
- package/twitter-openapi/dist/docs/paths/profile.yaml +159 -0
- package/twitter-openapi/dist/docs/paths/timeline.yaml +730 -0
- package/twitter-openapi/dist/docs/paths/tweet.yaml +272 -0
- package/twitter-openapi/dist/docs/paths/user.yaml +152 -0
- package/twitter-openapi/dist/docs/paths/usertweets.yaml +1010 -0
- package/twitter-openapi/dist/docs/paths/v1.1-get.yaml +242 -0
- package/twitter-openapi/dist/docs/paths/v1.1-post.yaml +237 -0
- package/twitter-openapi/dist/docs/paths/v2.0-get.yaml +302 -0
- package/twitter-openapi/dist/docs/response/error.yaml +90 -0
- package/twitter-openapi/dist/docs/schemas/content.yaml +181 -0
- package/twitter-openapi/dist/docs/schemas/general.yaml +13 -0
- package/twitter-openapi/dist/docs/schemas/instruction.yaml +83 -0
- package/twitter-openapi/dist/docs/schemas/timeline.yaml +25 -0
- package/twitter-openapi/dist/docs/schemas/tweet.yaml +251 -0
- package/twitter-openapi/dist/docs/schemas/typename.yaml +19 -0
- package/twitter-openapi/dist/docs/schemas/user.yaml +206 -0
- package/twitter-openapi/dist/test/openapi-3.0.yaml +135 -0
- package/twitter-openapi/dist/test/paths/bookmarks.yaml +105 -0
- package/twitter-openapi/dist/test/paths/follow.yaml +204 -0
- package/twitter-openapi/dist/test/paths/other.yaml +96 -0
- package/twitter-openapi/dist/test/paths/post.yaml +485 -0
- package/twitter-openapi/dist/test/paths/profile.yaml +123 -0
- package/twitter-openapi/dist/test/paths/timeline.yaml +293 -0
- package/twitter-openapi/dist/test/paths/tweet.yaml +105 -0
- package/twitter-openapi/dist/test/paths/user.yaml +83 -0
- package/twitter-openapi/dist/test/paths/usertweets.yaml +368 -0
- package/twitter-openapi/dist/test/paths/v1.1-get.yaml +242 -0
- package/twitter-openapi/dist/test/paths/v1.1-post.yaml +277 -0
- package/twitter-openapi/dist/test/paths/v2.0-get.yaml +302 -0
- package/twitter-openapi/dist/test/response/error.yaml +90 -0
- package/twitter-openapi/dist/test/schemas/content.yaml +181 -0
- package/twitter-openapi/dist/test/schemas/general.yaml +13 -0
- package/twitter-openapi/dist/test/schemas/instruction.yaml +83 -0
- package/twitter-openapi/dist/test/schemas/timeline.yaml +25 -0
- package/twitter-openapi/dist/test/schemas/tweet.yaml +251 -0
- package/twitter-openapi/dist/test/schemas/typename.yaml +19 -0
- package/twitter-openapi/dist/test/schemas/user.yaml +206 -0
- package/twitter-openapi/dist/typescript/openapi-3.0.yaml +135 -0
- package/twitter-openapi/dist/typescript/paths/bookmarks.yaml +105 -0
- package/twitter-openapi/dist/typescript/paths/follow.yaml +204 -0
- package/twitter-openapi/dist/typescript/paths/other.yaml +96 -0
- package/twitter-openapi/dist/typescript/paths/post.yaml +660 -0
- package/twitter-openapi/dist/typescript/paths/profile.yaml +123 -0
- package/twitter-openapi/dist/typescript/paths/timeline.yaml +293 -0
- package/twitter-openapi/dist/typescript/paths/tweet.yaml +105 -0
- package/twitter-openapi/dist/typescript/paths/user.yaml +83 -0
- package/twitter-openapi/dist/typescript/paths/usertweets.yaml +368 -0
- package/twitter-openapi/dist/typescript/paths/v1.1-get.yaml +242 -0
- package/twitter-openapi/dist/typescript/paths/v1.1-post.yaml +237 -0
- package/twitter-openapi/dist/typescript/paths/v2.0-get.yaml +302 -0
- package/twitter-openapi/dist/typescript/response/error.yaml +90 -0
- package/twitter-openapi/dist/typescript/schemas/content.yaml +181 -0
- package/twitter-openapi/dist/typescript/schemas/general.yaml +13 -0
- package/twitter-openapi/dist/typescript/schemas/instruction.yaml +83 -0
- package/twitter-openapi/dist/typescript/schemas/timeline.yaml +25 -0
- package/twitter-openapi/dist/typescript/schemas/tweet.yaml +251 -0
- package/twitter-openapi/dist/typescript/schemas/typename.yaml +19 -0
- package/twitter-openapi/dist/typescript/schemas/user.yaml +206 -0
- package/twitter-openapi/requirements.txt +0 -0
- package/twitter-openapi/src/config/component/response_header.yaml +32 -0
- package/twitter-openapi/src/config/component/response_header_legacy.yaml +35 -0
- package/twitter-openapi/src/config/component/security_schemes.yaml +67 -0
- package/twitter-openapi/src/config/placeholder.json +535 -0
- package/twitter-openapi/src/openapi/openapi-3.0.yaml +68 -0
- package/twitter-openapi/src/openapi/paths/bookmarks.yaml +42 -0
- package/twitter-openapi/src/openapi/paths/follow.yaml +73 -0
- package/twitter-openapi/src/openapi/paths/other.yaml +101 -0
- package/twitter-openapi/src/openapi/paths/post.yaml +246 -0
- package/twitter-openapi/src/openapi/paths/profile.yaml +81 -0
- package/twitter-openapi/src/openapi/paths/timeline.yaml +98 -0
- package/twitter-openapi/src/openapi/paths/tweet.yaml +35 -0
- package/twitter-openapi/src/openapi/paths/user.yaml +35 -0
- package/twitter-openapi/src/openapi/paths/usertweets.yaml +94 -0
- package/twitter-openapi/src/openapi/paths/v1.1-get.yaml +25 -0
- package/twitter-openapi/src/openapi/paths/v1.1-post.yaml +25 -0
- package/twitter-openapi/src/openapi/paths/v2.0-get.yaml +15 -0
- package/twitter-openapi/src/openapi/response/error.yaml +97 -0
- package/twitter-openapi/src/openapi/schemas/content.yaml +190 -0
- package/twitter-openapi/src/openapi/schemas/general.yaml +12 -0
- package/twitter-openapi/src/openapi/schemas/instruction.yaml +90 -0
- package/twitter-openapi/src/openapi/schemas/timeline.yaml +27 -0
- package/twitter-openapi/src/openapi/schemas/tweet.yaml +264 -0
- package/twitter-openapi/src/openapi/schemas/typename.yaml +21 -0
- package/twitter-openapi/src/openapi/schemas/user.yaml +210 -0
- 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 +79 -0
- package/twitter-openapi/tools/build_config.py +200 -0
- package/twitter-openapi/tools/hooks.py +265 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## twitter-openapi-typescript-generated@0.0.
|
|
1
|
+
## twitter-openapi-typescript-generated@0.0.2
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install twitter-openapi-typescript-generated@0.0.
|
|
39
|
+
npm install twitter-openapi-typescript-generated@0.0.2 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/package.json
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "twitter-openapi-typescript-generated",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "OpenAPI client for twitter-openapi-typescript-generated",
|
|
5
|
-
"author": "
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "twitter-openapi-typescript-generated",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "OpenAPI client for twitter-openapi-typescript-generated",
|
|
5
|
+
"author": "fa0311",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/fa0311/twitter-openapi-typescript.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"typings": "./dist/index.d.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"prepare": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "^4.0"
|
|
18
|
+
},
|
|
19
|
+
"license": "LGPL-3.0-only",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"twitter",
|
|
22
|
+
"api",
|
|
23
|
+
"typescript"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
inputSpec: twitter-openapi/dist/typescript/openapi-3.0.yaml
|
|
2
|
+
outputDir: .
|
|
3
|
+
npmName: twitter-openapi-typescript-generated
|
|
4
|
+
npmVersion: 0.0.2
|
|
5
|
+
|
|
6
|
+
# withoutRuntimeChecks: false
|
|
7
|
+
legacyDiscriminatorBehavior: false
|
|
8
|
+
# modelPropertyNaming: original
|
|
9
|
+
# stringEnums: true
|
|
10
|
+
# paramNaming: original
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Remove-Item -Recurse .openapi-generator
|
|
2
|
+
# Remove-Item -Recurse .gitignore
|
|
3
|
+
# Remove-Item -Recurse .npmignore
|
|
4
|
+
# Remove-Item -Recurse api.ts
|
|
5
|
+
# Remove-Item -Recurse base.ts
|
|
6
|
+
# Remove-Item -Recurse common.ts
|
|
7
|
+
# Remove-Item -Recurse configuration.ts
|
|
8
|
+
# Remove-Item -Recurse git_push.sh
|
|
9
|
+
# Remove-Item -Recurse index.ts
|
|
10
|
+
|
|
11
|
+
Remove-Item -Recurse .openapi-generator
|
|
12
|
+
Remove-Item -Recurse src
|
|
13
|
+
Remove-Item -Recurse .gitignore
|
|
14
|
+
Remove-Item -Recurse .npmignore
|
|
15
|
+
Remove-Item -Recurse package.json
|
|
16
|
+
Remove-Item -Recurse README.md
|
|
17
|
+
Remove-Item -Recurse tsconfig.json
|
|
18
|
+
Remove-Item -Recurse dist
|
|
19
|
+
|
|
20
|
+
# Remove-Item -Recurse package-lock.json
|
|
21
|
+
# Remove-Item -Recurse node_modules
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
./twitter-openapi/.venv/Scripts/Activate.ps1
|
|
3
|
+
Start-Process -FilePath "python" -ArgumentList "tools/build.py" -WorkingDirectory "twitter-openapi" -Wait -NoNewWindow
|
|
4
|
+
|
|
5
|
+
tools/win/clean.ps1
|
|
6
|
+
java -jar tools/openapi-generator-cli.jar generate -g typescript-fetch -c tools/openapi-generator-config.yaml --git-repo-id twitter-openapi-typescript --git-user-id fa0311
|
|
7
|
+
python tools/win/replace.py
|
|
8
|
+
npm install
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Invoke-WebRequest -OutFile tools/openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import glob
|
|
2
|
+
import json
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
for file in glob.glob("src/**/*.ts", recursive=True):
|
|
6
|
+
with open(file, mode="r", encoding="utf-8") as f:
|
|
7
|
+
text = f.read()
|
|
8
|
+
|
|
9
|
+
text = text.replace("json['typename']", "json['__typename']")
|
|
10
|
+
text = text.replace("json['typename']", "json['__typename']")
|
|
11
|
+
|
|
12
|
+
with open(file, mode="w", encoding="utf-8") as f:
|
|
13
|
+
f.write(text)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
with open(file, mode="r", encoding="utf-8") as f:
|
|
18
|
+
text = f.read()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
with open("package.json", mode="r", encoding="utf-8") as f:
|
|
22
|
+
package = json.load(f)
|
|
23
|
+
|
|
24
|
+
package.update({
|
|
25
|
+
"author": "fa0311",
|
|
26
|
+
"license": "LGPL-3.0-only",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/fa0311/twitter-openapi-typescript.git"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"twitter",
|
|
33
|
+
"api",
|
|
34
|
+
"typescript"
|
|
35
|
+
],
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
with open("package.json", mode="w", encoding="utf-8") as f:
|
|
40
|
+
json.dump(package, f, ensure_ascii=False, indent=2)
|