Skip to content

Latest commit

 

History

History
488 lines (483 loc) · 15.4 KB

File metadata and controls

488 lines (483 loc) · 15.4 KB

GetRepliesPageResponse

Example Usage

import { GetRepliesPageResponse } from "@twexapi-dev/x-api-scraper/models";

let value: GetRepliesPageResponse = {
  rootTweet: {
    tweetId: "1803006263529541838",
    isPaidPromotion: true,
    text: "<value>",
    createdAt: "Mon Jun 17 03:51:48 +0000 2024",
    createdAtDatetime: "2024-06-17T03:51:48.000Z",
    hashtags: [
      "AI",
      "Python",
    ],
    cashtags: [
      "$TSLA",
    ],
    lang: "en",
    media: [
      {
        id: "1802991873836883968",
        type: "photo",
        displayUrl: "pic.twitter.com/...",
        height: 1080,
        width: 1920,
        aspectRatio: [
          16,
          9,
        ],
        streams: [
          {
            url: "https://video.twimg.com/...",
            bitrate: 832000,
            contentType: "video/mp4",
          },
        ],
      },
    ],
    quote: null,
    relatedTweets: [
      {
        tweetId: "1803006263529541838",
        isPaidPromotion: true,
        text: "<value>",
        createdAt: "Mon Jun 17 03:51:48 +0000 2024",
        createdAtDatetime: "2024-06-17T03:51:48.000Z",
        hashtags: [
          "AI",
          "Python",
        ],
        cashtags: [
          "$TSLA",
        ],
        lang: "en",
        media: [
          {
            id: "1802991873836883968",
            type: "photo",
            displayUrl: "pic.twitter.com/...",
            height: 1080,
            width: 1920,
            aspectRatio: [
              16,
              9,
            ],
            streams: [
              {
                url: "https://video.twimg.com/...",
                bitrate: 832000,
                contentType: "video/mp4",
              },
            ],
          },
        ],
        replies: [
          {
            tweetId: "1803006263529541838",
            isPaidPromotion: true,
            text: "<value>",
            createdAt: "Mon Jun 17 03:51:48 +0000 2024",
            createdAtDatetime: "2024-06-17T03:51:48.000Z",
            hashtags: [
              "AI",
              "Python",
            ],
            cashtags: [
              "$TSLA",
            ],
            lang: "en",
            media: [
              {
                id: "1802991873836883968",
                type: "photo",
                displayUrl: "pic.twitter.com/...",
                height: 1080,
                width: 1920,
                aspectRatio: [
                  16,
                  9,
                ],
                streams: [
                  {
                    url: "https://video.twimg.com/...",
                    bitrate: 832000,
                    contentType: "video/mp4",
                  },
                ],
              },
            ],
            thread: [
              {
                tweetId: "1803006263529541838",
                isPaidPromotion: true,
                text: "<value>",
                createdAt: "Mon Jun 17 03:51:48 +0000 2024",
                createdAtDatetime: "2024-06-17T03:51:48.000Z",
                hashtags: [
                  "AI",
                  "Python",
                ],
                cashtags: [
                  "$TSLA",
                ],
                lang: "en",
                media: [
                  {
                    id: "1802991873836883968",
                    type: "photo",
                    displayUrl: "pic.twitter.com/...",
                    height: 1080,
                    width: 1920,
                    aspectRatio: [
                      16,
                      9,
                    ],
                    streams: [
                      {
                        url: "https://video.twimg.com/...",
                        bitrate: 832000,
                        contentType: "video/mp4",
                      },
                    ],
                  },
                ],
                user: {
                  id: "1717001045992251392",
                  name: "Cryptoklepto",
                  screenName: "CK_Cryptoklepto",
                  createdAt: "Mon Oct 28 02:32:47 +0000 2024",
                  createdAtDatetime: "2024-10-28T02:32:47.000Z",
                  urls: [
                    {
                      url: "https://www.google.com",
                      expandedUrl: "https://www.google.com",
                      displayUrl: "www.google.com",
                    },
                  ],
                  verifiedType: "government",
                  profileImageShape: "Circle",
                  location: "New York, USA",
                },
              },
            ],
            user: {
              id: "1717001045992251392",
              name: "Cryptoklepto",
              screenName: "CK_Cryptoklepto",
              createdAt: "Mon Oct 28 02:32:47 +0000 2024",
              createdAtDatetime: "2024-10-28T02:32:47.000Z",
              urls: [
                {
                  url: "https://www.google.com",
                  expandedUrl: "https://www.google.com",
                  displayUrl: "www.google.com",
                },
              ],
              verifiedType: "government",
              profileImageShape: "Circle",
              location: "New York, USA",
            },
          },
        ],
        user: {
          id: "1717001045992251392",
          name: "Cryptoklepto",
          screenName: "CK_Cryptoklepto",
          createdAt: "Mon Oct 28 02:32:47 +0000 2024",
          createdAtDatetime: "2024-10-28T02:32:47.000Z",
          urls: [
            {
              url: "https://www.google.com",
              expandedUrl: "https://www.google.com",
              displayUrl: "www.google.com",
            },
          ],
          verifiedType: "government",
          profileImageShape: "Circle",
          location: "New York, USA",
        },
      },
    ],
    replies: [
      {
        tweetId: "1803006263529541838",
        isPaidPromotion: true,
        text: "<value>",
        createdAt: "Mon Jun 17 03:51:48 +0000 2024",
        createdAtDatetime: "2024-06-17T03:51:48.000Z",
        hashtags: [
          "AI",
          "Python",
        ],
        cashtags: [
          "$TSLA",
        ],
        lang: "en",
        media: [
          {
            id: "1802991873836883968",
            type: "photo",
            displayUrl: "pic.twitter.com/...",
            height: 1080,
            width: 1920,
            aspectRatio: [
              16,
              9,
            ],
            streams: [
              {
                url: "https://video.twimg.com/...",
                bitrate: 832000,
                contentType: "video/mp4",
              },
            ],
          },
        ],
        thread: [
          {
            tweetId: "1803006263529541838",
            isPaidPromotion: true,
            text: "<value>",
            createdAt: "Mon Jun 17 03:51:48 +0000 2024",
            createdAtDatetime: "2024-06-17T03:51:48.000Z",
            hashtags: [
              "AI",
              "Python",
            ],
            cashtags: [
              "$TSLA",
            ],
            lang: "en",
            media: [
              {
                id: "1802991873836883968",
                type: "photo",
                displayUrl: "pic.twitter.com/...",
                height: 1080,
                width: 1920,
                aspectRatio: [
                  16,
                  9,
                ],
                streams: [
                  {
                    url: "https://video.twimg.com/...",
                    bitrate: 832000,
                    contentType: "video/mp4",
                  },
                ],
              },
            ],
            user: {
              id: "1717001045992251392",
              name: "Cryptoklepto",
              screenName: "CK_Cryptoklepto",
              createdAt: "Mon Oct 28 02:32:47 +0000 2024",
              createdAtDatetime: "2024-10-28T02:32:47.000Z",
              urls: [
                {
                  url: "https://www.google.com",
                  expandedUrl: "https://www.google.com",
                  displayUrl: "www.google.com",
                },
              ],
              verifiedType: "government",
              profileImageShape: "Circle",
              location: "New York, USA",
            },
          },
        ],
        user: {
          id: "1717001045992251392",
          name: "Cryptoklepto",
          screenName: "CK_Cryptoklepto",
          createdAt: "Mon Oct 28 02:32:47 +0000 2024",
          createdAtDatetime: "2024-10-28T02:32:47.000Z",
          urls: [
            {
              url: "https://www.google.com",
              expandedUrl: "https://www.google.com",
              displayUrl: "www.google.com",
            },
          ],
          verifiedType: "government",
          profileImageShape: "Circle",
          location: "New York, USA",
        },
      },
    ],
    replyTo: {
      tweetId: "1803006263529541838",
      isPaidPromotion: true,
      text: "<value>",
      createdAt: "Mon Jun 17 03:51:48 +0000 2024",
      createdAtDatetime: "2024-06-17T03:51:48.000Z",
      hashtags: [
        "AI",
        "Python",
      ],
      cashtags: [
        "$TSLA",
      ],
      lang: "en",
      media: [
        {
          id: "1802991873836883968",
          type: "photo",
          displayUrl: "pic.twitter.com/...",
          height: 1080,
          width: 1920,
          aspectRatio: [
            16,
            9,
          ],
          streams: [
            {
              url: "https://video.twimg.com/...",
              bitrate: 832000,
              contentType: "video/mp4",
            },
          ],
        },
      ],
      user: {
        id: "1717001045992251392",
        name: "Cryptoklepto",
        screenName: "CK_Cryptoklepto",
        createdAt: "Mon Oct 28 02:32:47 +0000 2024",
        createdAtDatetime: "2024-10-28T02:32:47.000Z",
        urls: [
          {
            url: "https://www.google.com",
            expandedUrl: "https://www.google.com",
            displayUrl: "www.google.com",
          },
        ],
        verifiedType: "government",
        profileImageShape: "Circle",
        location: "New York, USA",
      },
    },
    retweetedTweet: {
      tweetId: "1803006263529541838",
      isPaidPromotion: true,
      text: "<value>",
      createdAt: "Mon Jun 17 03:51:48 +0000 2024",
      createdAtDatetime: "2024-06-17T03:51:48.000Z",
      hashtags: [
        "AI",
        "Python",
      ],
      cashtags: [
        "$TSLA",
      ],
      lang: "en",
      media: [
        {
          id: "1802991873836883968",
          type: "photo",
          displayUrl: "pic.twitter.com/...",
          height: 1080,
          width: 1920,
          aspectRatio: [
            16,
            9,
          ],
          streams: [
            {
              url: "https://video.twimg.com/...",
              bitrate: 832000,
              contentType: "video/mp4",
            },
          ],
        },
      ],
      user: {
        id: "1717001045992251392",
        name: "Cryptoklepto",
        screenName: "CK_Cryptoklepto",
        createdAt: "Mon Oct 28 02:32:47 +0000 2024",
        createdAtDatetime: "2024-10-28T02:32:47.000Z",
        urls: [
          {
            url: "https://www.google.com",
            expandedUrl: "https://www.google.com",
            displayUrl: "www.google.com",
          },
        ],
        verifiedType: "government",
        profileImageShape: "Circle",
        location: "New York, USA",
      },
    },
    thread: [
      {
        tweetId: "1803006263529541838",
        isPaidPromotion: true,
        text: "<value>",
        createdAt: "Mon Jun 17 03:51:48 +0000 2024",
        createdAtDatetime: "2024-06-17T03:51:48.000Z",
        hashtags: [
          "AI",
          "Python",
        ],
        cashtags: [
          "$TSLA",
        ],
        lang: "en",
        media: [
          {
            id: "1802991873836883968",
            type: "photo",
            displayUrl: "pic.twitter.com/...",
            height: 1080,
            width: 1920,
            aspectRatio: [
              16,
              9,
            ],
            streams: [
              {
                url: "https://video.twimg.com/...",
                bitrate: 832000,
                contentType: "video/mp4",
              },
            ],
          },
        ],
        user: {
          id: "1717001045992251392",
          name: "Cryptoklepto",
          screenName: "CK_Cryptoklepto",
          createdAt: "Mon Oct 28 02:32:47 +0000 2024",
          createdAtDatetime: "2024-10-28T02:32:47.000Z",
          urls: [
            {
              url: "https://www.google.com",
              expandedUrl: "https://www.google.com",
              displayUrl: "www.google.com",
            },
          ],
          verifiedType: "government",
          profileImageShape: "Circle",
          location: "New York, USA",
        },
      },
    ],
    user: null,
  },
  data: [],
  hasNextPage: true,
};

Fields

Field Type Required Description
code number HTTP status code
msg string Response message
rootTweet models.TweetModel The focal tweet. Only present on the first page (when next_cursor is omitted).
data models.TweetModel[] ✔️ Replies on the current page.
hasNextPage boolean ✔️ Whether another page is available.
nextCursor string Use this cursor to fetch the next page when has_next_page is true.