1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 07:30:37 +01:00

feat follow up #78

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2024-11-14 12:19:54 +09:00
parent 408fd99a69
commit 5a9695407e
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
2 changed files with 26 additions and 1 deletions

View file

@ -543,7 +543,7 @@ components:
delete_action_result:
$ref: "#/components/schemas/CommunityDeleteActionResult"
join_action_result:
$ref: "#/components/schemas/CommunityJoinActionResult"
$ref: "#/components/schemas/CommunityJoinActionUnion"
leave_action_result:
$ref: "#/components/schemas/CommunityLeaveActionResult"
pin_action_result:
@ -562,6 +562,16 @@ components:
type: string
enum: [Unavailable]
CommunityJoinActionUnion:
oneOf:
- $ref: "#/components/schemas/CommunityJoinActionResult"
- $ref: "#/components/schemas/CommunityJoinActionUnavailable"
discriminator:
propertyName: __typename
mapping: # deprecated
CommunityJoinAction: "#/components/schemas/CommunityJoinActionResult"
CommunityJoinActionUnavailable: "#/components/schemas/CommunityJoinActionUnavailable"
CommunityJoinActionResult:
required:
- "__typename"
@ -569,6 +579,20 @@ components:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityJoinAction
CommunityJoinActionUnavailable:
required:
- "__typename"
- "reason"
- "message"
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityJoinActionUnavailable
reason:
type: string
enum: [ViewerRequestRequired]
message:
type: string
CommunityLeaveActionResult:
required:
- "__typename"

View file

@ -376,6 +376,7 @@ if __name__ == "__main__":
"1349129669258448897",
"1810188416812019999",
"1851981523207299417",
"1853879226987901408",
]
for id in ids:
try: