x-twitter-scraper 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +19 -2
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +23 -17
- package/client.d.mts.map +1 -1
- package/client.d.ts +23 -17
- package/client.d.ts.map +1 -1
- package/client.js +42 -17
- package/client.js.map +1 -1
- package/client.mjs +42 -17
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +4 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +4 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +3 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +3 -2
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +26 -16
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/account.d.mts +59 -3
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +59 -3
- package/resources/account.d.ts.map +1 -1
- package/resources/account.mjs.map +1 -1
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +88 -11
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +88 -11
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js +37 -4
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs +37 -4
- package/resources/credits.mjs.map +1 -1
- package/resources/drafts.d.mts +4 -1
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +4 -1
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.mjs.map +1 -1
- package/resources/draws.d.mts +33 -8
- package/resources/draws.d.mts.map +1 -1
- package/resources/draws.d.ts +33 -8
- package/resources/draws.d.ts.map +1 -1
- package/resources/draws.js +12 -4
- package/resources/draws.js.map +1 -1
- package/resources/draws.mjs +12 -4
- package/resources/draws.mjs.map +1 -1
- package/resources/events.d.mts +46 -7
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +46 -7
- package/resources/events.d.ts.map +1 -1
- package/resources/events.mjs.map +1 -1
- package/resources/extractions.d.mts +287 -17
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +287 -17
- package/resources/extractions.d.ts.map +1 -1
- package/resources/extractions.js +3 -2
- package/resources/extractions.js.map +1 -1
- package/resources/extractions.mjs +3 -2
- package/resources/extractions.mjs.map +1 -1
- package/resources/guest-wallets.d.mts +245 -0
- package/resources/guest-wallets.d.mts.map +1 -0
- package/resources/guest-wallets.d.ts +245 -0
- package/resources/guest-wallets.d.ts.map +1 -0
- package/resources/guest-wallets.js +79 -0
- package/resources/guest-wallets.js.map +1 -0
- package/resources/guest-wallets.mjs +75 -0
- package/resources/guest-wallets.mjs.map +1 -0
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/monitors/index.d.mts +3 -0
- package/resources/monitors/index.d.mts.map +1 -0
- package/resources/monitors/index.d.ts +3 -0
- package/resources/monitors/index.d.ts.map +1 -0
- package/resources/monitors/index.js +9 -0
- package/resources/monitors/index.js.map +1 -0
- package/resources/monitors/index.mjs +4 -0
- package/resources/monitors/index.mjs.map +1 -0
- package/resources/monitors/keywords.d.mts +164 -0
- package/resources/monitors/keywords.d.mts.map +1 -0
- package/resources/monitors/keywords.d.ts +164 -0
- package/resources/monitors/keywords.d.ts.map +1 -0
- package/resources/monitors/keywords.js +80 -0
- package/resources/monitors/keywords.js.map +1 -0
- package/resources/monitors/keywords.mjs +76 -0
- package/resources/monitors/keywords.mjs.map +1 -0
- package/resources/monitors/monitors.d.mts +127 -0
- package/resources/monitors/monitors.d.mts.map +1 -0
- package/resources/monitors/monitors.d.ts +127 -0
- package/resources/monitors/monitors.d.ts.map +1 -0
- package/resources/monitors/monitors.js +84 -0
- package/resources/monitors/monitors.js.map +1 -0
- package/resources/monitors/monitors.mjs +79 -0
- package/resources/monitors/monitors.mjs.map +1 -0
- package/resources/monitors.d.mts +1 -111
- package/resources/monitors.d.mts.map +1 -1
- package/resources/monitors.d.ts +1 -111
- package/resources/monitors.d.ts.map +1 -1
- package/resources/monitors.js +2 -70
- package/resources/monitors.js.map +1 -1
- package/resources/monitors.mjs +1 -68
- package/resources/monitors.mjs.map +1 -1
- package/resources/radar.d.mts +3 -3
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +3 -3
- package/resources/radar.d.ts.map +1 -1
- package/resources/radar.mjs.map +1 -1
- package/resources/shared.d.mts +251 -19
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +251 -19
- package/resources/shared.d.ts.map +1 -1
- package/resources/styles.d.mts.map +1 -1
- package/resources/styles.d.ts.map +1 -1
- package/resources/styles.mjs.map +1 -1
- package/resources/subscribe.d.mts +20 -6
- package/resources/subscribe.d.mts.map +1 -1
- package/resources/subscribe.d.ts +20 -6
- package/resources/subscribe.d.ts.map +1 -1
- package/resources/subscribe.js +12 -4
- package/resources/subscribe.js.map +1 -1
- package/resources/subscribe.mjs +12 -4
- package/resources/subscribe.mjs.map +1 -1
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/index.mjs.map +1 -1
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/support.mjs.map +1 -1
- package/resources/support/tickets.d.mts +9 -7
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +9 -7
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +9 -7
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +9 -7
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/support.d.mts.map +1 -1
- package/resources/support.d.ts.map +1 -1
- package/resources/support.mjs.map +1 -1
- package/resources/trends.d.mts +2 -2
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +2 -2
- package/resources/trends.d.ts.map +1 -1
- package/resources/trends.mjs.map +1 -1
- package/resources/webhooks.d.mts +34 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +34 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -0
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/account-connection-challenges.d.mts +41 -0
- package/resources/x/account-connection-challenges.d.mts.map +1 -0
- package/resources/x/account-connection-challenges.d.ts +41 -0
- package/resources/x/account-connection-challenges.d.ts.map +1 -0
- package/resources/x/account-connection-challenges.js +27 -0
- package/resources/x/account-connection-challenges.js.map +1 -0
- package/resources/x/account-connection-challenges.mjs +23 -0
- package/resources/x/account-connection-challenges.mjs.map +1 -0
- package/resources/x/accounts.d.mts +13 -41
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +13 -41
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +3 -3
- package/resources/x/accounts.mjs +3 -3
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/bookmarks.d.mts +6 -0
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +6 -0
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/bookmarks.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +50 -14
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +50 -14
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +5 -2
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +6 -3
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/index.d.mts +2 -2
- package/resources/x/communities/index.d.mts.map +1 -1
- package/resources/x/communities/index.d.ts +2 -2
- package/resources/x/communities/index.d.ts.map +1 -1
- package/resources/x/communities/index.js.map +1 -1
- package/resources/x/communities/index.mjs +1 -1
- package/resources/x/communities/index.mjs.map +1 -1
- package/resources/x/communities/join.d.mts +16 -12
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +16 -12
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +7 -8
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +7 -8
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/communities/tweets.d.mts +29 -6
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +29 -6
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/communities/tweets.js +5 -2
- package/resources/x/communities/tweets.js.map +1 -1
- package/resources/x/communities/tweets.mjs +5 -2
- package/resources/x/communities/tweets.mjs.map +1 -1
- package/resources/x/communities.d.mts.map +1 -1
- package/resources/x/communities.d.ts.map +1 -1
- package/resources/x/communities.mjs.map +1 -1
- package/resources/x/dm.d.mts +17 -5
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +17 -5
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +2 -2
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +2 -2
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/followers.d.mts +2 -2
- package/resources/x/followers.d.mts.map +1 -1
- package/resources/x/followers.d.ts +2 -2
- package/resources/x/followers.d.ts.map +1 -1
- package/resources/x/followers.mjs.map +1 -1
- package/resources/x/index.d.mts +4 -2
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +4 -2
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js +5 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs +2 -0
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/lists.d.mts +19 -0
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +19 -0
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/lists.mjs.map +1 -1
- package/resources/x/media.d.mts +17 -8
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +17 -8
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +2 -3
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +3 -4
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +8 -9
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +8 -9
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +4 -4
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +5 -5
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/index.d.mts.map +1 -1
- package/resources/x/tweets/index.d.ts.map +1 -1
- package/resources/x/tweets/index.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +442 -29
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +442 -29
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +1 -1
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +1 -1
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/tweets.d.mts.map +1 -1
- package/resources/x/tweets.d.ts.map +1 -1
- package/resources/x/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/index.d.mts +1 -1
- package/resources/x/users/index.d.mts.map +1 -1
- package/resources/x/users/index.d.ts +1 -1
- package/resources/x/users/index.d.ts.map +1 -1
- package/resources/x/users/index.js.map +1 -1
- package/resources/x/users/index.mjs.map +1 -1
- package/resources/x/users/users.d.mts +666 -9
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +666 -9
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +26 -4
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +26 -4
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/users.d.mts.map +1 -1
- package/resources/x/users.d.ts.map +1 -1
- package/resources/x/users.mjs.map +1 -1
- package/resources/x/write-actions.d.mts +51 -0
- package/resources/x/write-actions.d.mts.map +1 -0
- package/resources/x/write-actions.d.ts +51 -0
- package/resources/x/write-actions.d.ts.map +1 -0
- package/resources/x/write-actions.js +26 -0
- package/resources/x/write-actions.js.map +1 -0
- package/resources/x/write-actions.mjs +22 -0
- package/resources/x/write-actions.mjs.map +1 -0
- package/resources/x/x.d.mts +65 -12
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +65 -12
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +10 -1
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +10 -1
- package/resources/x/x.mjs.map +1 -1
- package/resources/x.d.mts.map +1 -1
- package/resources/x.d.ts.map +1 -1
- package/resources/x.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +86 -40
- package/src/internal/request-options.ts +2 -0
- package/src/internal/utils/log.ts +2 -1
- package/src/resources/account.ts +72 -5
- package/src/resources/credits.ts +117 -10
- package/src/resources/drafts.ts +4 -1
- package/src/resources/draws.ts +33 -12
- package/src/resources/events.ts +52 -7
- package/src/resources/extractions.ts +364 -12
- package/src/resources/guest-wallets.ts +337 -0
- package/src/resources/index.ts +15 -10
- package/src/resources/monitors/index.ts +21 -0
- package/src/resources/monitors/keywords.ts +221 -0
- package/src/resources/monitors/monitors.ts +195 -0
- package/src/resources/monitors.ts +1 -153
- package/src/resources/radar.ts +3 -3
- package/src/resources/shared.ts +463 -21
- package/src/resources/subscribe.ts +29 -8
- package/src/resources/support/tickets.ts +9 -7
- package/src/resources/trends.ts +2 -2
- package/src/resources/webhooks.ts +43 -0
- package/src/resources/x/account-connection-challenges.ts +61 -0
- package/src/resources/x/accounts.ts +15 -46
- package/src/resources/x/bookmarks.ts +6 -0
- package/src/resources/x/communities/communities.ts +68 -16
- package/src/resources/x/communities/index.ts +7 -2
- package/src/resources/x/communities/join.ts +23 -16
- package/src/resources/x/communities/tweets.ts +32 -6
- package/src/resources/x/dm.ts +20 -7
- package/src/resources/x/followers.ts +2 -2
- package/src/resources/x/index.ts +10 -1
- package/src/resources/x/lists.ts +22 -0
- package/src/resources/x/media.ts +25 -11
- package/src/resources/x/profile.ts +11 -12
- package/src/resources/x/tweets/tweets.ts +540 -32
- package/src/resources/x/users/index.ts +4 -0
- package/src/resources/x/users/users.ts +834 -8
- package/src/resources/x/write-actions.ts +79 -0
- package/src/resources/x/x.ts +107 -10
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/api-keys.d.mts +0 -68
- package/resources/api-keys.d.mts.map +0 -1
- package/resources/api-keys.d.ts +0 -68
- package/resources/api-keys.d.ts.map +0 -1
- package/resources/api-keys.js +0 -48
- package/resources/api-keys.js.map +0 -1
- package/resources/api-keys.mjs +0 -44
- package/resources/api-keys.mjs.map +0 -1
- package/resources/bot/bot.d.mts +0 -10
- package/resources/bot/bot.d.mts.map +0 -1
- package/resources/bot/bot.d.ts +0 -10
- package/resources/bot/bot.d.ts.map +0 -1
- package/resources/bot/bot.js +0 -17
- package/resources/bot/bot.js.map +0 -1
- package/resources/bot/bot.mjs +0 -12
- package/resources/bot/bot.mjs.map +0 -1
- package/resources/bot/index.d.mts +0 -3
- package/resources/bot/index.d.mts.map +0 -1
- package/resources/bot/index.d.ts +0 -3
- package/resources/bot/index.d.ts.map +0 -1
- package/resources/bot/index.js +0 -9
- package/resources/bot/index.js.map +0 -1
- package/resources/bot/index.mjs +0 -4
- package/resources/bot/index.mjs.map +0 -1
- package/resources/bot/platform-links.d.mts +0 -4
- package/resources/bot/platform-links.d.mts.map +0 -1
- package/resources/bot/platform-links.d.ts +0 -4
- package/resources/bot/platform-links.d.ts.map +0 -1
- package/resources/bot/platform-links.js +0 -9
- package/resources/bot/platform-links.js.map +0 -1
- package/resources/bot/platform-links.mjs +0 -5
- package/resources/bot/platform-links.mjs.map +0 -1
- package/resources/bot.d.mts +0 -2
- package/resources/bot.d.mts.map +0 -1
- package/resources/bot.d.ts +0 -2
- package/resources/bot.d.ts.map +0 -1
- package/resources/bot.js +0 -6
- package/resources/bot.js.map +0 -1
- package/resources/bot.mjs +0 -3
- package/resources/bot.mjs.map +0 -1
- package/src/resources/api-keys.ts +0 -100
- package/src/resources/bot/bot.ts +0 -15
- package/src/resources/bot/index.ts +0 -4
- package/src/resources/bot/platform-links.ts +0 -5
- package/src/resources/bot.ts +0 -3
|
@@ -76,6 +76,18 @@ export class Webhooks extends APIResource {
|
|
|
76
76
|
return this._client.get(path`/webhooks/${id}/deliveries`, options);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Test and resume webhook endpoint
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const response = await client.webhooks.resume('id');
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
resume(id: string, options?: RequestOptions): APIPromise<WebhookResumeResponse> {
|
|
88
|
+
return this._client.post(path`/webhooks/${id}/resume`, options);
|
|
89
|
+
}
|
|
90
|
+
|
|
79
91
|
/**
|
|
80
92
|
* Test webhook endpoint
|
|
81
93
|
*
|
|
@@ -116,13 +128,29 @@ export interface Delivery {
|
|
|
116
128
|
export interface Webhook {
|
|
117
129
|
id: string;
|
|
118
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Consecutive failed delivery attempts since the last success.
|
|
133
|
+
*/
|
|
134
|
+
consecutiveFailures: number;
|
|
135
|
+
|
|
119
136
|
createdAt: string;
|
|
120
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Endpoint delivery state. needs_attention means delivery stopped after repeated
|
|
140
|
+
* failures.
|
|
141
|
+
*/
|
|
142
|
+
deliveryStatus: 'active' | 'paused' | 'needs_attention';
|
|
143
|
+
|
|
121
144
|
/**
|
|
122
145
|
* Array of event types to subscribe to.
|
|
123
146
|
*/
|
|
124
147
|
eventTypes: Array<Shared.EventType>;
|
|
125
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Consecutive delivery failures that pause the endpoint.
|
|
151
|
+
*/
|
|
152
|
+
failureHardCap: number;
|
|
153
|
+
|
|
126
154
|
isActive: boolean;
|
|
127
155
|
|
|
128
156
|
url: string;
|
|
@@ -138,6 +166,9 @@ export interface WebhookCreateResponse {
|
|
|
138
166
|
*/
|
|
139
167
|
eventTypes: Array<Shared.EventType>;
|
|
140
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Plaintext HMAC signing secret returned only at creation.
|
|
171
|
+
*/
|
|
141
172
|
secret: string;
|
|
142
173
|
|
|
143
174
|
url: string;
|
|
@@ -155,6 +186,17 @@ export interface WebhookListDeliveriesResponse {
|
|
|
155
186
|
deliveries: Array<Delivery>;
|
|
156
187
|
}
|
|
157
188
|
|
|
189
|
+
export interface WebhookResumeResponse {
|
|
190
|
+
statusCode: number;
|
|
191
|
+
|
|
192
|
+
success: boolean;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Webhook endpoint registered to receive event deliveries.
|
|
196
|
+
*/
|
|
197
|
+
webhook: Webhook;
|
|
198
|
+
}
|
|
199
|
+
|
|
158
200
|
export interface WebhookTestResponse {
|
|
159
201
|
statusCode: number;
|
|
160
202
|
|
|
@@ -194,6 +236,7 @@ export declare namespace Webhooks {
|
|
|
194
236
|
type WebhookListResponse as WebhookListResponse,
|
|
195
237
|
type WebhookDeactivateResponse as WebhookDeactivateResponse,
|
|
196
238
|
type WebhookListDeliveriesResponse as WebhookListDeliveriesResponse,
|
|
239
|
+
type WebhookResumeResponse as WebhookResumeResponse,
|
|
197
240
|
type WebhookTestResponse as WebhookTestResponse,
|
|
198
241
|
type WebhookCreateParams as WebhookCreateParams,
|
|
199
242
|
type WebhookUpdateParams as WebhookUpdateParams,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Connected X account management
|
|
10
|
+
*/
|
|
11
|
+
export class AccountConnectionChallenges extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Submit X account email verification code
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const response =
|
|
18
|
+
* await client.x.accountConnectionChallenges.submit('id', {
|
|
19
|
+
* email_code: '123456',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
submit(
|
|
24
|
+
id: string,
|
|
25
|
+
body: AccountConnectionChallengeSubmitParams,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): APIPromise<AccountConnectionChallengeSubmitResponse> {
|
|
28
|
+
return this._client.post(path`/x/account-connection-challenges/${id}/submit`, { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
34
|
+
*/
|
|
35
|
+
export interface AccountConnectionChallengeSubmitResponse {
|
|
36
|
+
id: string;
|
|
37
|
+
|
|
38
|
+
createdAt: string;
|
|
39
|
+
|
|
40
|
+
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
41
|
+
|
|
42
|
+
status: string;
|
|
43
|
+
|
|
44
|
+
xUserId: string;
|
|
45
|
+
|
|
46
|
+
xUsername: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface AccountConnectionChallengeSubmitParams {
|
|
50
|
+
/**
|
|
51
|
+
* Code sent to the account email.
|
|
52
|
+
*/
|
|
53
|
+
email_code: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export declare namespace AccountConnectionChallenges {
|
|
57
|
+
export {
|
|
58
|
+
type AccountConnectionChallengeSubmitResponse as AccountConnectionChallengeSubmitResponse,
|
|
59
|
+
type AccountConnectionChallengeSubmitParams as AccountConnectionChallengeSubmitParams,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -16,7 +16,7 @@ export class Accounts extends APIResource {
|
|
|
16
16
|
* ```ts
|
|
17
17
|
* const account = await client.x.accounts.create({
|
|
18
18
|
* email: 'user@example.com',
|
|
19
|
-
* password: '
|
|
19
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
20
20
|
* username: 'elonmusk',
|
|
21
21
|
* });
|
|
22
22
|
* ```
|
|
@@ -82,8 +82,8 @@ export class Accounts extends APIResource {
|
|
|
82
82
|
* @example
|
|
83
83
|
* ```ts
|
|
84
84
|
* const response = await client.x.accounts.reauth('id', {
|
|
85
|
-
* password: '
|
|
86
|
-
* totp_secret: '
|
|
85
|
+
* password: '<ACCOUNT_PASSWORD>',
|
|
86
|
+
* totp_secret: '<TOTP_SECRET>',
|
|
87
87
|
* });
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
@@ -93,7 +93,7 @@ export class Accounts extends APIResource {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* Linked X account summary with
|
|
96
|
+
* Linked X account summary with connection status, health, and timestamp metadata.
|
|
97
97
|
*/
|
|
98
98
|
export interface XAccount {
|
|
99
99
|
id: string;
|
|
@@ -101,23 +101,26 @@ export interface XAccount {
|
|
|
101
101
|
createdAt: string;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* Derived
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* shortly.
|
|
104
|
+
* Derived connection health. `healthy` = ready. `needsReauth` = reconnect the
|
|
105
|
+
* account. `locked` = unlock the account on x.com first. `suspended` = X
|
|
106
|
+
* suspended the account. `recovering` = retry is available after cooldown.
|
|
107
|
+
* `temporaryIssue` = retry shortly.
|
|
109
108
|
*/
|
|
110
109
|
health: 'healthy' | 'locked' | 'needsReauth' | 'recovering' | 'suspended' | 'temporaryIssue';
|
|
111
110
|
|
|
112
111
|
status: string;
|
|
113
112
|
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
|
|
114
115
|
xUserId: string;
|
|
115
116
|
|
|
116
117
|
xUsername: string;
|
|
118
|
+
|
|
119
|
+
cookiesObtainedAt?: string;
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
/**
|
|
120
|
-
*
|
|
123
|
+
* Connected X account details with health and timestamp metadata.
|
|
121
124
|
*/
|
|
122
125
|
export interface XAccountDetail {
|
|
123
126
|
id: string;
|
|
@@ -134,17 +137,11 @@ export interface XAccountDetail {
|
|
|
134
137
|
|
|
135
138
|
cookiesObtainedAt?: string;
|
|
136
139
|
|
|
137
|
-
proxyCountry?: string;
|
|
138
|
-
|
|
139
140
|
updatedAt?: string;
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
|
-
* Sanitized X account summary returned by connect and reauth.
|
|
144
|
-
* `loginCountry` field surfaced only when the selected login region was
|
|
145
|
-
* temporarily unavailable and the login used a one-time US session for this
|
|
146
|
-
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
147
|
-
* the field is omitted on normal logins.
|
|
144
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
148
145
|
*/
|
|
149
146
|
export interface AccountCreateResponse {
|
|
150
147
|
id: string;
|
|
@@ -158,13 +155,6 @@ export interface AccountCreateResponse {
|
|
|
158
155
|
xUserId: string;
|
|
159
156
|
|
|
160
157
|
xUsername: string;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
164
|
-
* login. Present only when the US fallback was triggered because the selected
|
|
165
|
-
* login region was temporarily unavailable. Omitted otherwise.
|
|
166
|
-
*/
|
|
167
|
-
loginCountry?: string;
|
|
168
158
|
}
|
|
169
159
|
|
|
170
160
|
export interface AccountListResponse {
|
|
@@ -183,11 +173,7 @@ export interface AccountBulkRetryResponse {
|
|
|
183
173
|
}
|
|
184
174
|
|
|
185
175
|
/**
|
|
186
|
-
* Sanitized X account summary returned by connect and reauth.
|
|
187
|
-
* `loginCountry` field surfaced only when the selected login region was
|
|
188
|
-
* temporarily unavailable and the login used a one-time US session for this
|
|
189
|
-
* one-time action. Future activity continues to use the selected `proxy_country`;
|
|
190
|
-
* the field is omitted on normal logins.
|
|
176
|
+
* Sanitized X account summary returned by connect and reauth.
|
|
191
177
|
*/
|
|
192
178
|
export interface AccountReauthResponse {
|
|
193
179
|
id: string;
|
|
@@ -201,13 +187,6 @@ export interface AccountReauthResponse {
|
|
|
201
187
|
xUserId: string;
|
|
202
188
|
|
|
203
189
|
xUsername: string;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* ISO-3166-1 alpha-2 country code of the login service session used for this
|
|
207
|
-
* login. Present only when the US fallback was triggered because the selected
|
|
208
|
-
* login region was temporarily unavailable. Omitted otherwise.
|
|
209
|
-
*/
|
|
210
|
-
loginCountry?: string;
|
|
211
190
|
}
|
|
212
191
|
|
|
213
192
|
export interface AccountCreateParams {
|
|
@@ -226,11 +205,6 @@ export interface AccountCreateParams {
|
|
|
226
205
|
*/
|
|
227
206
|
username: string;
|
|
228
207
|
|
|
229
|
-
/**
|
|
230
|
-
* Proxy country code
|
|
231
|
-
*/
|
|
232
|
-
proxy_country?: string;
|
|
233
|
-
|
|
234
208
|
/**
|
|
235
209
|
* TOTP secret for 2FA
|
|
236
210
|
*/
|
|
@@ -248,11 +222,6 @@ export interface AccountReauthParams {
|
|
|
248
222
|
*/
|
|
249
223
|
email?: string;
|
|
250
224
|
|
|
251
|
-
/**
|
|
252
|
-
* Two-letter country code for login proxy region
|
|
253
|
-
*/
|
|
254
|
-
proxy_country?: string;
|
|
255
|
-
|
|
256
225
|
/**
|
|
257
226
|
* TOTP secret for 2FA re-authentication
|
|
258
227
|
*/
|
|
@@ -40,8 +40,14 @@ export class Bookmarks extends APIResource {
|
|
|
40
40
|
export interface BookmarkRetrieveFoldersResponse {
|
|
41
41
|
folders: Array<BookmarkRetrieveFoldersResponse.Folder>;
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Always false for the current bookmark folder route
|
|
45
|
+
*/
|
|
43
46
|
has_next_page: boolean;
|
|
44
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Always empty for the current bookmark folder route
|
|
50
|
+
*/
|
|
45
51
|
next_cursor: string;
|
|
46
52
|
}
|
|
47
53
|
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as Shared from '../../shared';
|
|
5
5
|
import * as JoinAPI from './join';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Join,
|
|
8
|
+
JoinCreateParams,
|
|
9
|
+
JoinCreateResponse,
|
|
10
|
+
JoinDeleteAllParams,
|
|
11
|
+
JoinDeleteAllResponse,
|
|
12
|
+
} from './join';
|
|
7
13
|
import * as TweetsAPI from './tweets';
|
|
8
14
|
import { TweetListByCommunityParams, TweetListParams, Tweets } from './tweets';
|
|
9
15
|
import { APIPromise } from '../../../core/api-promise';
|
|
@@ -98,12 +104,15 @@ export class Communities extends APIResource {
|
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
/**
|
|
101
|
-
*
|
|
107
|
+
* Returns tweets, not community records. Requires a Community ID.
|
|
102
108
|
*
|
|
103
109
|
* @example
|
|
104
110
|
* ```ts
|
|
105
111
|
* const paginatedTweets =
|
|
106
|
-
* await client.x.communities.retrieveSearch({
|
|
112
|
+
* await client.x.communities.retrieveSearch({
|
|
113
|
+
* communityId: '321669910225',
|
|
114
|
+
* q: 'q',
|
|
115
|
+
* });
|
|
107
116
|
* ```
|
|
108
117
|
*/
|
|
109
118
|
retrieveSearch(
|
|
@@ -114,17 +123,6 @@ export class Communities extends APIResource {
|
|
|
114
123
|
}
|
|
115
124
|
}
|
|
116
125
|
|
|
117
|
-
/**
|
|
118
|
-
* Result of a community join or leave action.
|
|
119
|
-
*/
|
|
120
|
-
export interface CommunityActionResult {
|
|
121
|
-
communityId: string;
|
|
122
|
-
|
|
123
|
-
communityName: string;
|
|
124
|
-
|
|
125
|
-
success: true;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
126
|
export interface CommunityCreateResponse {
|
|
129
127
|
communityId: string;
|
|
130
128
|
|
|
@@ -164,11 +162,28 @@ export namespace CommunityRetrieveInfoResponse {
|
|
|
164
162
|
*/
|
|
165
163
|
created_at?: string;
|
|
166
164
|
|
|
165
|
+
creator?: Community.Creator;
|
|
166
|
+
|
|
167
167
|
/**
|
|
168
168
|
* About text for the community
|
|
169
169
|
*/
|
|
170
170
|
description?: string;
|
|
171
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Invitation policy
|
|
174
|
+
*/
|
|
175
|
+
invites_policy?: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Whether the authenticated viewer is a member
|
|
179
|
+
*/
|
|
180
|
+
is_member?: boolean;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Whether the community is marked sensitive
|
|
184
|
+
*/
|
|
185
|
+
is_nsfw?: boolean;
|
|
186
|
+
|
|
172
187
|
/**
|
|
173
188
|
* Join policy (open or restricted)
|
|
174
189
|
*/
|
|
@@ -194,6 +209,11 @@ export namespace CommunityRetrieveInfoResponse {
|
|
|
194
209
|
*/
|
|
195
210
|
primary_topic?: Community.PrimaryTopic;
|
|
196
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Authenticated viewer's community role
|
|
214
|
+
*/
|
|
215
|
+
role?: string;
|
|
216
|
+
|
|
197
217
|
/**
|
|
198
218
|
* Community rules
|
|
199
219
|
*/
|
|
@@ -201,6 +221,16 @@ export namespace CommunityRetrieveInfoResponse {
|
|
|
201
221
|
}
|
|
202
222
|
|
|
203
223
|
export namespace Community {
|
|
224
|
+
export interface Creator {
|
|
225
|
+
id: string;
|
|
226
|
+
|
|
227
|
+
username: string;
|
|
228
|
+
|
|
229
|
+
verified: boolean;
|
|
230
|
+
|
|
231
|
+
name?: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
204
234
|
/**
|
|
205
235
|
* Primary topic
|
|
206
236
|
*/
|
|
@@ -254,6 +284,13 @@ export interface CommunityRetrieveMembersParams {
|
|
|
254
284
|
* Pagination cursor
|
|
255
285
|
*/
|
|
256
286
|
cursor?: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Items per page (20-200, default 20). This is an upper bound for paid
|
|
290
|
+
* authenticated calls: available usage balance can reduce the returned page size, and
|
|
291
|
+
* zero affordable results returns 402 insufficient_credits.
|
|
292
|
+
*/
|
|
293
|
+
pageSize?: number;
|
|
257
294
|
}
|
|
258
295
|
|
|
259
296
|
export interface CommunityRetrieveModeratorsParams {
|
|
@@ -264,6 +301,11 @@ export interface CommunityRetrieveModeratorsParams {
|
|
|
264
301
|
}
|
|
265
302
|
|
|
266
303
|
export interface CommunityRetrieveSearchParams {
|
|
304
|
+
/**
|
|
305
|
+
* Numeric ID of the community whose posts to search
|
|
306
|
+
*/
|
|
307
|
+
communityId: string;
|
|
308
|
+
|
|
267
309
|
/**
|
|
268
310
|
* Search query
|
|
269
311
|
*/
|
|
@@ -274,10 +316,19 @@ export interface CommunityRetrieveSearchParams {
|
|
|
274
316
|
*/
|
|
275
317
|
cursor?: string;
|
|
276
318
|
|
|
319
|
+
/**
|
|
320
|
+
* Maximum items requested from this page (1-100, default 20). The response can
|
|
321
|
+
* contain fewer items because the source returned fewer, filters removed items, or
|
|
322
|
+
* the available usage balance covers fewer results. Keep requesting next_cursor while
|
|
323
|
+
* has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
324
|
+
* aliases remain accepted.
|
|
325
|
+
*/
|
|
326
|
+
pageSize?: number;
|
|
327
|
+
|
|
277
328
|
/**
|
|
278
329
|
* Sort order (Latest or Top)
|
|
279
330
|
*/
|
|
280
|
-
queryType?:
|
|
331
|
+
queryType?: 'Latest' | 'Top';
|
|
281
332
|
}
|
|
282
333
|
|
|
283
334
|
Communities.Join = Join;
|
|
@@ -285,7 +336,6 @@ Communities.Tweets = Tweets;
|
|
|
285
336
|
|
|
286
337
|
export declare namespace Communities {
|
|
287
338
|
export {
|
|
288
|
-
type CommunityActionResult as CommunityActionResult,
|
|
289
339
|
type CommunityCreateResponse as CommunityCreateResponse,
|
|
290
340
|
type CommunityDeleteResponse as CommunityDeleteResponse,
|
|
291
341
|
type CommunityRetrieveInfoResponse as CommunityRetrieveInfoResponse,
|
|
@@ -298,6 +348,8 @@ export declare namespace Communities {
|
|
|
298
348
|
|
|
299
349
|
export {
|
|
300
350
|
Join as Join,
|
|
351
|
+
type JoinCreateResponse as JoinCreateResponse,
|
|
352
|
+
type JoinDeleteAllResponse as JoinDeleteAllResponse,
|
|
301
353
|
type JoinCreateParams as JoinCreateParams,
|
|
302
354
|
type JoinDeleteAllParams as JoinDeleteAllParams,
|
|
303
355
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
Communities,
|
|
5
|
-
type CommunityActionResult,
|
|
6
5
|
type CommunityCreateResponse,
|
|
7
6
|
type CommunityDeleteResponse,
|
|
8
7
|
type CommunityRetrieveInfoResponse,
|
|
@@ -12,5 +11,11 @@ export {
|
|
|
12
11
|
type CommunityRetrieveModeratorsParams,
|
|
13
12
|
type CommunityRetrieveSearchParams,
|
|
14
13
|
} from './communities';
|
|
15
|
-
export {
|
|
14
|
+
export {
|
|
15
|
+
Join,
|
|
16
|
+
type JoinCreateResponse,
|
|
17
|
+
type JoinDeleteAllResponse,
|
|
18
|
+
type JoinCreateParams,
|
|
19
|
+
type JoinDeleteAllParams,
|
|
20
|
+
} from './join';
|
|
16
21
|
export { Tweets, type TweetListParams, type TweetListByCommunityParams } from './tweets';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as CommunitiesAPI from './communities';
|
|
5
4
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
5
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
6
|
import { path } from '../../../internal/utils/path';
|
|
@@ -15,17 +14,12 @@ export class Join extends APIResource {
|
|
|
15
14
|
*
|
|
16
15
|
* @example
|
|
17
16
|
* ```ts
|
|
18
|
-
* const
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* });
|
|
17
|
+
* const join = await client.x.communities.join.create('id', {
|
|
18
|
+
* account: '@elonmusk',
|
|
19
|
+
* });
|
|
22
20
|
* ```
|
|
23
21
|
*/
|
|
24
|
-
create(
|
|
25
|
-
id: string,
|
|
26
|
-
body: JoinCreateParams,
|
|
27
|
-
options?: RequestOptions,
|
|
28
|
-
): APIPromise<CommunitiesAPI.CommunityActionResult> {
|
|
22
|
+
create(id: string, body: JoinCreateParams, options?: RequestOptions): APIPromise<JoinCreateResponse> {
|
|
29
23
|
return this._client.post(path`/x/communities/${id}/join`, { body, ...options });
|
|
30
24
|
}
|
|
31
25
|
|
|
@@ -34,21 +28,29 @@ export class Join extends APIResource {
|
|
|
34
28
|
*
|
|
35
29
|
* @example
|
|
36
30
|
* ```ts
|
|
37
|
-
* const
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
31
|
+
* const response = await client.x.communities.join.deleteAll(
|
|
32
|
+
* 'id',
|
|
33
|
+
* { account: '@elonmusk' },
|
|
34
|
+
* );
|
|
41
35
|
* ```
|
|
42
36
|
*/
|
|
43
37
|
deleteAll(
|
|
44
38
|
id: string,
|
|
45
39
|
body: JoinDeleteAllParams,
|
|
46
40
|
options?: RequestOptions,
|
|
47
|
-
): APIPromise<
|
|
41
|
+
): APIPromise<JoinDeleteAllResponse> {
|
|
48
42
|
return this._client.delete(path`/x/communities/${id}/join`, { body, ...options });
|
|
49
43
|
}
|
|
50
44
|
}
|
|
51
45
|
|
|
46
|
+
export interface JoinCreateResponse {
|
|
47
|
+
success: true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface JoinDeleteAllResponse {
|
|
51
|
+
success: true;
|
|
52
|
+
}
|
|
53
|
+
|
|
52
54
|
export interface JoinCreateParams {
|
|
53
55
|
/**
|
|
54
56
|
* X account identifier (@username or account ID)
|
|
@@ -64,5 +66,10 @@ export interface JoinDeleteAllParams {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
export declare namespace Join {
|
|
67
|
-
export {
|
|
69
|
+
export {
|
|
70
|
+
type JoinCreateResponse as JoinCreateResponse,
|
|
71
|
+
type JoinDeleteAllResponse as JoinDeleteAllResponse,
|
|
72
|
+
type JoinCreateParams as JoinCreateParams,
|
|
73
|
+
type JoinDeleteAllParams as JoinDeleteAllParams,
|
|
74
|
+
};
|
|
68
75
|
}
|
|
@@ -11,12 +11,15 @@ import { path } from '../../../internal/utils/path';
|
|
|
11
11
|
*/
|
|
12
12
|
export class Tweets extends APIResource {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Requires a Community ID and keyword query.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
18
18
|
* const paginatedTweets =
|
|
19
|
-
* await client.x.communities.tweets.list({
|
|
19
|
+
* await client.x.communities.tweets.list({
|
|
20
|
+
* communityId: '321669910225',
|
|
21
|
+
* q: 'q',
|
|
22
|
+
* });
|
|
20
23
|
* ```
|
|
21
24
|
*/
|
|
22
25
|
list(query: TweetListParams, options?: RequestOptions): APIPromise<Shared.PaginatedTweets> {
|
|
@@ -43,19 +46,33 @@ export class Tweets extends APIResource {
|
|
|
43
46
|
|
|
44
47
|
export interface TweetListParams {
|
|
45
48
|
/**
|
|
46
|
-
*
|
|
49
|
+
* Numeric ID of the community to search
|
|
50
|
+
*/
|
|
51
|
+
communityId: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Keyword query within the selected community
|
|
47
55
|
*/
|
|
48
56
|
q: string;
|
|
49
57
|
|
|
50
58
|
/**
|
|
51
|
-
* Pagination cursor for
|
|
59
|
+
* Pagination cursor for community results
|
|
52
60
|
*/
|
|
53
61
|
cursor?: string;
|
|
54
62
|
|
|
55
63
|
/**
|
|
56
|
-
*
|
|
64
|
+
* Maximum items requested from this page (1-100, default 20). The response can
|
|
65
|
+
* contain fewer items because the source returned fewer, filters removed items, or
|
|
66
|
+
* the available usage balance covers fewer results. Keep requesting next_cursor while
|
|
67
|
+
* has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
68
|
+
* aliases remain accepted.
|
|
57
69
|
*/
|
|
58
|
-
|
|
70
|
+
pageSize?: number;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Sort order for community results (Latest or Top)
|
|
74
|
+
*/
|
|
75
|
+
queryType?: 'Latest' | 'Top';
|
|
59
76
|
}
|
|
60
77
|
|
|
61
78
|
export interface TweetListByCommunityParams {
|
|
@@ -63,6 +80,15 @@ export interface TweetListByCommunityParams {
|
|
|
63
80
|
* Pagination cursor for community tweets
|
|
64
81
|
*/
|
|
65
82
|
cursor?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Maximum items requested from this page (1-100, default 20). The response can
|
|
86
|
+
* contain fewer items because the source returned fewer, filters removed items, or
|
|
87
|
+
* the available usage balance covers fewer results. Keep requesting next_cursor while
|
|
88
|
+
* has_next_page is true, even when a page is empty. The deprecated limit and count
|
|
89
|
+
* aliases remain accepted.
|
|
90
|
+
*/
|
|
91
|
+
pageSize?: number;
|
|
66
92
|
}
|
|
67
93
|
|
|
68
94
|
export declare namespace Tweets {
|