mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
add window.__INITIAL_STATE__
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
dbd4f43bb7
commit
5007b97d01
11 changed files with 521 additions and 4 deletions
4
dist/dart/openapi-3.0.yaml
vendored
4
dist/dart/openapi-3.0.yaml
vendored
|
|
@ -81,6 +81,8 @@ paths:
|
|||
$ref: ./paths/tweet.yaml#/paths/~1graphql~1wNNG8DBB8EaXw1lq4vFWGA~1TweetDetail
|
||||
/graphql/zhX91JE87mWvfprhYE97xA/HomeLatestTimeline:
|
||||
$ref: ./paths/timeline.yaml#/paths/~1graphql~1zhX91JE87mWvfprhYE97xA~1HomeLatestTimeline
|
||||
/other:
|
||||
$ref: ./paths/other.yaml#/paths/~1other
|
||||
security:
|
||||
- bearerAuth: []
|
||||
- CsrfToken: []
|
||||
|
|
@ -108,3 +110,5 @@ tags:
|
|||
name: v2.0-get
|
||||
- description: legacy APIs post
|
||||
name: v2.0-post
|
||||
- description: other
|
||||
name: other
|
||||
|
|
|
|||
98
dist/dart/paths/other.yaml
vendored
Normal file
98
dist/dart/paths/other.yaml
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
components:
|
||||
schemas:
|
||||
CommunitiesActions:
|
||||
properties:
|
||||
create:
|
||||
type: boolean
|
||||
required:
|
||||
- create
|
||||
type: object
|
||||
OneFactorLoginEligibility:
|
||||
properties:
|
||||
fetchStatus:
|
||||
type: string
|
||||
required:
|
||||
- fetchStatus
|
||||
type: object
|
||||
OtherResponse:
|
||||
properties:
|
||||
session:
|
||||
$ref: '#/components/schemas/Session'
|
||||
required:
|
||||
- session
|
||||
type: object
|
||||
Session:
|
||||
properties:
|
||||
SsoInitTokens:
|
||||
type: object
|
||||
communitiesActions:
|
||||
$ref: '#/components/schemas/CommunitiesActions'
|
||||
country:
|
||||
pattern: ^[A-Z]{2}$
|
||||
type: string
|
||||
guestId:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
hasCommunityMemberships:
|
||||
type: boolean
|
||||
isActiveCreator:
|
||||
type: boolean
|
||||
isRestrictedSession:
|
||||
type: boolean
|
||||
isSuperFollowSubscriber:
|
||||
type: boolean
|
||||
language:
|
||||
pattern: ^[a-z]{2}$
|
||||
type: string
|
||||
oneFactorLoginEligibility:
|
||||
$ref: '#/components/schemas/OneFactorLoginEligibility'
|
||||
superFollowersCount:
|
||||
type: integer
|
||||
superFollowsApplicationStatus:
|
||||
type: string
|
||||
userFeatures:
|
||||
$ref: '#/components/schemas/UserFeatures'
|
||||
user_id:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
required:
|
||||
- country
|
||||
- communitiesActions
|
||||
- isActiveCreator
|
||||
- isRestrictedSession
|
||||
- guestId
|
||||
- hasCommunityMemberships
|
||||
- language
|
||||
- oneFactorLoginEligibility
|
||||
- ssoInitTokens
|
||||
- superFollowersCount
|
||||
- superFollowsApplicationStatus
|
||||
- user_id
|
||||
- userFeatures
|
||||
- isSuperFollowSubscriber
|
||||
type: object
|
||||
UserFeatures:
|
||||
properties:
|
||||
mediatool_studio_library:
|
||||
type: boolean
|
||||
required:
|
||||
- mediatool_studio_library
|
||||
type: object
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/other:
|
||||
get:
|
||||
description: This is not an actual endpoint
|
||||
operationId: other
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OtherResponse'
|
||||
description: Successful operation
|
||||
tags:
|
||||
- other
|
||||
4
dist/docs/openapi-3.0.yaml
vendored
4
dist/docs/openapi-3.0.yaml
vendored
|
|
@ -101,6 +101,8 @@ paths:
|
|||
$ref: ./paths/tweet.yaml#/paths/~1graphql~1wNNG8DBB8EaXw1lq4vFWGA~1TweetDetail
|
||||
/graphql/zhX91JE87mWvfprhYE97xA/HomeLatestTimeline:
|
||||
$ref: ./paths/timeline.yaml#/paths/~1graphql~1zhX91JE87mWvfprhYE97xA~1HomeLatestTimeline
|
||||
/other:
|
||||
$ref: ./paths/other.yaml#/paths/~1other
|
||||
security:
|
||||
- bearerAuth: []
|
||||
- CsrfToken: []
|
||||
|
|
@ -128,3 +130,5 @@ tags:
|
|||
name: v2.0-get
|
||||
- description: legacy APIs post
|
||||
name: v2.0-post
|
||||
- description: other
|
||||
name: other
|
||||
|
|
|
|||
98
dist/docs/paths/other.yaml
vendored
Normal file
98
dist/docs/paths/other.yaml
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
components:
|
||||
schemas:
|
||||
CommunitiesActions:
|
||||
properties:
|
||||
create:
|
||||
type: boolean
|
||||
required:
|
||||
- create
|
||||
type: object
|
||||
OneFactorLoginEligibility:
|
||||
properties:
|
||||
fetchStatus:
|
||||
type: string
|
||||
required:
|
||||
- fetchStatus
|
||||
type: object
|
||||
OtherResponse:
|
||||
properties:
|
||||
session:
|
||||
$ref: '#/components/schemas/Session'
|
||||
required:
|
||||
- session
|
||||
type: object
|
||||
Session:
|
||||
properties:
|
||||
SsoInitTokens:
|
||||
type: object
|
||||
communitiesActions:
|
||||
$ref: '#/components/schemas/CommunitiesActions'
|
||||
country:
|
||||
pattern: ^[A-Z]{2}$
|
||||
type: string
|
||||
guestId:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
hasCommunityMemberships:
|
||||
type: boolean
|
||||
isActiveCreator:
|
||||
type: boolean
|
||||
isRestrictedSession:
|
||||
type: boolean
|
||||
isSuperFollowSubscriber:
|
||||
type: boolean
|
||||
language:
|
||||
pattern: ^[a-z]{2}$
|
||||
type: string
|
||||
oneFactorLoginEligibility:
|
||||
$ref: '#/components/schemas/OneFactorLoginEligibility'
|
||||
superFollowersCount:
|
||||
type: integer
|
||||
superFollowsApplicationStatus:
|
||||
type: string
|
||||
userFeatures:
|
||||
$ref: '#/components/schemas/UserFeatures'
|
||||
user_id:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
required:
|
||||
- country
|
||||
- communitiesActions
|
||||
- isActiveCreator
|
||||
- isRestrictedSession
|
||||
- guestId
|
||||
- hasCommunityMemberships
|
||||
- language
|
||||
- oneFactorLoginEligibility
|
||||
- ssoInitTokens
|
||||
- superFollowersCount
|
||||
- superFollowsApplicationStatus
|
||||
- user_id
|
||||
- userFeatures
|
||||
- isSuperFollowSubscriber
|
||||
type: object
|
||||
UserFeatures:
|
||||
properties:
|
||||
mediatool_studio_library:
|
||||
type: boolean
|
||||
required:
|
||||
- mediatool_studio_library
|
||||
type: object
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/other:
|
||||
get:
|
||||
description: This is not an actual endpoint
|
||||
operationId: other
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OtherResponse'
|
||||
description: Successful operation
|
||||
tags:
|
||||
- other
|
||||
4
dist/test/openapi-3.0.yaml
vendored
4
dist/test/openapi-3.0.yaml
vendored
|
|
@ -101,6 +101,8 @@ paths:
|
|||
$ref: ./paths/tweet.yaml#/paths/~1graphql~1wNNG8DBB8EaXw1lq4vFWGA~1TweetDetail
|
||||
/graphql/zhX91JE87mWvfprhYE97xA/HomeLatestTimeline:
|
||||
$ref: ./paths/timeline.yaml#/paths/~1graphql~1zhX91JE87mWvfprhYE97xA~1HomeLatestTimeline
|
||||
/other:
|
||||
$ref: ./paths/other.yaml#/paths/~1other
|
||||
security:
|
||||
- bearerAuth: []
|
||||
- CsrfToken: []
|
||||
|
|
@ -128,3 +130,5 @@ tags:
|
|||
name: v2.0-get
|
||||
- description: legacy APIs post
|
||||
name: v2.0-post
|
||||
- description: other
|
||||
name: other
|
||||
|
|
|
|||
98
dist/test/paths/other.yaml
vendored
Normal file
98
dist/test/paths/other.yaml
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
components:
|
||||
schemas:
|
||||
CommunitiesActions:
|
||||
properties:
|
||||
create:
|
||||
type: boolean
|
||||
required:
|
||||
- create
|
||||
type: object
|
||||
OneFactorLoginEligibility:
|
||||
properties:
|
||||
fetchStatus:
|
||||
type: string
|
||||
required:
|
||||
- fetchStatus
|
||||
type: object
|
||||
OtherResponse:
|
||||
properties:
|
||||
session:
|
||||
$ref: '#/components/schemas/Session'
|
||||
required:
|
||||
- session
|
||||
type: object
|
||||
Session:
|
||||
properties:
|
||||
SsoInitTokens:
|
||||
type: object
|
||||
communitiesActions:
|
||||
$ref: '#/components/schemas/CommunitiesActions'
|
||||
country:
|
||||
pattern: ^[A-Z]{2}$
|
||||
type: string
|
||||
guestId:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
hasCommunityMemberships:
|
||||
type: boolean
|
||||
isActiveCreator:
|
||||
type: boolean
|
||||
isRestrictedSession:
|
||||
type: boolean
|
||||
isSuperFollowSubscriber:
|
||||
type: boolean
|
||||
language:
|
||||
pattern: ^[a-z]{2}$
|
||||
type: string
|
||||
oneFactorLoginEligibility:
|
||||
$ref: '#/components/schemas/OneFactorLoginEligibility'
|
||||
superFollowersCount:
|
||||
type: integer
|
||||
superFollowsApplicationStatus:
|
||||
type: string
|
||||
userFeatures:
|
||||
$ref: '#/components/schemas/UserFeatures'
|
||||
user_id:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
required:
|
||||
- country
|
||||
- communitiesActions
|
||||
- isActiveCreator
|
||||
- isRestrictedSession
|
||||
- guestId
|
||||
- hasCommunityMemberships
|
||||
- language
|
||||
- oneFactorLoginEligibility
|
||||
- ssoInitTokens
|
||||
- superFollowersCount
|
||||
- superFollowsApplicationStatus
|
||||
- user_id
|
||||
- userFeatures
|
||||
- isSuperFollowSubscriber
|
||||
type: object
|
||||
UserFeatures:
|
||||
properties:
|
||||
mediatool_studio_library:
|
||||
type: boolean
|
||||
required:
|
||||
- mediatool_studio_library
|
||||
type: object
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/other:
|
||||
get:
|
||||
description: This is not an actual endpoint
|
||||
operationId: other
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OtherResponse'
|
||||
description: Successful operation
|
||||
tags:
|
||||
- other
|
||||
4
dist/typescript/openapi-3.0.yaml
vendored
4
dist/typescript/openapi-3.0.yaml
vendored
|
|
@ -101,6 +101,8 @@ paths:
|
|||
$ref: ./paths/tweet.yaml#/paths/~1graphql~1wNNG8DBB8EaXw1lq4vFWGA~1TweetDetail
|
||||
/graphql/zhX91JE87mWvfprhYE97xA/HomeLatestTimeline:
|
||||
$ref: ./paths/timeline.yaml#/paths/~1graphql~1zhX91JE87mWvfprhYE97xA~1HomeLatestTimeline
|
||||
/other:
|
||||
$ref: ./paths/other.yaml#/paths/~1other
|
||||
security:
|
||||
- bearerAuth: []
|
||||
- CsrfToken: []
|
||||
|
|
@ -128,3 +130,5 @@ tags:
|
|||
name: v2.0-get
|
||||
- description: legacy APIs post
|
||||
name: v2.0-post
|
||||
- description: other
|
||||
name: other
|
||||
|
|
|
|||
98
dist/typescript/paths/other.yaml
vendored
Normal file
98
dist/typescript/paths/other.yaml
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
components:
|
||||
schemas:
|
||||
CommunitiesActions:
|
||||
properties:
|
||||
create:
|
||||
type: boolean
|
||||
required:
|
||||
- create
|
||||
type: object
|
||||
OneFactorLoginEligibility:
|
||||
properties:
|
||||
fetchStatus:
|
||||
type: string
|
||||
required:
|
||||
- fetchStatus
|
||||
type: object
|
||||
OtherResponse:
|
||||
properties:
|
||||
session:
|
||||
$ref: '#/components/schemas/Session'
|
||||
required:
|
||||
- session
|
||||
type: object
|
||||
Session:
|
||||
properties:
|
||||
SsoInitTokens:
|
||||
type: object
|
||||
communitiesActions:
|
||||
$ref: '#/components/schemas/CommunitiesActions'
|
||||
country:
|
||||
pattern: ^[A-Z]{2}$
|
||||
type: string
|
||||
guestId:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
hasCommunityMemberships:
|
||||
type: boolean
|
||||
isActiveCreator:
|
||||
type: boolean
|
||||
isRestrictedSession:
|
||||
type: boolean
|
||||
isSuperFollowSubscriber:
|
||||
type: boolean
|
||||
language:
|
||||
pattern: ^[a-z]{2}$
|
||||
type: string
|
||||
oneFactorLoginEligibility:
|
||||
$ref: '#/components/schemas/OneFactorLoginEligibility'
|
||||
superFollowersCount:
|
||||
type: integer
|
||||
superFollowsApplicationStatus:
|
||||
type: string
|
||||
userFeatures:
|
||||
$ref: '#/components/schemas/UserFeatures'
|
||||
user_id:
|
||||
pattern: ^[0-9]+$
|
||||
type: string
|
||||
required:
|
||||
- country
|
||||
- communitiesActions
|
||||
- isActiveCreator
|
||||
- isRestrictedSession
|
||||
- guestId
|
||||
- hasCommunityMemberships
|
||||
- language
|
||||
- oneFactorLoginEligibility
|
||||
- ssoInitTokens
|
||||
- superFollowersCount
|
||||
- superFollowsApplicationStatus
|
||||
- user_id
|
||||
- userFeatures
|
||||
- isSuperFollowSubscriber
|
||||
type: object
|
||||
UserFeatures:
|
||||
properties:
|
||||
mediatool_studio_library:
|
||||
type: boolean
|
||||
required:
|
||||
- mediatool_studio_library
|
||||
type: object
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
openapi: 3.0.3
|
||||
paths:
|
||||
/other:
|
||||
get:
|
||||
description: This is not an actual endpoint
|
||||
operationId: other
|
||||
responses:
|
||||
'200':
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/OtherResponse'
|
||||
description: Successful operation
|
||||
tags:
|
||||
- other
|
||||
|
|
@ -67,3 +67,5 @@ tags:
|
|||
description: legacy APIs get
|
||||
- name: v2.0-post
|
||||
description: legacy APIs post
|
||||
- name: other
|
||||
description: other
|
||||
|
|
|
|||
103
src/openapi/paths/other.yaml
Normal file
103
src/openapi/paths/other.yaml
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
openapi: 3.0.3
|
||||
info:
|
||||
title: Twitter OpenAPI
|
||||
version: 0.0.1
|
||||
|
||||
paths:
|
||||
/other:
|
||||
get:
|
||||
operationId: other
|
||||
description: This is not an actual endpoint
|
||||
responses:
|
||||
"200":
|
||||
description: Successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/OtherResponse"
|
||||
tags:
|
||||
- "other"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
OtherResponse:
|
||||
type: object
|
||||
required:
|
||||
- "session"
|
||||
properties:
|
||||
session:
|
||||
$ref: "#/components/schemas/Session" # window.__INITIAL_STATE__
|
||||
Session:
|
||||
type: object
|
||||
required:
|
||||
- "country"
|
||||
- "communitiesActions"
|
||||
- "isActiveCreator"
|
||||
- "isRestrictedSession"
|
||||
- "guestId"
|
||||
- "hasCommunityMemberships"
|
||||
- "language"
|
||||
- "oneFactorLoginEligibility"
|
||||
- "ssoInitTokens"
|
||||
- "superFollowersCount"
|
||||
- "superFollowsApplicationStatus"
|
||||
- "user_id"
|
||||
- "userFeatures"
|
||||
- "isSuperFollowSubscriber"
|
||||
properties:
|
||||
country:
|
||||
type: string
|
||||
pattern: "^[A-Z]{2}$"
|
||||
communitiesActions:
|
||||
$ref: "#/components/schemas/CommunitiesActions"
|
||||
isActiveCreator:
|
||||
type: boolean
|
||||
isRestrictedSession:
|
||||
type: boolean
|
||||
guestId:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
hasCommunityMemberships:
|
||||
type: boolean
|
||||
language:
|
||||
type: string
|
||||
pattern: "^[a-z]{2}$"
|
||||
oneFactorLoginEligibility:
|
||||
$ref: "#/components/schemas/OneFactorLoginEligibility"
|
||||
SsoInitTokens:
|
||||
type: object
|
||||
superFollowersCount:
|
||||
type: integer
|
||||
superFollowsApplicationStatus:
|
||||
type: string # enum: NotStarted
|
||||
user_id:
|
||||
type: string
|
||||
pattern: "^[0-9]+$"
|
||||
userFeatures:
|
||||
$ref: "#/components/schemas/UserFeatures"
|
||||
isSuperFollowSubscriber:
|
||||
type: boolean
|
||||
|
||||
CommunitiesActions:
|
||||
type: object
|
||||
required:
|
||||
- "create"
|
||||
properties:
|
||||
create:
|
||||
type: boolean
|
||||
|
||||
OneFactorLoginEligibility:
|
||||
type: object
|
||||
required:
|
||||
- "fetchStatus"
|
||||
properties:
|
||||
fetchStatus:
|
||||
type: string # enum: none
|
||||
|
||||
UserFeatures:
|
||||
type: object
|
||||
required:
|
||||
- "mediatool_studio_library"
|
||||
properties:
|
||||
mediatool_studio_library:
|
||||
type: boolean
|
||||
|
|
@ -50,7 +50,8 @@ class Config:
|
|||
),
|
||||
]
|
||||
for key in ["v1.1-post", "v2.0-post"]
|
||||
},
|
||||
}
|
||||
| {"other": []},
|
||||
},
|
||||
"dart": {
|
||||
"openapi": [],
|
||||
|
|
@ -101,7 +102,8 @@ class Config:
|
|||
),
|
||||
]
|
||||
for key in ["v1.1-post", "v2.0-post"]
|
||||
},
|
||||
}
|
||||
| {"other": []},
|
||||
},
|
||||
"typescript": {
|
||||
"openapi": [AddSecuritySchemesOnSecuritySchemes()],
|
||||
|
|
@ -136,7 +138,8 @@ class Config:
|
|||
),
|
||||
]
|
||||
for key in ["v1.1-get", "v1.1-post", "v2.0-get", "v2.0-post"]
|
||||
},
|
||||
}
|
||||
| {"other": []},
|
||||
},
|
||||
"test": {
|
||||
"openapi": [AddSecuritySchemesOnSecuritySchemes()],
|
||||
|
|
@ -171,6 +174,7 @@ class Config:
|
|||
),
|
||||
]
|
||||
for key in ["v1.1-get", "v1.1-post", "v2.0-get", "v2.0-post"]
|
||||
},
|
||||
}
|
||||
| {"other": []},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue