1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-03-09 18:30:08 +01:00
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-04-27 20:18:39 +09:00
parent a69d2fa7d8
commit 5eedd4146d
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
6 changed files with 283 additions and 163 deletions

View file

@ -6,18 +6,6 @@ paths:
/parameters:
get:
parameters:
- name: variables
in: query
required: true
schema:
type: string
example: "{{Variables}}"
- name: features
in: query
required: true
schema:
type: string
example: "{{Features}}"
- name: queryId
in: query
required: true
@ -26,6 +14,45 @@ paths:
default: "{{Query}}"
example: "{{Query}}"
# {% if get_parameters == string %}
- name: variables
in: query
required: true
schema:
type: string
default: "{{Variables}}"
example: "{{Variables}}"
- name: features
in: query
required: true
schema:
type: string
default: "{{Features}}"
example: "{{Features}}"
# {% endif %}
# {% if get_parameters == object %}
- name: variables
in: query
required: true
schema:
type: object
- name: features
in: query
required: true
schema:
type: object
- name: queryId
in: query
required: true
schema:
type: object
# {% endif %}
# {% if header == parameters %}
- name: authorization
@ -58,62 +85,71 @@ paths:
description: "UserAgent, some APIs may be rejected if changed."
# {% endif %}
post:
parameters:
- name: variables
in: query
required: true
schema:
type: object
example: "{{Variables}}"
- name: features
in: query
required: true
schema:
type: object
example: "{{Features}}"
- name: queryId
in: query
required: true
schema:
type: string
default: "{{Query}}"
example: "{{Query}}"
# {% if header == parameters %}
- name: authorization
in: header
required: true
schema:
type: string
default: "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
description: "It is a constant value and does not need to be changed."
- name: x-twitter-active-user
in: header
required: true
schema:
type: string
default: "yes"
description: "Unknown what this value means."
- name: x-twitter-client-language
in: header
required: true
schema:
type: string
default: "en"
description: "language code."
- name: user-agent
in: header
required: true
schema:
type: string
default: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
description: "UserAgent, some APIs may be rejected if changed."
# {% endif %}
responses:
"200":
description: ""
post:
# {% if header == parameters %}
parameters:
- name: authorization
in: header
required: true
schema:
type: string
default: "Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
description: "It is a constant value and does not need to be changed."
- name: x-twitter-active-user
in: header
required: true
schema:
type: string
default: "yes"
description: "Unknown what this value means."
- name: x-twitter-client-language
in: header
required: true
schema:
type: string
default: "en"
description: "language code."
- name: user-agent
in: header
required: true
schema:
type: string
default: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
description: "UserAgent, some APIs may be rejected if changed."
# {% endif %}
# {% if post_parameters == object %}
requestBody:
required: true
content:
application/json:
schema:
required:
- "queryId"
- "variables"
- "features"
properties:
queryId:
type: string
default: "{{Query}}"
example: "{{Query}}"
variables:
type: object
# default: "{{Variables}}"
example: "{{Variables}}"
features:
type: object
# default: "{{Features}}"
example: "{{Features}}"
# {% endif %}
responses:
"200":
description: ""

View file

@ -364,29 +364,25 @@
"Query": "lI07N6Otwv1PhnEgXILM7A",
"Variables": {
"tweet_id": "1349129669258448897"
},
"Features": {}
}
},
"UnfavoriteTweet": {
"Query": "ZYKSe-w7KEslx3JhSIk5LA",
"Variables": {
"tweet_id": "1349129669258448897"
},
"Features": {}
}
},
"CreateRetweet": {
"Query": "ojPdsZsimiJrUGLR1sjUtA",
"Variables": {
"tweet_id": "1349129669258448897"
},
"Features": {}
}
},
"DeleteRetweet": {
"Query": "iQtK4dl5hBmXewYZuEOKVw",
"Variables": {
"tweet_id": "1349129669258448897"
},
"Features": {}
}
},
"CreateTweet": {
"Query": "1RyAhNwby-gzGCRVsMxKbQ",
@ -396,7 +392,8 @@
"media_entities": [],
"possibly_sensitive": false
},
"semantic_annotation_ids": []
"semantic_annotation_ids": [],
"dark_request": false
},
"Features": {
"tweetypie_unmention_optimization_enabled": true,
@ -424,8 +421,7 @@
"Query": "VaenaVgh5q5ih7kvyVjgtg",
"Variables": {
"tweet_id": "1349129669258448897"
},
"Features": {}
}
},
"Template": {
"Query": "",

View file

@ -1,8 +1,17 @@
{
"dart": {
"header": "parameters"
"header": "parameters",
"get_parameters": "string",
"post_parameters": "object"
},
"typescript": {
"header": "securitySchemes"
"header": "securitySchemes",
"get_parameters": "string",
"post_parameters": "object"
},
"test": {
"header": "securitySchemes",
"get_parameters": "string",
"post_parameters": "string"
}
}