@xcrop/sdk 1.0.1 → 1.2.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/README.md +139 -10
- package/dist/cjs/client.d.ts +10 -4
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +9 -1
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/errors.d.ts +17 -4
- package/dist/cjs/errors.d.ts.map +1 -1
- package/dist/cjs/errors.js +21 -7
- package/dist/cjs/errors.js.map +1 -1
- package/dist/cjs/http.d.ts +1 -1
- package/dist/cjs/http.js +14 -10
- package/dist/cjs/http.js.map +1 -1
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/account.d.ts +11 -1
- package/dist/cjs/resources/account.d.ts.map +1 -1
- package/dist/cjs/resources/account.js +29 -0
- package/dist/cjs/resources/account.js.map +1 -1
- package/dist/cjs/resources/communities.d.ts +9 -6
- package/dist/cjs/resources/communities.d.ts.map +1 -1
- package/dist/cjs/resources/communities.js +15 -6
- package/dist/cjs/resources/communities.js.map +1 -1
- package/dist/cjs/resources/dm.d.ts +15 -0
- package/dist/cjs/resources/dm.d.ts.map +1 -0
- package/dist/cjs/resources/dm.js +33 -0
- package/dist/cjs/resources/dm.js.map +1 -0
- package/dist/cjs/resources/lists.d.ts +4 -4
- package/dist/cjs/resources/lists.d.ts.map +1 -1
- package/dist/cjs/resources/lists.js +8 -2
- package/dist/cjs/resources/lists.js.map +1 -1
- package/dist/cjs/resources/media.d.ts +13 -0
- package/dist/cjs/resources/media.d.ts.map +1 -0
- package/dist/cjs/resources/media.js +26 -0
- package/dist/cjs/resources/media.js.map +1 -0
- package/dist/cjs/resources/tweets.d.ts +35 -7
- package/dist/cjs/resources/tweets.d.ts.map +1 -1
- package/dist/cjs/resources/tweets.js +79 -4
- package/dist/cjs/resources/tweets.js.map +1 -1
- package/dist/cjs/resources/users.d.ts +44 -11
- package/dist/cjs/resources/users.d.ts.map +1 -1
- package/dist/cjs/resources/users.js +114 -20
- package/dist/cjs/resources/users.js.map +1 -1
- package/dist/cjs/types.d.ts +320 -3
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/client.d.ts +10 -4
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +9 -1
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/errors.d.ts +17 -4
- package/dist/esm/errors.d.ts.map +1 -1
- package/dist/esm/errors.js +21 -7
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/http.d.ts +1 -1
- package/dist/esm/http.js +14 -10
- package/dist/esm/http.js.map +1 -1
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/account.d.ts +11 -1
- package/dist/esm/resources/account.d.ts.map +1 -1
- package/dist/esm/resources/account.js +29 -0
- package/dist/esm/resources/account.js.map +1 -1
- package/dist/esm/resources/communities.d.ts +9 -6
- package/dist/esm/resources/communities.d.ts.map +1 -1
- package/dist/esm/resources/communities.js +15 -6
- package/dist/esm/resources/communities.js.map +1 -1
- package/dist/esm/resources/dm.d.ts +15 -0
- package/dist/esm/resources/dm.d.ts.map +1 -0
- package/dist/esm/resources/dm.js +29 -0
- package/dist/esm/resources/dm.js.map +1 -0
- package/dist/esm/resources/lists.d.ts +4 -4
- package/dist/esm/resources/lists.d.ts.map +1 -1
- package/dist/esm/resources/lists.js +8 -2
- package/dist/esm/resources/lists.js.map +1 -1
- package/dist/esm/resources/media.d.ts +13 -0
- package/dist/esm/resources/media.d.ts.map +1 -0
- package/dist/esm/resources/media.js +22 -0
- package/dist/esm/resources/media.js.map +1 -0
- package/dist/esm/resources/tweets.d.ts +35 -7
- package/dist/esm/resources/tweets.d.ts.map +1 -1
- package/dist/esm/resources/tweets.js +79 -4
- package/dist/esm/resources/tweets.js.map +1 -1
- package/dist/esm/resources/users.d.ts +44 -11
- package/dist/esm/resources/users.d.ts.map +1 -1
- package/dist/esm/resources/users.js +114 -20
- package/dist/esm/resources/users.js.map +1 -1
- package/dist/esm/types.d.ts +320 -3
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @xcrop/sdk
|
|
2
2
|
|
|
3
|
-
Official JavaScript/TypeScript SDK for the [XCROP API](https://xcrop.io), the X/Twitter data intelligence platform, covering
|
|
3
|
+
Official JavaScript/TypeScript SDK for the [XCROP API](https://xcrop.io), the X/Twitter data intelligence platform, covering 58 endpoints (profiles, tweets, search, lists, communities, account monitoring, and the Write API).
|
|
4
4
|
|
|
5
5
|
- Full TypeScript support with detailed types for all endpoints
|
|
6
6
|
- Auto-retry on rate limits (429) with exponential backoff
|
|
@@ -63,11 +63,29 @@ const { data: followers } = await client.users.followers('elonmusk', { count: 10
|
|
|
63
63
|
const { data: following } = await client.users.following('elonmusk');
|
|
64
64
|
const { data: verified } = await client.users.verifiedFollowers('elonmusk');
|
|
65
65
|
|
|
66
|
-
// Raw follower IDs (bulk, no profile metadata, up to 5000/call)
|
|
66
|
+
// Raw follower / following IDs (bulk, no profile metadata, up to 5000/call)
|
|
67
67
|
const { data: ids } = await client.users.followersIds('elonmusk', { count: 5000 });
|
|
68
|
+
const { data: followingIds } = await client.users.followingIds('elonmusk', { count: 5000 });
|
|
68
69
|
|
|
69
|
-
// Batch lookup (max 100)
|
|
70
|
+
// Batch lookup (max 100), by username or by numeric id
|
|
70
71
|
const { data: users } = await client.users.batch(['elonmusk', 'jack', 'VitalikButerin']);
|
|
72
|
+
const { data: byId, meta } = await client.users.batchByIds(['44196397', '12']);
|
|
73
|
+
console.log(meta.not_found); // ids X did not return
|
|
74
|
+
// users.batch (usernames): meta.unavailable lists suspended / deactivated accounts among not_found
|
|
75
|
+
|
|
76
|
+
// Replies return exactly `count` rows. `next_cursor` can be an opaque string
|
|
77
|
+
// starting `xo1.`: pass it back unchanged. Followers / following are newest first.
|
|
78
|
+
|
|
79
|
+
// Any user route also takes a numeric id: `id:<digits>` or `user_id`
|
|
80
|
+
await client.users.get('id:44196397');
|
|
81
|
+
await client.users.tweets('ignored', { user_id: '44196397' });
|
|
82
|
+
|
|
83
|
+
// Time window on mentions (unix seconds or ISO date)
|
|
84
|
+
await client.users.mentions('elonmusk', { since: '2026-11-01', until: '2026-11-10' });
|
|
85
|
+
|
|
86
|
+
// Also return suspended/deactivated accounts (not billed). Those rows look like
|
|
87
|
+
// { id, unavailable: true, unavailable_reason, ...every other field null }
|
|
88
|
+
const { data: all } = await client.users.following('nasa', { include_unavailable: true });
|
|
71
89
|
|
|
72
90
|
// Check follow relationship
|
|
73
91
|
const { data: rel } = await client.users.checkFollow('elonmusk', 'jack');
|
|
@@ -84,6 +102,11 @@ const { data: qn } = await client.users.checkQualifiedName('elonmusk', {
|
|
|
84
102
|
});
|
|
85
103
|
```
|
|
86
104
|
|
|
105
|
+
User objects now include `location`, `website`, `banner_image`, `likes_count`,
|
|
106
|
+
`media_count`, `protected`, `can_dm`, `pinned_tweet_ids`, `automated`,
|
|
107
|
+
`automated_by` and `affiliation` (all nullable: `null` means X did not send it).
|
|
108
|
+
Community member and moderator rows add `community_role`.
|
|
109
|
+
|
|
87
110
|
## Tweets
|
|
88
111
|
|
|
89
112
|
```typescript
|
|
@@ -98,19 +121,51 @@ const { data: quotes } = await client.tweets.quotes('1234567890');
|
|
|
98
121
|
|
|
99
122
|
// Batch lookup (max 100)
|
|
100
123
|
const { data: tweets } = await client.tweets.batch(['123', '456', '789']);
|
|
124
|
+
|
|
125
|
+
// Who reposted a tweet (billed per user returned)
|
|
126
|
+
const { data: retweeters } = await client.tweets.retweeters('1234567890', { count: 100 });
|
|
127
|
+
|
|
128
|
+
// Conversation: sort 'latest' (default) | 'relevance' | 'likes', plus a time window
|
|
129
|
+
const convo = await client.tweets.conversation('1234567890', { sort: 'likes', since: '2026-11-01' });
|
|
130
|
+
console.log(convo.meta.sort, convo.meta.thread_context); // tweets above a mid-thread tweet
|
|
131
|
+
|
|
132
|
+
// Time window on quotes and list tweets
|
|
133
|
+
await client.tweets.quotes('1234567890', { since: 1730419200 });
|
|
134
|
+
await client.lists.tweets('1234567890', { until: '2026-11-10' });
|
|
101
135
|
```
|
|
102
136
|
|
|
137
|
+
Tweets now carry `url`, `lang`, `source`, `in_reply_to`, `quoted_tweet`,
|
|
138
|
+
`retweeted_tweet`, `is_long_post`, `entities`, `possibly_sensitive`, `edit`,
|
|
139
|
+
`has_community_notes`, `place`, `card`, `metrics.quotes` and richer `author`
|
|
140
|
+
fields (`followers`, `verified`, `verified_type`, `profile_image`). `text` is
|
|
141
|
+
the full text of long posts.
|
|
142
|
+
|
|
143
|
+
Also on tweets (all nullable): `is_pinned`, `conversation_controlled`,
|
|
144
|
+
`limited_reply`, `display_text_range` (`[start, end]`) and `community`
|
|
145
|
+
(`{ id, name }`). `author` adds `description`, `location`, `following`,
|
|
146
|
+
`tweets_count`, `likes_count`, `media_count`, `listed`, `created_at`,
|
|
147
|
+
`banner_image`, `can_dm`, `automated` and `pinned_tweet_ids`. Each `media[]`
|
|
148
|
+
item adds `alt_text`, `media_key`, `display_url`, `expanded_url`, `width`,
|
|
149
|
+
`height` and `video` (`{ duration_ms, aspect_ratio, variants }`; the m3u8
|
|
150
|
+
variant has `bitrate: null`). `place` adds `id`, `name`, `place_type` and
|
|
151
|
+
`bounding_box`. On a repost the top-level `metrics` are the original post's
|
|
152
|
+
counts.
|
|
153
|
+
|
|
103
154
|
## Communities
|
|
104
155
|
|
|
105
|
-
X Communities data.
|
|
106
|
-
|
|
156
|
+
X Communities data. `count` is a minimum on members and moderators: X serves
|
|
157
|
+
whole pages, so a response can hold more rows than requested.
|
|
107
158
|
|
|
108
159
|
```typescript
|
|
109
160
|
const { data: community } = await client.communities.get('1708766018985501165');
|
|
110
|
-
const { data: tweets } = await client.communities.tweets('1708766018985501165', {
|
|
111
|
-
const { data: members } = await client.communities.members('1708766018985501165', { sort: '
|
|
161
|
+
const { data: tweets } = await client.communities.tweets('1708766018985501165', { count: 20 });
|
|
162
|
+
const { data: members } = await client.communities.members('1708766018985501165', { sort: 'name' });
|
|
163
|
+
const { data: mods } = await client.communities.moderators('1708766018985501165', { sort: 'default' });
|
|
112
164
|
```
|
|
113
165
|
|
|
166
|
+
`rules[]` items carry an `id`, and `members_preview` is an array of user
|
|
167
|
+
objects.
|
|
168
|
+
|
|
114
169
|
## Search
|
|
115
170
|
|
|
116
171
|
```typescript
|
|
@@ -262,6 +317,58 @@ await client.users.follow('elonmusk');
|
|
|
262
317
|
await client.users.unfollow('elonmusk');
|
|
263
318
|
```
|
|
264
319
|
|
|
320
|
+
## Write API
|
|
321
|
+
|
|
322
|
+
Every call below needs a connected X account (`client.account.connect()`), a
|
|
323
|
+
key with write permission and a paid plan. Each costs 100 credits flat and
|
|
324
|
+
answers `{ success: true, data, meta }`. `already: true` means X said the
|
|
325
|
+
state was already what you asked for.
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
// Bookmark / pin (pin works on your own posts only: another account's post
|
|
329
|
+
// throws XCropError 400 X_REFUSED)
|
|
330
|
+
await client.tweets.bookmark('1234567890'); // data: { tweet_id, bookmarked: true, already }
|
|
331
|
+
await client.tweets.unbookmark('1234567890'); // bookmarked: false
|
|
332
|
+
await client.tweets.pin('1234567890'); // data: { tweet_id, pinned: true, already }
|
|
333
|
+
await client.tweets.unpin('1234567890');
|
|
334
|
+
|
|
335
|
+
// Mute / block by username or `id:<digits>`
|
|
336
|
+
await client.users.mute('someuser'); // data: { user_id, username, muted: true, already }
|
|
337
|
+
await client.users.unmute('id:44196397');
|
|
338
|
+
await client.users.block('someuser'); // data: { user_id, username, blocked: true, already }
|
|
339
|
+
await client.users.unblock('someuser');
|
|
340
|
+
|
|
341
|
+
// Edit your profile (name 50, description 160, location 30, url 100 chars; at least one)
|
|
342
|
+
await client.account.updateProfile({ name: 'New name', description: 'New bio' }); // data: { updated: ['name', 'description'] }
|
|
343
|
+
|
|
344
|
+
// Send a DM (username or user_id)
|
|
345
|
+
const { data: dm } = await client.dm.send({ username: 'someuser', text: 'Hello!' });
|
|
346
|
+
console.log(dm.message_id, dm.conversation_id);
|
|
347
|
+
|
|
348
|
+
// Upload media (image/jpeg, image/png, image/webp, image/gif, video/mp4; max 5 MB decoded)
|
|
349
|
+
import { readFileSync } from 'node:fs';
|
|
350
|
+
const { data: media } = await client.media.upload({
|
|
351
|
+
base64: readFileSync('./photo.jpg').toString('base64'),
|
|
352
|
+
mime_type: 'image/jpeg',
|
|
353
|
+
});
|
|
354
|
+
await client.tweets.create({ text: 'With a picture', media_ids: [media.media_id!] });
|
|
355
|
+
|
|
356
|
+
// Post into a community you have joined. community_id is a STRING of digits
|
|
357
|
+
// (a number is rejected with BAD_COMMUNITY_ID); community posts max 280 chars.
|
|
358
|
+
await client.tweets.create({ text: 'Hello community', community_id: '1493446837214187523' });
|
|
359
|
+
|
|
360
|
+
// Leave replies out of quotes and list tweets (default true)
|
|
361
|
+
await client.tweets.quotes('1234567890', { include_replies: false });
|
|
362
|
+
await client.lists.tweets('12345', { include_replies: false });
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Write errors carry a `code`: `X_REFUSED` (400, X refused the action; the
|
|
366
|
+
wording is in `err.reason`), `NOT_FOUND` (404, the post or user does not
|
|
367
|
+
exist; X's wording in `err.reason`), `USER_SUSPENDED` (404), `DM_NOT_ALLOWED`
|
|
368
|
+
(403), `NO_X_ACCOUNT` (403), `PERMISSION_DENIED` (403), `PLAN_UPGRADE_REQUIRED`
|
|
369
|
+
(403), `SESSION_EXPIRED` (401, reconnect the account) and `BAD_COMMUNITY_ID`
|
|
370
|
+
(400).
|
|
371
|
+
|
|
265
372
|
## Interaction Checks
|
|
266
373
|
|
|
267
374
|
Check if a user interacted with a specific tweet (no connected account needed):
|
|
@@ -288,6 +395,8 @@ const { data: subs } = await client.lists.subscribers('12345');
|
|
|
288
395
|
// Trending topics (defaults to Worldwide)
|
|
289
396
|
const { data: trends } = await client.trending.get();
|
|
290
397
|
const { data: usTrends } = await client.trending.get({ country: 'United States' });
|
|
398
|
+
// Each row has a 1-based `rank`; `volume` is always null (X no longer publishes counts)
|
|
399
|
+
// `meta.as_of` (string) may be present
|
|
291
400
|
```
|
|
292
401
|
|
|
293
402
|
## Account Monitoring
|
|
@@ -297,6 +406,14 @@ the `users` and `search` endpoints above: poll `client.users.get()` /
|
|
|
297
406
|
`client.users.tweets()` on a schedule, or use `client.stream.connect()` for
|
|
298
407
|
real-time updates.
|
|
299
408
|
|
|
409
|
+
## Credits
|
|
410
|
+
|
|
411
|
+
```typescript
|
|
412
|
+
// Free call: current credit balance
|
|
413
|
+
const { data: credits } = await client.account.credits();
|
|
414
|
+
console.log(credits.total_remaining, credits.plan_remaining, credits.topup_remaining);
|
|
415
|
+
```
|
|
416
|
+
|
|
300
417
|
## Error Handling
|
|
301
418
|
|
|
302
419
|
```typescript
|
|
@@ -306,18 +423,30 @@ try {
|
|
|
306
423
|
await client.users.get('nonexistent_user_12345');
|
|
307
424
|
} catch (err) {
|
|
308
425
|
if (err instanceof NotFoundError) {
|
|
309
|
-
|
|
426
|
+
// err.code: NOT_FOUND | USER_SUSPENDED | USER_UNAVAILABLE
|
|
427
|
+
// err.reason: e.g. 'suspended', 'deactivated', 'not_found'
|
|
428
|
+
console.log(`User not found: ${err.code} ${err.reason ?? ''}`);
|
|
310
429
|
} else if (err instanceof AuthError) {
|
|
311
430
|
console.log('Invalid API key');
|
|
312
431
|
} else if (err instanceof RateLimitError) {
|
|
313
432
|
console.log(`Rate limited. Retry after ${err.retryAfter}s`);
|
|
314
433
|
console.log(`Remaining: ${err.remaining}/${err.limit}`);
|
|
315
434
|
} else if (err instanceof XCropError) {
|
|
316
|
-
console.log(`API error: ${err.status} ${err.code}
|
|
435
|
+
console.log(`API error: ${err.status} ${err.code} - ${err.message}`);
|
|
317
436
|
}
|
|
318
437
|
}
|
|
319
438
|
```
|
|
320
439
|
|
|
440
|
+
Error codes returned in `err.code` (the list can grow, keep a fallback branch):
|
|
441
|
+
`NOT_FOUND`, `USER_SUSPENDED`, `USER_UNAVAILABLE` (with `err.reason`),
|
|
442
|
+
`BAD_COMMUNITY_ID`, `BAD_TIME_WINDOW`, `BAD_USER_ID`, `BAD_SORT`, `BAD_CURSOR`
|
|
443
|
+
and `INTERNAL_ERROR` (500). Suspended and unavailable accounts arrive as a
|
|
444
|
+
`NotFoundError` (404) with the matching code. Write codes (`X_REFUSED`,
|
|
445
|
+
`DM_NOT_ALLOWED`, `NO_X_ACCOUNT`, `PERMISSION_DENIED`, `PLAN_UPGRADE_REQUIRED`,
|
|
446
|
+
`SESSION_EXPIRED`) are listed in the Write API section. Since 1.2.0 a 401 or 403
|
|
447
|
+
error carries the API's own code when it sent one (before, always `AUTH_ERROR`
|
|
448
|
+
/ `FORBIDDEN`), and `err.reason` also holds X's `x_reason` on writes.
|
|
449
|
+
|
|
321
450
|
## Rate Limits
|
|
322
451
|
|
|
323
452
|
Per-minute request limits, by plan:
|
|
@@ -329,7 +458,7 @@ Per-minute request limits, by plan:
|
|
|
329
458
|
| Pro | 600 |
|
|
330
459
|
| Pay-as-You-Go | 300 |
|
|
331
460
|
|
|
332
|
-
Every plan (including the free Starter tier) can call all
|
|
461
|
+
Every plan (including the free Starter tier) can call all 58 endpoints. Plans
|
|
333
462
|
differ only by monthly credits, the rate limit above, and credit price. On a
|
|
334
463
|
429 the SDK auto-retries with backoff (see `RateLimitError` above for the
|
|
335
464
|
raw `retryAfter`/`remaining`/`limit` fields).
|
package/dist/cjs/client.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import { TrendingResource } from './resources/trending.js';
|
|
|
6
6
|
import { CommunitiesResource } from './resources/communities.js';
|
|
7
7
|
import { AccountResource } from './resources/account.js';
|
|
8
8
|
import { StreamResource } from './resources/stream.js';
|
|
9
|
-
import
|
|
9
|
+
import { DmResource } from './resources/dm.js';
|
|
10
|
+
import { MediaResource } from './resources/media.js';
|
|
11
|
+
import type { XCropOptions, PaginationParams, CommunityTweetsParams, CommunityMembersParams, TweetQuotesParams, ListTweetsParams, Tweet, User } from './types.js';
|
|
10
12
|
type UserTweetsFn = UsersResource['tweets'] & {
|
|
11
13
|
paginate(username: string, params?: PaginationParams): AsyncGenerator<Tweet, void, undefined>;
|
|
12
14
|
};
|
|
@@ -19,8 +21,8 @@ interface PaginateHelpers {
|
|
|
19
21
|
userMedia(username: string, params?: PaginationParams): AsyncGenerator<Tweet, void, undefined>;
|
|
20
22
|
userVerifiedFollowers(username: string, params?: PaginationParams): AsyncGenerator<User, void, undefined>;
|
|
21
23
|
tweetConversation(tweetId: string, params?: PaginationParams): AsyncGenerator<Tweet, void, undefined>;
|
|
22
|
-
tweetQuotes(tweetId: string, params?:
|
|
23
|
-
listTweets(listId: string, params?:
|
|
24
|
+
tweetQuotes(tweetId: string, params?: TweetQuotesParams): AsyncGenerator<Tweet, void, undefined>;
|
|
25
|
+
listTweets(listId: string, params?: ListTweetsParams): AsyncGenerator<Tweet, void, undefined>;
|
|
24
26
|
listMembers(listId: string, params?: PaginationParams): AsyncGenerator<User, void, undefined>;
|
|
25
27
|
listSubscribers(listId: string, params?: PaginationParams): AsyncGenerator<User, void, undefined>;
|
|
26
28
|
communityTweets(communityId: string, params?: CommunityTweetsParams): AsyncGenerator<Tweet, void, undefined>;
|
|
@@ -51,12 +53,16 @@ export declare class XCrop {
|
|
|
51
53
|
readonly lists: ListsResource;
|
|
52
54
|
/** Trending topics. */
|
|
53
55
|
readonly trending: TrendingResource;
|
|
54
|
-
/** X Communities data (
|
|
56
|
+
/** X Communities data (details, tweets, members, moderators). */
|
|
55
57
|
readonly communities: CommunitiesResource;
|
|
56
58
|
/** X account connection management for write operations. */
|
|
57
59
|
readonly account: AccountResource;
|
|
58
60
|
/** Real-time SSE stream. */
|
|
59
61
|
readonly stream: StreamResource;
|
|
62
|
+
/** Direct messages (write, needs a connected X account). */
|
|
63
|
+
readonly dm: DmResource;
|
|
64
|
+
/** Media upload for tweets (write, needs a connected X account). */
|
|
65
|
+
readonly media: MediaResource;
|
|
60
66
|
/** Pagination helper — auto-iterate through all pages. */
|
|
61
67
|
readonly paginate: PaginateHelpers;
|
|
62
68
|
constructor(options: XCropOptions);
|
package/dist/cjs/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAgB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAiB,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAgB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,EACL,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,KAAK,YAAY,GAAG,aAAa,CAAC,QAAQ,CAAC,GAAG;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;CAC/F,CAAC;AAEF,UAAU,eAAe;IACvB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IA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AG,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;CAC/G;AAED;;;;;;;;;;GAUG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAElC,mEAAmE;IACnE,SAAgB,KAAK,EAAE,aAAa,GAAG;QAAE,MAAM,EAAE,YAAY,CAAA;KAAE,CAAC;IAChE,8DAA8D;IAC9D,SAAgB,MAAM,EAAE,cAAc,CAAC;IACvC,uDAAuD;IACvD,SAAgB,MAAM,EAAE,cAAc,CAAC;IACvC,yBAAyB;IACzB,SAAgB,KAAK,EAAE,aAAa,CAAC;IACrC,uBAAuB;IACvB,SAAgB,QAAQ,EAAE,gBAAgB,CAAC;IAC3C,iEAAiE;IACjE,SAAgB,WAAW,EAAE,mBAAmB,CAAC;IACjD,4DAA4D;IAC5D,SAAgB,OAAO,EAAE,eAAe,CAAC;IACzC,4BAA4B;IAC5B,SAAgB,MAAM,EAAE,cAAc,CAAC;IACvC,4DAA4D;IAC5D,SAAgB,EAAE,EAAE,UAAU,CAAC;IAC/B,oEAAoE;IACpE,SAAgB,KAAK,EAAE,aAAa,CAAC;IAErC,0DAA0D;IAC1D,SAAgB,QAAQ,EAAE,eAAe,CAAC;gBAE9B,OAAO,EAAE,YAAY;CA4DlC"}
|
package/dist/cjs/client.js
CHANGED
|
@@ -10,6 +10,8 @@ const trending_js_1 = require("./resources/trending.js");
|
|
|
10
10
|
const communities_js_1 = require("./resources/communities.js");
|
|
11
11
|
const account_js_1 = require("./resources/account.js");
|
|
12
12
|
const stream_js_1 = require("./resources/stream.js");
|
|
13
|
+
const dm_js_1 = require("./resources/dm.js");
|
|
14
|
+
const media_js_1 = require("./resources/media.js");
|
|
13
15
|
/**
|
|
14
16
|
* XCROP SDK client for the X/Twitter data intelligence API.
|
|
15
17
|
*
|
|
@@ -33,12 +35,16 @@ class XCrop {
|
|
|
33
35
|
lists;
|
|
34
36
|
/** Trending topics. */
|
|
35
37
|
trending;
|
|
36
|
-
/** X Communities data (
|
|
38
|
+
/** X Communities data (details, tweets, members, moderators). */
|
|
37
39
|
communities;
|
|
38
40
|
/** X account connection management for write operations. */
|
|
39
41
|
account;
|
|
40
42
|
/** Real-time SSE stream. */
|
|
41
43
|
stream;
|
|
44
|
+
/** Direct messages (write, needs a connected X account). */
|
|
45
|
+
dm;
|
|
46
|
+
/** Media upload for tweets (write, needs a connected X account). */
|
|
47
|
+
media;
|
|
42
48
|
/** Pagination helper — auto-iterate through all pages. */
|
|
43
49
|
paginate;
|
|
44
50
|
constructor(options) {
|
|
@@ -55,6 +61,8 @@ class XCrop {
|
|
|
55
61
|
this.communities = new communities_js_1.CommunitiesResource(this.http);
|
|
56
62
|
this.account = new account_js_1.AccountResource(this.http);
|
|
57
63
|
this.stream = new stream_js_1.StreamResource(this.http);
|
|
64
|
+
this.dm = new dm_js_1.DmResource(this.http);
|
|
65
|
+
this.media = new media_js_1.MediaResource(this.http);
|
|
58
66
|
// Build users.tweets with nested .paginate()
|
|
59
67
|
const boundTweets = usersBase.tweets.bind(usersBase);
|
|
60
68
|
const tweetsFn = Object.assign(boundTweets, {
|
package/dist/cjs/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,mDAAmE;AACnE,qDAAsE;AACtE,qDAAuD;AACvD,mDAAmE;AACnE,yDAA2D;AAC3D,+DAAiE;AACjE,uDAAyD;AACzD,qDAAuD;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,mDAAmE;AACnE,qDAAsE;AACtE,qDAAuD;AACvD,mDAAmE;AACnE,yDAA2D;AAC3D,+DAAiE;AACjE,uDAAyD;AACzD,qDAAuD;AACvD,6CAA+C;AAC/C,mDAAqD;AAiCrD;;;;;;;;;;GAUG;AACH,MAAa,KAAK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E,MAAM,CAAC;YACzE,eAAe,EAAE,CAAC,MAAc,EAAE,MAAyB,EAAE,EAAE,CAC7D,IAAA,uBAAY,EAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC;YAC7E,eAAe,EAAE,CAAC,WAAmB,EAAE,MAA8B,EAAE,EAAE,CACvE,IAAA,uBAAY,EAAQ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC;YAC1F,gBAAgB,EAAE,CAAC,WAAmB,EAAE,MAA+B,EAAE,EAAE,CACzE,IAAA,uBAAY,EAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC;SAC3F,CAAC;IACJ,CAAC;CACF;AAvFD,sBAuFC"}
|
package/dist/cjs/errors.d.ts
CHANGED
|
@@ -5,13 +5,20 @@ export declare class XCropError extends Error {
|
|
|
5
5
|
readonly status: number;
|
|
6
6
|
readonly code: string;
|
|
7
7
|
readonly headers: Record<string, string>;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Extra detail the API adds to some errors, e.g. `suspended`, `deactivated`,
|
|
10
|
+
* `not_found` (404s), or X's own wording on a refused write (`x_reason`).
|
|
11
|
+
* null when the response carried none.
|
|
12
|
+
*/
|
|
13
|
+
readonly reason: string | null;
|
|
14
|
+
constructor(message: string, status: number, code: string, headers?: Record<string, string>, reason?: string | null);
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* Thrown when authentication fails (401).
|
|
12
18
|
*/
|
|
13
19
|
export declare class AuthError extends XCropError {
|
|
14
|
-
|
|
20
|
+
/** `code` is the API's code when it sent one, e.g. `SESSION_EXPIRED` (reconnect the X account). Default `AUTH_ERROR`. */
|
|
21
|
+
constructor(message: string, headers?: Record<string, string>, code?: string, reason?: string | null);
|
|
15
22
|
}
|
|
16
23
|
/**
|
|
17
24
|
* Thrown when rate limit is exceeded (429).
|
|
@@ -25,14 +32,20 @@ export declare class RateLimitError extends XCropError {
|
|
|
25
32
|
}
|
|
26
33
|
/**
|
|
27
34
|
* Thrown when a resource is not found (404).
|
|
35
|
+
*
|
|
36
|
+
* `code` is the API's code: `NOT_FOUND` (default), `USER_SUSPENDED` or
|
|
37
|
+
* `USER_UNAVAILABLE` (with `reason`, e.g. `suspended` / `deactivated`).
|
|
28
38
|
*/
|
|
29
39
|
export declare class NotFoundError extends XCropError {
|
|
30
|
-
constructor(message: string, headers?: Record<string, string
|
|
40
|
+
constructor(message: string, headers?: Record<string, string>, code?: string, reason?: string | null);
|
|
31
41
|
}
|
|
32
42
|
/**
|
|
33
43
|
* Thrown when the request is forbidden (403).
|
|
44
|
+
*
|
|
45
|
+
* `code` is the API's code when it sent one: `PERMISSION_DENIED`,
|
|
46
|
+
* `PLAN_UPGRADE_REQUIRED`, `NO_X_ACCOUNT` or `DM_NOT_ALLOWED`. Default `FORBIDDEN`.
|
|
34
47
|
*/
|
|
35
48
|
export declare class ForbiddenError extends XCropError {
|
|
36
|
-
constructor(message: string, headers?: Record<string, string
|
|
49
|
+
constructor(message: string, headers?: Record<string, string>, code?: string, reason?: string | null);
|
|
37
50
|
}
|
|
38
51
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/cjs/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.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,MAAM,EAAE,MAAM,CAAM,EAAE,IAAI,GAAE,MAAoB,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW;CAI5H"}
|
package/dist/cjs/errors.js
CHANGED
|
@@ -8,12 +8,19 @@ class XCropError extends Error {
|
|
|
8
8
|
status;
|
|
9
9
|
code;
|
|
10
10
|
headers;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Extra detail the API adds to some errors, e.g. `suspended`, `deactivated`,
|
|
13
|
+
* `not_found` (404s), or X's own wording on a refused write (`x_reason`).
|
|
14
|
+
* null when the response carried none.
|
|
15
|
+
*/
|
|
16
|
+
reason;
|
|
17
|
+
constructor(message, status, code, headers = {}, reason = null) {
|
|
12
18
|
super(message);
|
|
13
19
|
this.name = 'XCropError';
|
|
14
20
|
this.status = status;
|
|
15
21
|
this.code = code;
|
|
16
22
|
this.headers = headers;
|
|
23
|
+
this.reason = reason;
|
|
17
24
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
18
25
|
}
|
|
19
26
|
}
|
|
@@ -22,8 +29,9 @@ exports.XCropError = XCropError;
|
|
|
22
29
|
* Thrown when authentication fails (401).
|
|
23
30
|
*/
|
|
24
31
|
class AuthError extends XCropError {
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
/** `code` is the API's code when it sent one, e.g. `SESSION_EXPIRED` (reconnect the X account). Default `AUTH_ERROR`. */
|
|
33
|
+
constructor(message, headers = {}, code = 'AUTH_ERROR', reason = null) {
|
|
34
|
+
super(message, 401, code, headers, reason);
|
|
27
35
|
this.name = 'AuthError';
|
|
28
36
|
}
|
|
29
37
|
}
|
|
@@ -49,20 +57,26 @@ class RateLimitError extends XCropError {
|
|
|
49
57
|
exports.RateLimitError = RateLimitError;
|
|
50
58
|
/**
|
|
51
59
|
* Thrown when a resource is not found (404).
|
|
60
|
+
*
|
|
61
|
+
* `code` is the API's code: `NOT_FOUND` (default), `USER_SUSPENDED` or
|
|
62
|
+
* `USER_UNAVAILABLE` (with `reason`, e.g. `suspended` / `deactivated`).
|
|
52
63
|
*/
|
|
53
64
|
class NotFoundError extends XCropError {
|
|
54
|
-
constructor(message, headers = {}) {
|
|
55
|
-
super(message, 404,
|
|
65
|
+
constructor(message, headers = {}, code = 'NOT_FOUND', reason = null) {
|
|
66
|
+
super(message, 404, code, headers, reason);
|
|
56
67
|
this.name = 'NotFoundError';
|
|
57
68
|
}
|
|
58
69
|
}
|
|
59
70
|
exports.NotFoundError = NotFoundError;
|
|
60
71
|
/**
|
|
61
72
|
* Thrown when the request is forbidden (403).
|
|
73
|
+
*
|
|
74
|
+
* `code` is the API's code when it sent one: `PERMISSION_DENIED`,
|
|
75
|
+
* `PLAN_UPGRADE_REQUIRED`, `NO_X_ACCOUNT` or `DM_NOT_ALLOWED`. Default `FORBIDDEN`.
|
|
62
76
|
*/
|
|
63
77
|
class ForbiddenError extends XCropError {
|
|
64
|
-
constructor(message, headers = {}) {
|
|
65
|
-
super(message, 403,
|
|
78
|
+
constructor(message, headers = {}, code = 'FORBIDDEN', reason = null) {
|
|
79
|
+
super(message, 403, code, headers, reason);
|
|
66
80
|
this.name = 'ForbiddenError';
|
|
67
81
|
}
|
|
68
82
|
}
|
package/dist/cjs/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IACnB,MAAM,CAAS;IACf,IAAI,CAAS;IACb,OAAO,CAAyB;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IACnB,MAAM,CAAS;IACf,IAAI,CAAS;IACb,OAAO,CAAyB;IAChD;;;;OAIG;IACa,MAAM,CAAgB;IAEtC,YACE,OAAe,EACf,MAAc,EACd,IAAY,EACZ,UAAkC,EAAE,EACpC,SAAwB,IAAI;Q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mB,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAjBD,wCAiBC;AAED;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,UAAU;IAC3C,YACE,OAAe,EACf,UAAkC,EAAE,EACpC,OAAe,WAAW,EAC1B,SAAwB,IAAI;QAE5B,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAVD,sCAUC;AAED;;;;;GAKG;AACH,MAAa,cAAe,SAAQ,UAAU;IAC5C,YAAY,OAAe,EAAE,UAAkC,EAAE,EAAE,OAAe,WAAW,EAAE,SAAwB,IAAI;QACzH,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AALD,wCAKC"}
|
package/dist/cjs/http.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiResponse, PaginatedResponse, RequestOptions, XCropOptions } from './types.js';
|
|
2
2
|
/** SDK version — single source of truth */
|
|
3
|
-
export declare const SDK_VERSION = "1.0
|
|
3
|
+
export declare const SDK_VERSION = "1.2.0";
|
|
4
4
|
/**
|
|
5
5
|
* Low-level HTTP client with automatic retry, backoff, and error mapping.
|
|
6
6
|
*/
|
package/dist/cjs/http.js
CHANGED
|
@@ -6,7 +6,7 @@ const DEFAULT_BASE_URL = 'https://xcrop.io/api/v2';
|
|
|
6
6
|
const DEFAULT_TIMEOUT = 30_000;
|
|
7
7
|
const DEFAULT_MAX_RETRIES = 3;
|
|
8
8
|
/** SDK version — single source of truth */
|
|
9
|
-
exports.SDK_VERSION = '1.0
|
|
9
|
+
exports.SDK_VERSION = '1.2.0';
|
|
10
10
|
const USER_AGENT = `@xcrop/sdk/${exports.SDK_VERSION}`;
|
|
11
11
|
/**
|
|
12
12
|
* Low-level HTTP client with automatic retry, backoff, and error mapping.
|
|
@@ -67,13 +67,13 @@ class HttpClient {
|
|
|
67
67
|
const errorCode = errorBody.code ?? `HTTP_${response.status}`;
|
|
68
68
|
// Non-retryable errors
|
|
69
69
|
if (response.status === 401) {
|
|
70
|
-
throw new errors_js_1.AuthError(errorMessage, responseHeaders);
|
|
70
|
+
throw new errors_js_1.AuthError(errorMessage, responseHeaders, errorBody.code, errorReason(errorBody));
|
|
71
71
|
}
|
|
72
72
|
if (response.status === 403) {
|
|
73
|
-
throw new errors_js_1.ForbiddenError(errorMessage, responseHeaders);
|
|
73
|
+
throw new errors_js_1.ForbiddenError(errorMessage, responseHeaders, errorBody.code, errorReason(errorBody));
|
|
74
74
|
}
|
|
75
75
|
if (response.status === 404) {
|
|
76
|
-
throw new errors_js_1.NotFoundError(errorMessage, responseHeaders);
|
|
76
|
+
throw new errors_js_1.NotFoundError(errorMessage, responseHeaders, errorBody.code, errorReason(errorBody));
|
|
77
77
|
}
|
|
78
78
|
// Retryable: 429 rate limit
|
|
79
79
|
if (response.status === 429) {
|
|
@@ -93,10 +93,10 @@ class HttpClient {
|
|
|
93
93
|
await sleep(backoffDelay(attempt));
|
|
94
94
|
continue;
|
|
95
95
|
}
|
|
96
|
-
throw new errors_js_1.XCropError(errorMessage, response.status, errorCode, responseHeaders);
|
|
96
|
+
throw new errors_js_1.XCropError(errorMessage, response.status, errorCode, responseHeaders, errorReason(errorBody));
|
|
97
97
|
}
|
|
98
98
|
// Other 4xx — not retryable
|
|
99
|
-
throw new errors_js_1.XCropError(errorMessage, response.status, errorCode, responseHeaders);
|
|
99
|
+
throw new errors_js_1.XCropError(errorMessage, response.status, errorCode, responseHeaders, errorReason(errorBody));
|
|
100
100
|
}
|
|
101
101
|
catch (err) {
|
|
102
102
|
if (err instanceof errors_js_1.XCropError)
|
|
@@ -171,11 +171,11 @@ class HttpClient {
|
|
|
171
171
|
const msg = errorBody.error ?? `HTTP ${response.status}`;
|
|
172
172
|
// Non-retryable
|
|
173
173
|
if (response.status === 401)
|
|
174
|
-
throw new errors_js_1.AuthError(msg, responseHeaders);
|
|
174
|
+
throw new errors_js_1.AuthError(msg, responseHeaders, errorBody.code, errorReason(errorBody));
|
|
175
175
|
if (response.status === 403)
|
|
176
|
-
throw new errors_js_1.ForbiddenError(msg, responseHeaders);
|
|
176
|
+
throw new errors_js_1.ForbiddenError(msg, responseHeaders, errorBody.code, errorReason(errorBody));
|
|
177
177
|
if (response.status === 404)
|
|
178
|
-
throw new errors_js_1.NotFoundError(msg, responseHeaders);
|
|
178
|
+
throw new errors_js_1.NotFoundError(msg, responseHeaders, errorBody.code, errorReason(errorBody));
|
|
179
179
|
// Retryable: 429
|
|
180
180
|
if (response.status === 429) {
|
|
181
181
|
if (attempt < maxAttempts - 1) {
|
|
@@ -193,7 +193,7 @@ class HttpClient {
|
|
|
193
193
|
continue;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
throw new errors_js_1.XCropError(msg, response.status, errorBody.code ?? 'ERROR', responseHeaders);
|
|
196
|
+
throw new errors_js_1.XCropError(msg, response.status, errorBody.code ?? 'ERROR', responseHeaders, errorReason(errorBody));
|
|
197
197
|
}
|
|
198
198
|
catch (err) {
|
|
199
199
|
if (err instanceof errors_js_1.XCropError)
|
|
@@ -231,6 +231,10 @@ class HttpClient {
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
exports.HttpClient = HttpClient;
|
|
234
|
+
/** `reason` (404 detail) or `x_reason` (X's wording on a refused write). */
|
|
235
|
+
function errorReason(body) {
|
|
236
|
+
return body.reason ?? body.x_reason ?? null;
|
|
237
|
+
}
|
|
234
238
|
function extractHeaders(headers) {
|
|
235
239
|
const result = {};
|
|
236
240
|
headers.forEach((value, key) => {
|
package/dist/cjs/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src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C9C,CAAC;AAED,SAAS,cAAc,CAAC,OAAgB;IACtC,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC7B,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,OAAe;IACnC,2CAA2C;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;IACnC,OAAO,IAAI,GAAG,MAAM,CAAC;AACvB,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -9,5 +9,7 @@ export { TrendingResource } from './resources/trending.js';
|
|
|
9
9
|
export { CommunitiesResource } from './resources/communities.js';
|
|
10
10
|
export { AccountResource } from './resources/account.js';
|
|
11
11
|
export { StreamResource, RealtimeStream } from './resources/stream.js';
|
|
12
|
-
export
|
|
12
|
+
export { DmResource } from './resources/dm.js';
|
|
13
|
+
export { MediaResource } from './resources/media.js';
|
|
14
|
+
export type { XCropOptions, ApiMeta, ApiResponse, ApiErrorResponse, XCropErrorCode, PaginationParams, PaginatedResponse, User, UserAffiliation, CheckFollowResult, Tweet, TweetMetrics, TweetInReplyTo, TweetEntities, TweetEdit, TweetPlace, TweetCard, TweetCommunity, Media, MediaVideo, MediaVideoVariant, UrlEntity, List, TrendingTopic, TrendingParams, Community, SearchTweetsParams, SearchUsersParams, ConnectAccountParams, AccountStatus, AccountCredits, CreateTweetParams, ReplyTweetParams, QuoteTweetParams, WriteResult, TweetToggleResult, BookmarkResult, PinResult, UserToggleResult, MuteResult, BlockResult, UpdateProfileParams, UpdateProfileResult, SendDmParams, SendDmResult, UploadMediaParams, UploadMediaResult, ListTweetsParams, InteractionCheckResult, QualifiedAccountParams, QualifiedAccountResult, QualifiedNameParams, QualifiedNameResult, FollowersIdsParams, FollowersIdsMeta, FollowersIdsResponse, CommunityTweetsParams, CommunityMembersParams, CommunityModeratorsParams, TimeWindowParams, UserLookupParams, UserPaginationParams, UserListParams, UserMentionsParams, TweetQuotesParams, ConversationParams, StreamOptions, StreamEvent, RequestOptions, } from './types.js';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,OAAO,EACL,UAAU,EACV,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,GACf,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,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