mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
Merge pull request #48 from fa0311/dev
add inline_media with note tweet
This commit is contained in:
commit
23363a697a
4 changed files with 47 additions and 25 deletions
12
dist/compatible/openapi-3.0.yaml
vendored
12
dist/compatible/openapi-3.0.yaml
vendored
|
|
@ -807,10 +807,20 @@ components:
|
|||
properties:
|
||||
inline_media:
|
||||
items:
|
||||
type: object
|
||||
$ref: '#/components/schemas/NoteTweetResultMediaInlineMedia'
|
||||
type: array
|
||||
required:
|
||||
- inline_media
|
||||
NoteTweetResultMediaInlineMedia:
|
||||
properties:
|
||||
index:
|
||||
type: integer
|
||||
media_id:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
required:
|
||||
- media_id
|
||||
- index
|
||||
NoteTweetResultRichText:
|
||||
properties:
|
||||
richtext_tags:
|
||||
|
|
|
|||
12
dist/docs/openapi-3.0.yaml
vendored
12
dist/docs/openapi-3.0.yaml
vendored
|
|
@ -807,10 +807,20 @@ components:
|
|||
properties:
|
||||
inline_media:
|
||||
items:
|
||||
type: object
|
||||
$ref: '#/components/schemas/NoteTweetResultMediaInlineMedia'
|
||||
type: array
|
||||
required:
|
||||
- inline_media
|
||||
NoteTweetResultMediaInlineMedia:
|
||||
properties:
|
||||
index:
|
||||
type: integer
|
||||
media_id:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
required:
|
||||
- media_id
|
||||
- index
|
||||
NoteTweetResultRichText:
|
||||
properties:
|
||||
richtext_tags:
|
||||
|
|
|
|||
|
|
@ -182,7 +182,19 @@ components:
|
|||
inline_media:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
$ref: "#/components/schemas/NoteTweetResultMediaInlineMedia"
|
||||
|
||||
NoteTweetResultMediaInlineMedia:
|
||||
required:
|
||||
- "media_id"
|
||||
- "index"
|
||||
properties:
|
||||
media_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
index:
|
||||
type: integer
|
||||
|
||||
NoteTweetResultRichText:
|
||||
required:
|
||||
- "richtext_tags"
|
||||
|
|
|
|||
|
|
@ -256,21 +256,11 @@ if __name__ == "__main__":
|
|||
error_dump(e)
|
||||
error_count += 1
|
||||
|
||||
ids = ["1720975693524377759", "1720818185186791678", "1721006592303251551"]
|
||||
for id in ids:
|
||||
try:
|
||||
logger.info(f"Try: Self TweetDetail Test")
|
||||
kwargs = get_kwargs("TweetDetail", {"focalTweetId": "1720975693524377759"})
|
||||
res = pt.TweetApi(api_client).get_tweet_detail_with_http_info(**kwargs)
|
||||
data = res.data.to_dict()
|
||||
|
||||
rate = match_rate(data, json.loads(res.raw_data))
|
||||
logger.info(f"Match rate: {rate}")
|
||||
except Exception as e:
|
||||
error_dump(e)
|
||||
error_count += 1
|
||||
|
||||
try:
|
||||
logger.info(f"Try: Self TweetDetail Test")
|
||||
kwargs = get_kwargs("TweetDetail", {"focalTweetId": "1720818185186791678"})
|
||||
logger.info(f"Try: Self TweetDetail {id} Test")
|
||||
kwargs = get_kwargs("TweetDetail", {"focalTweetId": id})
|
||||
res = pt.TweetApi(api_client).get_tweet_detail_with_http_info(**kwargs)
|
||||
data = res.data.to_dict()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue