1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 15:40:26 +01:00
twitter-openapi/src/openapi/paths/usertweets.yaml
ふぁ 853709bb44
add error handling
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-31 18:16:36 +09:00

156 lines
4.1 KiB
YAML

openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/graphql/{pathQueryId}/UserTweets:
get:
operationId: getUserTweets
description: "get user tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags:
- "tweet"
/graphql/{pathQueryId}/UserTweetsAndReplies:
get:
operationId: getUserTweetsAndReplies
description: "get user replies tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags:
- "tweet"
/graphql/{pathQueryId}/UserHighlightsTweets:
get:
operationId: getUserHighlightsTweets
description: "get user highlights tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/UserHighlightsTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags:
- "tweet"
/graphql/{pathQueryId}/UserMedia:
get:
operationId: getUserMedia
description: "get user media tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags:
- "tweet"
/graphql/{pathQueryId}/Likes:
get:
operationId: getLikes
description: "get user likes tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/UserTweetsResponse"
- $ref: "./../schemas/error.yaml#/components/schemas/Errors"
tags:
- "tweet"
components:
schemas:
UserTweetsResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/UserTweetsData"
UserTweetsData:
required:
- "user"
properties:
user:
$ref: "#/components/schemas/UserTweetsUser"
UserTweetsUser:
required:
- "result"
properties:
result:
$ref: "#/components/schemas/UserTweetsResult"
UserTweetsResult:
required:
- "__typename"
- "timeline_v2"
properties:
__typename:
$ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # User
timeline_v2:
$ref: "./../schemas/timeline.yaml#/components/schemas/TimelineV2"
UserHighlightsTweetsResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/UserHighlightsTweetsData"
UserHighlightsTweetsData:
required:
- "user"
properties:
user:
$ref: "#/components/schemas/UserHighlightsTweetsUser"
UserHighlightsTweetsUser:
required:
- "result"
properties:
result:
$ref: "#/components/schemas/UserHighlightsTweetsResult"
UserHighlightsTweetsResult:
required:
- "timeline"
- "__typename"
properties:
timeline:
$ref: "#/components/schemas/UserHighlightsTweetsTimeline"
__typename:
$ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # User
UserHighlightsTweetsTimeline:
required:
- "timeline"
properties:
timeline:
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"