fa0311 / twitter-openapi Goto Github PK
View Code? Open in Web Editor NEWOpenAPI(Swagger) specification of Twitter Internal API (Twitter graphql API)
License: Other
OpenAPI(Swagger) specification of Twitter Internal API (Twitter graphql API)
License: Other
{"errors":[{"message":"Timeout: Unspecified","locations":[{"line":5,"column":3}],"path":["threaded_conversation_with_injections_v2"],"extensions":{"name":"TimeoutError","source":"Server","retry_after":0,"code":29,"kind":"ServiceLevel","tracing":{"trace_id":"2fd4406d20be6d33"}},"code":29,"kind":"ServiceLevel","name":"TimeoutError","source":"Server","retry_after":0,"tracing":{"trace_id":"2fd4406d20be6d33"}}],"data":{}}
API has been discontinued.
thanks for the contribution. I was able to use it. but the access instance to "b22I8WSfQ8H4Ev8486xAlQ/Following". even though I have passed count up but the data was incomplete. or return incorrect count.
Hi @fa0311
this is a great project,and I really love it.
and I would like to build a scheduled tweet bot based on this Twitter API project.
It needs to upload images and videos to post.
I found that Twitter has three states for uploading media:
--------INIT ------------
[POST] https://upload.twitter.com/i/media/upload.json?command=INIT&total_bytes=1856821&media_type=video/mp4&video_duration_ms=11562.086000000001&media_category=tweet_video
--------APPEND-----------
[POST] https://upload.twitter.com/i/media/upload.json?command=APPEND&media_id=1676995058216890369&segment_index=0
[POST] https://upload.twitter.com/i/media/upload.json?command=APPEND&media_id=1676995058216890369&segment_index=1
-------FINALIZE---------- State
[POST] https://upload.twitter.com/i/media/upload.json?command=FINALIZE&media_id=1676995058216890369&allow_async=true
Since these three states use the sameupload.json
url
but with different parameters, and the request body for the APPEND api requires uploading file data,
and each state returns a different response,
I'm not sure how to writeplaceholder.json
andbuild_config.py
to make it work.
Thank you for your open source project, it's really amazing.
graph TD
BASE[TwitterInternalAPIDocument]-.->A[twitter-openapi]
A--Auto Generated-->AA[twitter-openapi-python-generated]
A--Auto Generated-->BA[twitter-openapi-typescript-generated]
A--Auto Generated-->CA[twitter-openapi-dart-generated]
AA--Simplified handling-->AB[twitter-openapi-python]
BA--Simplified handling-->BB[twitter-openapi-typescript]
CA--Simplified handling-->CB[twitter-openapi-dart]
BB--To image-->AC[twitter-snap-core]
AC--Command Line-->ADA[twitter-snap]
AC--CF worker-->ADB[twitter-snap-worker]
CB--app-->CBA[social_doge]
Priority: High
Priority: Medium
Priority: Low
/1.1/friends/following/list.json
-> FollowersYouKnow
/2/search/adaptive.json
-> SearchTimeline
{
"media": [
{
"display_url": "pic.twitter.com/9YvJ0jm6tB",
"expanded_url": "https://twitter.com/krtr_kurotoro/status/1694963037227389166/video/1",
"id_str": "1694962885192282112",
"indices": [
7,
30
],
"media_key": "7_1694962885192282112",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/1694962885192282112/pu/img/Wr4s3raEr4T2czjP.jpg",
"type": "video",
"url": "https://t.co/9YvJ0jm6tB",
"additional_media_info": {
"monetizable": false
},
"mediaStats": {
"viewCount": 4961
},
"ext_media_availability": {
"status": "Available"
},
"features": {},
"sizes": {
"large": {
"h": 720,
"w": 960,
"resize": "fit"
},
"medium": {
"h": 720,
"w": 960,
"resize": "fit"
},
"small": {
"h": 510,
"w": 680,
"resize": "fit"
},
"thumb": {
"h": 150,
"w": 150,
"resize": "crop"
}
},
"original_info": {
"height": 720,
"width": 960
},
"video_info": {
"aspect_ratio": [
4,
3
],
"duration_millis": 37928,
"variants": [
{
"bitrate": 256000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/1694962885192282112/pu/vid/360x270/AU4UY6X4-JyCV5MZ.mp4?tag=12"
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/1694962885192282112/pu/vid/480x360/PGRxiya8WJnN-Hul.mp4?tag=12"
},
{
"bitrate": 2176000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/1694962885192282112/pu/vid/960x720/ebnESUe_Q-M4H170.mp4?tag=12"
},
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/ext_tw_video/1694962885192282112/pu/pl/oREZDgcKwY6pA4PS.m3u8?tag=12&container=fmp4"
}
]
}
}
]
}
{
"errors": [
{
"message": "Authorization: Status is a duplicate. (187)",
"locations": [
{
"line": 18,
"column": 3
}
],
"path": [
"create_tweet"
],
"extensions": {
"name": "AuthorizationError",
"source": "Client",
"code": 187,
"kind": "Permissions",
"tracing": {
"trace_id": "e549137014dc4ab3"
}
},
"code": 187,
"kind": "Permissions",
"name": "AuthorizationError",
"source": "Client",
"tracing": {
"trace_id": "e549137014dc4ab3"
}
}
],
"data": {}
}
Payload here.
Response here
UserUnavailable ???
{
"entryId": "user-1685962068732887040",
"sortIndex": "1773073882416152576",
"content": {
"entryType": "TimelineTimelineItem",
"__typename": "TimelineTimelineItem",
"itemContent": {
"itemType": "TimelineUser",
"__typename": "TimelineUser",
"user_results": {
"result": { "__typename": "UserUnavailable", "reason": "NoReason" }
},
"userDisplayType": "User"
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.