Giter Club home page Giter Club logo

twitter-openapi's Issues

Decode Error

{"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":{}}

endpoint Following missing data

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.

How to add media/upload.json to this project?

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.

Flow

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]

๐Ÿš€ Roadmap

Priority: High

  • HomeTimeline
  • HomeLatestTimeline
  • ListLatestTweetsTimeline
  • UserByScreenName
  • TweetDetail
  • UserTweets
  • UserMedia
  • Likes
  • UserTweetsAndReplies
  • Bookmarks
  • ProfileSpotlightsQuery
  • Following
  • Followers

Priority: Medium

Priority: Low

  • FavoriteTweet
  • UnfavoriteTweet
  • CreateRetweet
  • DeleteRetweet
  • CreateTweet
  • DeleteTweet

Recent Updates

  • /1.1/friends/following/list.json -> FollowersYouKnow
  • /2/search/adaptive.json -> SearchTimeline

Missing extended_entities

{
    "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"
                    }
                ]
            }
        }
    ]
}

Cannot reverse serialise `Authorization: Status is a duplicate`

{
    "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": {}
}

Missing APIs

  • ListPins
  • DataSaverMode
  • GetUserClaims
  • getAltTextPromptPreference
  • UsersVerifiedAvatars
  • AudioSpaceById
Sample
Payload here.
Response here

UserResults.result is Union ?????

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"
    }
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.