1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-12 08:00:27 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-04-20 02:22:47 +09:00
parent f08d92f949
commit 133cc17ed3
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
15 changed files with 13 additions and 13 deletions

View file

@ -0,0 +1,43 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{BookmarksQuery}}/Bookmarks:
get:
operationId: getBookmarks
description: get bookmarks
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/BookmarksResponse"
tags:
- "bookmark"
- "graphql"
components:
schemas:
BookmarksResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/BookmarksResponseData"
BookmarksResponseData:
required:
- "bookmark_timeline_v2"
properties:
bookmark_timeline_v2:
$ref: "#/components/schemas/BookmarksTimeline"
BookmarksTimeline:
required:
- "timeline"
properties:
timeline:
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"

View file

@ -0,0 +1,75 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{FollowingQuery}}/Following:
get:
operationId: getFollowers
description: get user list of followers
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/FollowResponse"
tags:
- "follow"
- "graphql"
/{{FollowersQuery}}/Followers:
get:
operationId: getFollowing
description: get user list of following
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/FollowResponse"
tags:
- "follow"
- "graphql"
components:
schemas:
FollowResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/FollowResponseData"
FollowResponseData:
required:
- "user"
properties:
user:
$ref: "#/components/schemas/FollowResponseUser"
FollowResponseUser:
required:
- "result"
properties:
result:
$ref: "#/components/schemas/FollowResponseResult"
FollowResponseResult:
required:
- "__typename"
- "timeline"
properties:
__typename:
$ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # User
timeline:
$ref: "#/components/schemas/FollowTimeline"
FollowTimeline:
required:
- "timeline"
properties:
timeline:
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"

View file

@ -0,0 +1,84 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{ProfileSpotlightsQueryQuery}}/ProfileSpotlightsQuery:
get:
operationId: getProfileSpotlightsQuery
description: "get user by screen name"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/ProfileResponse"
tags:
- "user"
- "graphql"
components:
schemas:
ProfileResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/ProfileResponseData"
ProfileResponseData:
required:
- "user_result_by_screen_name"
properties:
user_result_by_screen_name:
$ref: "#/components/schemas/UserResultByScreenName"
UserResultByScreenName:
required:
- "id"
- "result"
properties:
id:
type: string
pattern: "^[0-9a-zA-Z]+$"
result:
$ref: "#/components/schemas/UserResultByScreenNameResult"
UserResultByScreenNameResult:
required:
- "__typename"
- "id"
- "legacy"
- "profilemodules"
- "rest_id"
properties:
__typename:
$ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # User
id:
type: string
pattern: "^[0-9a-zA-Z=]+$"
legacy:
$ref: "#/components/schemas/UserResultByScreenNameLegacy"
profilemodules:
type: object # todo
rest_id:
type: string
pattern: "^[0-9]+$"
UserResultByScreenNameLegacy:
properties:
blocking:
type: boolean
blocked_by:
type: boolean
protected:
type: boolean
following:
type: boolean
followed_by:
type: boolean
name:
type: string
screen_name:
type: string

View file

@ -0,0 +1,104 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{HomeTimelineQuery}}/HomeTimeline:
get:
operationId: getHomeTimeline
description: get tweet list of timeline
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/TimelineResponse"
tags:
- "timeline"
- "login-required"
- "graphql"
/{{HomeLatestTimelineQuery}}/HomeLatestTimeline:
get:
operationId: getHomeLatestTimeline
description: get tweet list of timeline
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/TimelineResponse"
tags:
- "timeline"
- "login-required"
- "graphql"
/{{ListLatestTweetsTimelineQuery}}/ListLatestTweetsTimeline:
get:
operationId: getListLatestTweetsTimeline
description: get tweet list of timeline
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/ListTweetsTimelineResponse"
tags:
- "timeline"
- "login-required"
- "graphql"
components:
schemas:
TimelineResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/HomeTimelineResponseData"
HomeTimelineResponseData:
required:
- "home"
properties:
home:
$ref: "#/components/schemas/HomeTimelineHome"
HomeTimelineHome:
required:
- "home_timeline_urt"
properties:
home_timeline_urt:
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"
ListTweetsTimelineResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/ListTweetsTimelineData"
ListTweetsTimelineData:
required:
- "list"
properties:
list:
$ref: "#/components/schemas/ListTweetsTimelineList"
ListTweetsTimelineList:
required:
- "tweets_timeline"
properties:
tweets_timeline:
$ref: "#/components/schemas/ListTweetsTimeline"
ListTweetsTimeline:
required:
- "timeline"
properties:
timeline:
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"

View file

@ -0,0 +1,36 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{TweetDetailQuery}}/TweetDetail:
get:
operationId: getTweetDetail
description: get TweetDetail
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/TweetDetailResponse"
tags:
- "bookmark"
- "graphql"
components:
schemas:
TweetDetailResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/BookmarksResponseData"
BookmarksResponseData:
required:
- "threaded_conversation_with_injections_v2"
properties:
threaded_conversation_with_injections_v2:
$ref: "./../schemas/timeline.yaml#/components/schemas/Timeline"

View file

@ -0,0 +1,36 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{UserByScreenNameQuery}}/UserByScreenName:
get:
operationId: getUserByScreenName
description: "get user by screen name"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/UserResponse"
tags:
- "user"
- "graphql"
components:
schemas:
UserResponse:
required:
- "data"
properties:
data:
$ref: "#/components/schemas/UserResponseData"
UserResponseData:
required:
- "user"
properties:
user:
$ref: "./../schemas/user.yaml#/components/schemas/UserResults"

View file

@ -0,0 +1,98 @@
openapi: 3.0.3
info:
title: Twitter OpenAPI
version: 0.0.1
paths:
/{{UserTweetsQuery}}/UserTweets:
get:
operationId: getUserTweets
description: "get user tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/UserTweetsResponse"
tags:
- "user"
- "graphql"
/{{UserTweetsAndRepliesQuery}}/UserTweetsAndReplies:
get:
operationId: getUserTweetsAndReplies
description: "get user replies tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/UserTweetsResponse"
tags:
- "user"
- "graphql"
/{{UserMediaQuery}}/UserMedia:
get:
operationId: getUserMedia
description: "get user media tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/UserTweetsResponse"
tags:
- "user"
- "graphql"
/{{LikesQuery}}/Likes:
get:
operationId: getLikes
description: "get user likes tweets"
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/UserTweetsResponse"
tags:
- "user"
- "graphql"
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"