mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
fix error
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
ba853b81c7
commit
80186755aa
6 changed files with 47 additions and 9 deletions
11
dist/compatible/openapi-3.0.yaml
vendored
11
dist/compatible/openapi-3.0.yaml
vendored
|
|
@ -780,6 +780,8 @@ components:
|
||||||
type: object
|
type: object
|
||||||
Errors:
|
Errors:
|
||||||
properties:
|
properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/components/schemas/ErrorsData'
|
||||||
errors:
|
errors:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Error'
|
$ref: '#/components/schemas/Error'
|
||||||
|
|
@ -787,6 +789,12 @@ components:
|
||||||
required:
|
required:
|
||||||
- errors
|
- errors
|
||||||
type: object
|
type: object
|
||||||
|
ErrorsData:
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
pattern: dummy
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
ExtMediaAvailability:
|
ExtMediaAvailability:
|
||||||
properties:
|
properties:
|
||||||
reason:
|
reason:
|
||||||
|
|
@ -6578,8 +6586,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
oneOf:
|
$ref: '#/components/schemas/OtherResponse'
|
||||||
- $ref: '#/components/schemas/OtherResponse'
|
|
||||||
description: Successful operation
|
description: Successful operation
|
||||||
tags:
|
tags:
|
||||||
- other
|
- other
|
||||||
|
|
|
||||||
11
dist/compatible_discriminator/openapi-3.0.yaml
vendored
11
dist/compatible_discriminator/openapi-3.0.yaml
vendored
|
|
@ -780,6 +780,8 @@ components:
|
||||||
type: object
|
type: object
|
||||||
Errors:
|
Errors:
|
||||||
properties:
|
properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/components/schemas/ErrorsData'
|
||||||
errors:
|
errors:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Error'
|
$ref: '#/components/schemas/Error'
|
||||||
|
|
@ -787,6 +789,12 @@ components:
|
||||||
required:
|
required:
|
||||||
- errors
|
- errors
|
||||||
type: object
|
type: object
|
||||||
|
ErrorsData:
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
pattern: dummy
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
ExtMediaAvailability:
|
ExtMediaAvailability:
|
||||||
properties:
|
properties:
|
||||||
reason:
|
reason:
|
||||||
|
|
@ -6520,8 +6528,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
oneOf:
|
$ref: '#/components/schemas/OtherResponse'
|
||||||
- $ref: '#/components/schemas/OtherResponse'
|
|
||||||
description: Successful operation
|
description: Successful operation
|
||||||
tags:
|
tags:
|
||||||
- other
|
- other
|
||||||
|
|
|
||||||
11
dist/docs/openapi-3.0.yaml
vendored
11
dist/docs/openapi-3.0.yaml
vendored
|
|
@ -780,6 +780,8 @@ components:
|
||||||
type: object
|
type: object
|
||||||
Errors:
|
Errors:
|
||||||
properties:
|
properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/components/schemas/ErrorsData'
|
||||||
errors:
|
errors:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Error'
|
$ref: '#/components/schemas/Error'
|
||||||
|
|
@ -787,6 +789,12 @@ components:
|
||||||
required:
|
required:
|
||||||
- errors
|
- errors
|
||||||
type: object
|
type: object
|
||||||
|
ErrorsData:
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
pattern: dummy
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
ExtMediaAvailability:
|
ExtMediaAvailability:
|
||||||
properties:
|
properties:
|
||||||
reason:
|
reason:
|
||||||
|
|
@ -8687,8 +8695,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
oneOf:
|
$ref: '#/components/schemas/OtherResponse'
|
||||||
- $ref: '#/components/schemas/OtherResponse'
|
|
||||||
description: Successful operation
|
description: Successful operation
|
||||||
tags:
|
tags:
|
||||||
- other
|
- other
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
oneOf:
|
$ref: "#/components/schemas/OtherResponse"
|
||||||
- $ref: "#/components/schemas/OtherResponse"
|
|
||||||
tags:
|
tags:
|
||||||
- "other"
|
- "other"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,15 @@ components:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/Error"
|
$ref: "#/components/schemas/Error"
|
||||||
|
data:
|
||||||
|
$ref: "#/components/schemas/ErrorsData"
|
||||||
|
|
||||||
|
ErrorsData:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
type: string # always null
|
||||||
|
pattern: "dummy"
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
type: object
|
type: object
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import openapi_client as pt
|
import openapi_client as pt
|
||||||
|
import urllib3
|
||||||
|
|
||||||
|
|
||||||
def get_kwargs(key, additional):
|
def get_kwargs(key, additional):
|
||||||
|
|
@ -33,9 +34,17 @@ if __name__ == "__main__":
|
||||||
"GuestToken": cookies["gt"],
|
"GuestToken": cookies["gt"],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
latest_user_agent_res = urllib3.PoolManager().request(
|
||||||
|
"GET",
|
||||||
|
"https://raw.githubusercontent.com/fa0311/latest-user-agent/main/output.json",
|
||||||
|
)
|
||||||
|
|
||||||
|
latest_user_agent = json.loads(latest_user_agent_res.data.decode("utf-8"))
|
||||||
|
|
||||||
api_conf.access_token = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
api_conf.access_token = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
||||||
api_client = pt.ApiClient(configuration=api_conf, cookie=cookies_str)
|
api_client = pt.ApiClient(configuration=api_conf, cookie=cookies_str)
|
||||||
api_client.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
api_client.user_agent = latest_user_agent["chrome-fetch"]
|
||||||
|
|
||||||
pt.TweetApi(api_client).get_user_tweets_with_http_info(
|
pt.TweetApi(api_client).get_user_tweets_with_http_info(
|
||||||
**get_kwargs("UserTweets", {}),
|
**get_kwargs("UserTweets", {}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue