x-twitter-scraper 0.1.0 → 0.2.1
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 +31 -0
- package/README.md +5 -5
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +19 -0
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +19 -0
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +20 -1
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +20 -1
- package/resources/account.mjs.map +1 -1
- package/resources/api-keys.d.mts +20 -0
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +20 -0
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +20 -3
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +20 -3
- package/resources/api-keys.mjs.map +1 -1
- package/resources/compose.d.mts +28 -3
- package/resources/compose.d.mts.map +1 -1
- package/resources/compose.d.ts +28 -3
- package/resources/compose.d.ts.map +1 -1
- package/resources/compose.js +9 -0
- package/resources/compose.js.map +1 -1
- package/resources/compose.mjs +9 -0
- package/resources/compose.mjs.map +1 -1
- package/resources/credits.d.mts +12 -0
- package/resources/credits.d.mts.map +1 -1
- package/resources/credits.d.ts +12 -0
- package/resources/credits.d.ts.map +1 -1
- package/resources/credits.js +12 -0
- package/resources/credits.js.map +1 -1
- package/resources/credits.mjs +12 -0
- package/resources/credits.mjs.map +1 -1
- package/resources/drafts.d.mts +33 -0
- package/resources/drafts.d.mts.map +1 -1
- package/resources/drafts.d.ts +33 -0
- package/resources/drafts.d.ts.map +1 -1
- package/resources/drafts.js +24 -0
- package/resources/drafts.js.map +1 -1
- package/resources/drafts.mjs +24 -0
- package/resources/drafts.mjs.map +1 -1
- package/resources/draws.d.mts +46 -1
- package/resources/draws.d.mts.map +1 -1
- package/resources/draws.d.ts +46 -1
- package/resources/draws.d.ts.map +1 -1
- package/resources/draws.js +27 -0
- package/resources/draws.js.map +1 -1
- package/resources/draws.mjs +27 -0
- package/resources/draws.mjs.map +1 -1
- package/resources/events.d.mts +25 -1
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +25 -1
- package/resources/events.d.ts.map +1 -1
- package/resources/extractions.d.mts +74 -5
- package/resources/extractions.d.mts.map +1 -1
- package/resources/extractions.d.ts +74 -5
- package/resources/extractions.d.ts.map +1 -1
- package/resources/extractions.js +36 -0
- package/resources/extractions.js.map +1 -1
- package/resources/extractions.mjs +36 -0
- package/resources/extractions.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/integrations.d.mts +77 -0
- package/resources/integrations.d.mts.map +1 -1
- package/resources/integrations.d.ts +77 -0
- package/resources/integrations.d.ts.map +1 -1
- package/resources/integrations.js +47 -0
- package/resources/integrations.js.map +1 -1
- package/resources/integrations.mjs +47 -0
- package/resources/integrations.mjs.map +1 -1
- package/resources/monitors.d.mts +46 -0
- package/resources/monitors.d.mts.map +1 -1
- package/resources/monitors.d.ts +46 -0
- package/resources/monitors.d.ts.map +1 -1
- package/resources/monitors.js +31 -0
- package/resources/monitors.js.map +1 -1
- package/resources/monitors.mjs +31 -0
- package/resources/monitors.mjs.map +1 -1
- package/resources/radar.d.mts +4 -1
- package/resources/radar.d.mts.map +1 -1
- package/resources/radar.d.ts +4 -1
- package/resources/radar.d.ts.map +1 -1
- package/resources/shared.d.mts +12 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +12 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/styles.d.mts +63 -4
- package/resources/styles.d.mts.map +1 -1
- package/resources/styles.d.ts +63 -4
- package/resources/styles.d.ts.map +1 -1
- package/resources/styles.js +55 -8
- package/resources/styles.js.map +1 -1
- package/resources/styles.mjs +55 -8
- package/resources/styles.mjs.map +1 -1
- package/resources/support/tickets.d.mts +34 -0
- package/resources/support/tickets.d.mts.map +1 -1
- package/resources/support/tickets.d.ts +34 -0
- package/resources/support/tickets.d.ts.map +1 -1
- package/resources/support/tickets.js +34 -0
- package/resources/support/tickets.js.map +1 -1
- package/resources/support/tickets.mjs +34 -0
- package/resources/support/tickets.mjs.map +1 -1
- package/resources/trends.d.mts +4 -1
- package/resources/trends.d.mts.map +1 -1
- package/resources/trends.d.ts +4 -1
- package/resources/trends.d.ts.map +1 -1
- package/resources/trends.js +1 -1
- package/resources/trends.mjs +1 -1
- package/resources/webhooks.d.mts +54 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +54 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +36 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +36 -0
- package/resources/webhooks.mjs.map +1 -1
- package/resources/x/accounts.d.mts +59 -3
- package/resources/x/accounts.d.mts.map +1 -1
- package/resources/x/accounts.d.ts +59 -3
- package/resources/x/accounts.d.ts.map +1 -1
- package/resources/x/accounts.js +55 -5
- package/resources/x/accounts.js.map +1 -1
- package/resources/x/accounts.mjs +55 -5
- package/resources/x/accounts.mjs.map +1 -1
- package/resources/x/bookmarks.d.mts +11 -1
- package/resources/x/bookmarks.d.mts.map +1 -1
- package/resources/x/bookmarks.d.ts +11 -1
- package/resources/x/bookmarks.d.ts.map +1 -1
- package/resources/x/bookmarks.js +10 -0
- package/resources/x/bookmarks.js.map +1 -1
- package/resources/x/bookmarks.mjs +10 -0
- package/resources/x/bookmarks.mjs.map +1 -1
- package/resources/x/communities/communities.d.mts +118 -11
- package/resources/x/communities/communities.d.mts.map +1 -1
- package/resources/x/communities/communities.d.ts +118 -11
- package/resources/x/communities/communities.d.ts.map +1 -1
- package/resources/x/communities/communities.js +45 -16
- package/resources/x/communities/communities.js.map +1 -1
- package/resources/x/communities/communities.mjs +45 -16
- package/resources/x/communities/communities.mjs.map +1 -1
- package/resources/x/communities/index.d.mts +1 -1
- package/resources/x/communities/index.d.mts.map +1 -1
- package/resources/x/communities/index.d.ts +1 -1
- 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.map +1 -1
- package/resources/x/communities/join.d.mts +18 -2
- package/resources/x/communities/join.d.mts.map +1 -1
- package/resources/x/communities/join.d.ts +18 -2
- package/resources/x/communities/join.d.ts.map +1 -1
- package/resources/x/communities/join.js +16 -0
- package/resources/x/communities/join.js.map +1 -1
- package/resources/x/communities/join.mjs +16 -0
- package/resources/x/communities/join.mjs.map +1 -1
- package/resources/x/communities/tweets.d.mts +28 -5
- package/resources/x/communities/tweets.d.mts.map +1 -1
- package/resources/x/communities/tweets.d.ts +28 -5
- package/resources/x/communities/tweets.d.ts.map +1 -1
- package/resources/x/communities/tweets.js +20 -6
- package/resources/x/communities/tweets.js.map +1 -1
- package/resources/x/communities/tweets.mjs +20 -6
- package/resources/x/communities/tweets.mjs.map +1 -1
- package/resources/x/dm.d.mts +19 -2
- package/resources/x/dm.d.mts.map +1 -1
- package/resources/x/dm.d.ts +19 -2
- package/resources/x/dm.d.ts.map +1 -1
- package/resources/x/dm.js +17 -0
- package/resources/x/dm.js.map +1 -1
- package/resources/x/dm.mjs +17 -0
- package/resources/x/dm.mjs.map +1 -1
- package/resources/x/followers.d.mts +8 -0
- package/resources/x/followers.d.mts.map +1 -1
- package/resources/x/followers.d.ts +8 -0
- package/resources/x/followers.d.ts.map +1 -1
- package/resources/x/followers.js +8 -0
- package/resources/x/followers.js.map +1 -1
- package/resources/x/followers.mjs +8 -0
- package/resources/x/followers.mjs.map +1 -1
- package/resources/x/index.d.mts +2 -2
- package/resources/x/index.d.mts.map +1 -1
- package/resources/x/index.d.ts +2 -2
- package/resources/x/index.d.ts.map +1 -1
- package/resources/x/index.js.map +1 -1
- package/resources/x/index.mjs.map +1 -1
- package/resources/x/lists.d.mts +27 -6
- package/resources/x/lists.d.mts.map +1 -1
- package/resources/x/lists.d.ts +27 -6
- package/resources/x/lists.d.ts.map +1 -1
- package/resources/x/lists.js +23 -16
- package/resources/x/lists.js.map +1 -1
- package/resources/x/lists.mjs +23 -16
- package/resources/x/lists.mjs.map +1 -1
- package/resources/x/media.d.mts +17 -1
- package/resources/x/media.d.mts.map +1 -1
- package/resources/x/media.d.ts +17 -1
- package/resources/x/media.d.ts.map +1 -1
- package/resources/x/media.js +16 -0
- package/resources/x/media.js.map +1 -1
- package/resources/x/media.mjs +16 -0
- package/resources/x/media.mjs.map +1 -1
- package/resources/x/profile.d.mts +30 -3
- package/resources/x/profile.d.mts.map +1 -1
- package/resources/x/profile.d.ts +30 -3
- package/resources/x/profile.d.ts.map +1 -1
- package/resources/x/profile.js +27 -0
- package/resources/x/profile.js.map +1 -1
- package/resources/x/profile.mjs +27 -0
- package/resources/x/profile.mjs.map +1 -1
- package/resources/x/tweets/like.d.mts +18 -4
- package/resources/x/tweets/like.d.mts.map +1 -1
- package/resources/x/tweets/like.d.ts +18 -4
- package/resources/x/tweets/like.d.ts.map +1 -1
- package/resources/x/tweets/like.js +18 -4
- package/resources/x/tweets/like.js.map +1 -1
- package/resources/x/tweets/like.mjs +18 -4
- package/resources/x/tweets/like.mjs.map +1 -1
- package/resources/x/tweets/retweet.d.mts +18 -4
- package/resources/x/tweets/retweet.d.mts.map +1 -1
- package/resources/x/tweets/retweet.d.ts +18 -4
- package/resources/x/tweets/retweet.d.ts.map +1 -1
- package/resources/x/tweets/retweet.js +18 -4
- package/resources/x/tweets/retweet.js.map +1 -1
- package/resources/x/tweets/retweet.mjs +18 -4
- package/resources/x/tweets/retweet.mjs.map +1 -1
- package/resources/x/tweets/tweets.d.mts +146 -15
- package/resources/x/tweets/tweets.d.mts.map +1 -1
- package/resources/x/tweets/tweets.d.ts +146 -15
- package/resources/x/tweets/tweets.d.ts.map +1 -1
- package/resources/x/tweets/tweets.js +74 -10
- package/resources/x/tweets/tweets.js.map +1 -1
- package/resources/x/tweets/tweets.mjs +74 -10
- package/resources/x/tweets/tweets.mjs.map +1 -1
- package/resources/x/users/follow.d.mts +19 -4
- package/resources/x/users/follow.d.mts.map +1 -1
- package/resources/x/users/follow.d.ts +19 -4
- package/resources/x/users/follow.d.ts.map +1 -1
- package/resources/x/users/follow.js +19 -4
- package/resources/x/users/follow.js.map +1 -1
- package/resources/x/users/follow.mjs +19 -4
- package/resources/x/users/follow.mjs.map +1 -1
- package/resources/x/users/users.d.mts +94 -21
- package/resources/x/users/users.d.mts.map +1 -1
- package/resources/x/users/users.d.ts +94 -21
- package/resources/x/users/users.d.ts.map +1 -1
- package/resources/x/users/users.js +78 -33
- package/resources/x/users/users.js.map +1 -1
- package/resources/x/users/users.mjs +78 -33
- package/resources/x/users/users.mjs.map +1 -1
- package/resources/x/x.d.mts +42 -6
- package/resources/x/x.d.mts.map +1 -1
- package/resources/x/x.d.ts +42 -6
- package/resources/x/x.d.ts.map +1 -1
- package/resources/x/x.js +21 -5
- package/resources/x/x.js.map +1 -1
- package/resources/x/x.mjs +21 -5
- package/resources/x/x.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/account.ts +20 -1
- package/src/resources/api-keys.ts +23 -3
- package/src/resources/compose.ts +32 -1
- package/src/resources/credits.ts +12 -0
- package/src/resources/drafts.ts +33 -0
- package/src/resources/draws.ts +46 -1
- package/src/resources/events.ts +25 -1
- package/src/resources/extractions.ts +74 -5
- package/src/resources/index.ts +1 -0
- package/src/resources/integrations.ts +77 -0
- package/src/resources/monitors.ts +46 -0
- package/src/resources/radar.ts +4 -1
- package/src/resources/shared.ts +12 -0
- package/src/resources/styles.ts +67 -8
- package/src/resources/support/tickets.ts +34 -0
- package/src/resources/trends.ts +4 -1
- package/src/resources/webhooks.ts +54 -0
- package/src/resources/x/accounts.ts +72 -7
- package/src/resources/x/bookmarks.ts +11 -1
- package/src/resources/x/communities/communities.ts +142 -26
- package/src/resources/x/communities/index.ts +1 -1
- package/src/resources/x/communities/join.ts +18 -2
- package/src/resources/x/communities/tweets.ts +41 -11
- package/src/resources/x/dm.ts +19 -2
- package/src/resources/x/followers.ts +8 -0
- package/src/resources/x/index.ts +2 -0
- package/src/resources/x/lists.ts +30 -22
- package/src/resources/x/media.ts +17 -1
- package/src/resources/x/profile.ts +30 -3
- package/src/resources/x/tweets/like.ts +20 -6
- package/src/resources/x/tweets/retweet.ts +20 -14
- package/src/resources/x/tweets/tweets.ts +157 -27
- package/src/resources/x/users/follow.ts +21 -10
- package/src/resources/x/users/users.ts +103 -52
- package/src/resources/x/x.ts +50 -8
- package/src/version.ts +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/x/accounts.js
CHANGED
|
@@ -10,33 +10,83 @@ const path_1 = require("../../internal/utils/path.js");
|
|
|
10
10
|
class Accounts extends resource_1.APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Connect X account
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const account = await client.x.accounts.create({
|
|
17
|
+
* email: 'user@example.com',
|
|
18
|
+
* password: 's3cur3Pa$$w0rd',
|
|
19
|
+
* username: 'elonmusk',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
13
22
|
*/
|
|
14
23
|
create(body, options) {
|
|
15
|
-
return this._client.post('/x/accounts', { body, ...options, __security: {} });
|
|
24
|
+
return this._client.post('/x/accounts', { body, ...options, __security: { apiKeyAuth: true } });
|
|
16
25
|
}
|
|
17
26
|
/**
|
|
18
27
|
* Get X account details
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const xAccountDetail = await client.x.accounts.retrieve(
|
|
32
|
+
* 'id',
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
19
35
|
*/
|
|
20
36
|
retrieve(id, options) {
|
|
21
|
-
return this._client.get((0, path_1.path) `/x/accounts/${id}`, { ...options, __security: {} });
|
|
37
|
+
return this._client.get((0, path_1.path) `/x/accounts/${id}`, { ...options, __security: { apiKeyAuth: true } });
|
|
22
38
|
}
|
|
23
39
|
/**
|
|
24
40
|
* List connected X accounts
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const accounts = await client.x.accounts.list();
|
|
45
|
+
* ```
|
|
25
46
|
*/
|
|
26
47
|
list(options) {
|
|
27
|
-
return this._client.get('/x/accounts', { ...options, __security: {} });
|
|
48
|
+
return this._client.get('/x/accounts', { ...options, __security: { apiKeyAuth: true } });
|
|
28
49
|
}
|
|
29
50
|
/**
|
|
30
51
|
* Disconnect X account
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const account = await client.x.accounts.delete('id');
|
|
56
|
+
* ```
|
|
31
57
|
*/
|
|
32
58
|
delete(id, options) {
|
|
33
|
-
return this._client.delete((0, path_1.path) `/x/accounts/${id}`, { ...options, __security: {} });
|
|
59
|
+
return this._client.delete((0, path_1.path) `/x/accounts/${id}`, { ...options, __security: { apiKeyAuth: true } });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Clears loginFailedAt and loginFailureReason for all accounts with transient or
|
|
63
|
+
* automated failure reasons, making them eligible for retry on next use.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const response = await client.x.accounts.bulkRetry();
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
bulkRetry(options) {
|
|
71
|
+
return this._client.post('/x/accounts/bulk-retry', { ...options, __security: { apiKeyAuth: true } });
|
|
34
72
|
}
|
|
35
73
|
/**
|
|
36
74
|
* Re-authenticate X account
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const response = await client.x.accounts.reauth('id', {
|
|
79
|
+
* password: 'password_value',
|
|
80
|
+
* totp_secret: 'totp_secret_value',
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
37
83
|
*/
|
|
38
84
|
reauth(id, body, options) {
|
|
39
|
-
return this._client.post((0, path_1.path) `/x/accounts/${id}/reauth`, {
|
|
85
|
+
return this._client.post((0, path_1.path) `/x/accounts/${id}/reauth`, {
|
|
86
|
+
body,
|
|
87
|
+
...options,
|
|
88
|
+
__security: { apiKeyAuth: true },
|
|
89
|
+
});
|
|
40
90
|
}
|
|
41
91
|
}
|
|
42
92
|
exports.Accounts = Accounts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,eAAe,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,OAAwB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,eAAe,EAAE,SAAS,EAAE;YACvD,IAAI;YACJ,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AAtFD,4BAsFC"}
|
package/resources/x/accounts.mjs
CHANGED
|
@@ -7,33 +7,83 @@ import { path } from "../../internal/utils/path.mjs";
|
|
|
7
7
|
export class Accounts extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Connect X account
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const account = await client.x.accounts.create({
|
|
14
|
+
* email: 'user@example.com',
|
|
15
|
+
* password: 's3cur3Pa$$w0rd',
|
|
16
|
+
* username: 'elonmusk',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
10
19
|
*/
|
|
11
20
|
create(body, options) {
|
|
12
|
-
return this._client.post('/x/accounts', { body, ...options, __security: {} });
|
|
21
|
+
return this._client.post('/x/accounts', { body, ...options, __security: { apiKeyAuth: true } });
|
|
13
22
|
}
|
|
14
23
|
/**
|
|
15
24
|
* Get X account details
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const xAccountDetail = await client.x.accounts.retrieve(
|
|
29
|
+
* 'id',
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
16
32
|
*/
|
|
17
33
|
retrieve(id, options) {
|
|
18
|
-
return this._client.get(path `/x/accounts/${id}`, { ...options, __security: {} });
|
|
34
|
+
return this._client.get(path `/x/accounts/${id}`, { ...options, __security: { apiKeyAuth: true } });
|
|
19
35
|
}
|
|
20
36
|
/**
|
|
21
37
|
* List connected X accounts
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const accounts = await client.x.accounts.list();
|
|
42
|
+
* ```
|
|
22
43
|
*/
|
|
23
44
|
list(options) {
|
|
24
|
-
return this._client.get('/x/accounts', { ...options, __security: {} });
|
|
45
|
+
return this._client.get('/x/accounts', { ...options, __security: { apiKeyAuth: true } });
|
|
25
46
|
}
|
|
26
47
|
/**
|
|
27
48
|
* Disconnect X account
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const account = await client.x.accounts.delete('id');
|
|
53
|
+
* ```
|
|
28
54
|
*/
|
|
29
55
|
delete(id, options) {
|
|
30
|
-
return this._client.delete(path `/x/accounts/${id}`, { ...options, __security: {} });
|
|
56
|
+
return this._client.delete(path `/x/accounts/${id}`, { ...options, __security: { apiKeyAuth: true } });
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Clears loginFailedAt and loginFailureReason for all accounts with transient or
|
|
60
|
+
* automated failure reasons, making them eligible for retry on next use.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const response = await client.x.accounts.bulkRetry();
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
bulkRetry(options) {
|
|
68
|
+
return this._client.post('/x/accounts/bulk-retry', { ...options, __security: { apiKeyAuth: true } });
|
|
31
69
|
}
|
|
32
70
|
/**
|
|
33
71
|
* Re-authenticate X account
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const response = await client.x.accounts.reauth('id', {
|
|
76
|
+
* password: 'password_value',
|
|
77
|
+
* totp_secret: 'totp_secret_value',
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
34
80
|
*/
|
|
35
81
|
reauth(id, body, options) {
|
|
36
|
-
return this._client.post(path `/x/accounts/${id}/reauth`, {
|
|
82
|
+
return this._client.post(path `/x/accounts/${id}/reauth`, {
|
|
83
|
+
body,
|
|
84
|
+
...options,
|
|
85
|
+
__security: { apiKeyAuth: true },
|
|
86
|
+
});
|
|
37
87
|
}
|
|
38
88
|
}
|
|
39
89
|
//# sourceMappingURL=accounts.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../../src/resources/x/accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAA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AAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -8,10 +8,20 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
8
8
|
export declare class Bookmarks extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Get bookmarked tweets
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const paginatedTweets = await client.x.bookmarks.list();
|
|
15
|
+
* ```
|
|
11
16
|
*/
|
|
12
17
|
list(query?: BookmarkListParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
13
18
|
/**
|
|
14
19
|
* Get bookmark folders
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const response = await client.x.bookmarks.retrieveFolders();
|
|
24
|
+
* ```
|
|
15
25
|
*/
|
|
16
26
|
retrieveFolders(options?: RequestOptions): APIPromise<BookmarkRetrieveFoldersResponse>;
|
|
17
27
|
}
|
|
@@ -28,7 +38,7 @@ export declare namespace BookmarkRetrieveFoldersResponse {
|
|
|
28
38
|
}
|
|
29
39
|
export interface BookmarkListParams {
|
|
30
40
|
/**
|
|
31
|
-
* Pagination cursor
|
|
41
|
+
* Pagination cursor for bookmarks
|
|
32
42
|
*/
|
|
33
43
|
cursor?: string;
|
|
34
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookmarks.d.mts","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"bookmarks.d.mts","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC;IAIrC;;;;;;;OAOG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;CAGvF;AAED,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,KAAK,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC;IAEvD,aAAa,EAAE,OAAO,CAAC;IAEvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;QAEX,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -8,10 +8,20 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
8
8
|
export declare class Bookmarks extends APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Get bookmarked tweets
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const paginatedTweets = await client.x.bookmarks.list();
|
|
15
|
+
* ```
|
|
11
16
|
*/
|
|
12
17
|
list(query?: BookmarkListParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
13
18
|
/**
|
|
14
19
|
* Get bookmark folders
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const response = await client.x.bookmarks.retrieveFolders();
|
|
24
|
+
* ```
|
|
15
25
|
*/
|
|
16
26
|
retrieveFolders(options?: RequestOptions): APIPromise<BookmarkRetrieveFoldersResponse>;
|
|
17
27
|
}
|
|
@@ -28,7 +38,7 @@ export declare namespace BookmarkRetrieveFoldersResponse {
|
|
|
28
38
|
}
|
|
29
39
|
export interface BookmarkListParams {
|
|
30
40
|
/**
|
|
31
|
-
* Pagination cursor
|
|
41
|
+
* Pagination cursor for bookmarks
|
|
32
42
|
*/
|
|
33
43
|
cursor?: string;
|
|
34
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookmarks.d.ts","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"bookmarks.d.ts","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;OAOG;IACH,IAAI,CACF,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC;IAIrC;;;;;;;OAOG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;CAGvF;AAED,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,KAAK,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC;IAEvD,aAAa,EAAE,OAAO,CAAC;IAEvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;QAEX,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
package/resources/x/bookmarks.js
CHANGED
|
@@ -9,12 +9,22 @@ const resource_1 = require("../../core/resource.js");
|
|
|
9
9
|
class Bookmarks extends resource_1.APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Get bookmarked tweets
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const paginatedTweets = await client.x.bookmarks.list();
|
|
16
|
+
* ```
|
|
12
17
|
*/
|
|
13
18
|
list(query = {}, options) {
|
|
14
19
|
return this._client.get('/x/bookmarks', { query, ...options });
|
|
15
20
|
}
|
|
16
21
|
/**
|
|
17
22
|
* Get bookmark folders
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response = await client.x.bookmarks.retrieveFolders();
|
|
27
|
+
* ```
|
|
18
28
|
*/
|
|
19
29
|
retrieveFolders(options) {
|
|
20
30
|
return this._client.get('/x/bookmarks/folders', options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookmarks.js","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC
|
|
1
|
+
{"version":3,"file":"bookmarks.js","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;OAOG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AA3BD,8BA2BC"}
|
|
@@ -6,12 +6,22 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
6
6
|
export class Bookmarks extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Get bookmarked tweets
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const paginatedTweets = await client.x.bookmarks.list();
|
|
13
|
+
* ```
|
|
9
14
|
*/
|
|
10
15
|
list(query = {}, options) {
|
|
11
16
|
return this._client.get('/x/bookmarks', { query, ...options });
|
|
12
17
|
}
|
|
13
18
|
/**
|
|
14
19
|
* Get bookmark folders
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const response = await client.x.bookmarks.retrieveFolders();
|
|
24
|
+
* ```
|
|
15
25
|
*/
|
|
16
26
|
retrieveFolders(options) {
|
|
17
27
|
return this._client.get('/x/bookmarks/folders', options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bookmarks.mjs","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"bookmarks.mjs","sourceRoot":"","sources":["../../src/resources/x/bookmarks.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;OAOG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../../shared.mjs";
|
|
2
3
|
import * as JoinAPI from "./join.mjs";
|
|
3
4
|
import { Join, JoinCreateParams, JoinDeleteAllParams } from "./join.mjs";
|
|
4
5
|
import * as TweetsAPI from "./tweets.mjs";
|
|
5
|
-
import { TweetListParams, Tweets } from "./tweets.mjs";
|
|
6
|
+
import { TweetListByCommunityParams, TweetListParams, Tweets } from "./tweets.mjs";
|
|
6
7
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
7
8
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
8
9
|
export declare class Communities extends APIResource {
|
|
@@ -10,29 +11,74 @@ export declare class Communities extends APIResource {
|
|
|
10
11
|
tweets: TweetsAPI.Tweets;
|
|
11
12
|
/**
|
|
12
13
|
* Create community
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const community = await client.x.communities.create({
|
|
18
|
+
* account: '@elonmusk',
|
|
19
|
+
* name: 'Example Name',
|
|
20
|
+
* description: 'A community for Tesla enthusiasts',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
13
23
|
*/
|
|
14
24
|
create(body: CommunityCreateParams, options?: RequestOptions): APIPromise<CommunityCreateResponse>;
|
|
15
25
|
/**
|
|
16
26
|
* Delete community
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const community = await client.x.communities.delete('id', {
|
|
31
|
+
* account: '@elonmusk',
|
|
32
|
+
* community_name: 'Tesla Fans',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
17
35
|
*/
|
|
18
36
|
delete(id: string, body: CommunityDeleteParams, options?: RequestOptions): APIPromise<CommunityDeleteResponse>;
|
|
19
37
|
/**
|
|
20
38
|
* Get community details
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const response = await client.x.communities.retrieveInfo(
|
|
43
|
+
* 'id',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
21
46
|
*/
|
|
22
47
|
retrieveInfo(id: string, options?: RequestOptions): APIPromise<CommunityRetrieveInfoResponse>;
|
|
23
48
|
/**
|
|
24
49
|
* Get community members
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const paginatedUsers =
|
|
54
|
+
* await client.x.communities.retrieveMembers('id');
|
|
55
|
+
* ```
|
|
25
56
|
*/
|
|
26
|
-
retrieveMembers(id: string, query?: CommunityRetrieveMembersParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
57
|
+
retrieveMembers(id: string, query?: CommunityRetrieveMembersParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
27
58
|
/**
|
|
28
59
|
* Get community moderators
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const paginatedUsers =
|
|
64
|
+
* await client.x.communities.retrieveModerators('id');
|
|
65
|
+
* ```
|
|
29
66
|
*/
|
|
30
|
-
retrieveModerators(id: string, query?: CommunityRetrieveModeratorsParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
67
|
+
retrieveModerators(id: string, query?: CommunityRetrieveModeratorsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
|
|
31
68
|
/**
|
|
32
69
|
* Search tweets across communities
|
|
33
|
-
|
|
34
|
-
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const paginatedTweets =
|
|
74
|
+
* await client.x.communities.retrieveSearch({ q: 'q' });
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
retrieveSearch(query: CommunityRetrieveSearchParams, options?: RequestOptions): APIPromise<Shared.PaginatedTweets>;
|
|
35
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Result of a community join or leave action.
|
|
81
|
+
*/
|
|
36
82
|
export interface CommunityActionResult {
|
|
37
83
|
communityId: string;
|
|
38
84
|
communityName: string;
|
|
@@ -50,11 +96,72 @@ export interface CommunityRetrieveInfoResponse {
|
|
|
50
96
|
/**
|
|
51
97
|
* Community info object
|
|
52
98
|
*/
|
|
53
|
-
community:
|
|
99
|
+
community: CommunityRetrieveInfoResponse.Community;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace CommunityRetrieveInfoResponse {
|
|
102
|
+
/**
|
|
103
|
+
* Community info object
|
|
104
|
+
*/
|
|
105
|
+
interface Community {
|
|
106
|
+
/**
|
|
107
|
+
* Unique community identifier
|
|
108
|
+
*/
|
|
109
|
+
id: string;
|
|
110
|
+
/**
|
|
111
|
+
* Community banner image URL
|
|
112
|
+
*/
|
|
113
|
+
banner_url?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Community creation timestamp
|
|
116
|
+
*/
|
|
117
|
+
created_at?: string;
|
|
118
|
+
/**
|
|
119
|
+
* About text for the community
|
|
120
|
+
*/
|
|
121
|
+
description?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Join policy (open or restricted)
|
|
124
|
+
*/
|
|
125
|
+
join_policy?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Total member count
|
|
128
|
+
*/
|
|
129
|
+
member_count?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Total moderator count
|
|
132
|
+
*/
|
|
133
|
+
moderator_count?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Display name of the community
|
|
136
|
+
*/
|
|
137
|
+
name?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Primary topic
|
|
140
|
+
*/
|
|
141
|
+
primary_topic?: Community.PrimaryTopic;
|
|
142
|
+
/**
|
|
143
|
+
* Community rules
|
|
144
|
+
*/
|
|
145
|
+
rules?: Array<Community.Rule>;
|
|
146
|
+
}
|
|
147
|
+
namespace Community {
|
|
148
|
+
/**
|
|
149
|
+
* Primary topic
|
|
150
|
+
*/
|
|
151
|
+
interface PrimaryTopic {
|
|
152
|
+
id?: string;
|
|
153
|
+
name?: string;
|
|
154
|
+
}
|
|
155
|
+
interface Rule {
|
|
156
|
+
id?: string;
|
|
157
|
+
description?: string;
|
|
158
|
+
name?: string;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
54
161
|
}
|
|
55
162
|
export interface CommunityCreateParams {
|
|
56
163
|
/**
|
|
57
|
-
* X account (@username or
|
|
164
|
+
* X account (@username or ID) creating the community
|
|
58
165
|
*/
|
|
59
166
|
account: string;
|
|
60
167
|
/**
|
|
@@ -68,7 +175,7 @@ export interface CommunityCreateParams {
|
|
|
68
175
|
}
|
|
69
176
|
export interface CommunityDeleteParams {
|
|
70
177
|
/**
|
|
71
|
-
* X account (@username or
|
|
178
|
+
* X account (@username or ID) deleting the community
|
|
72
179
|
*/
|
|
73
180
|
account: string;
|
|
74
181
|
/**
|
|
@@ -84,7 +191,7 @@ export interface CommunityRetrieveMembersParams {
|
|
|
84
191
|
}
|
|
85
192
|
export interface CommunityRetrieveModeratorsParams {
|
|
86
193
|
/**
|
|
87
|
-
* Pagination cursor
|
|
194
|
+
* Pagination cursor for community moderators
|
|
88
195
|
*/
|
|
89
196
|
cursor?: string;
|
|
90
197
|
}
|
|
@@ -94,7 +201,7 @@ export interface CommunityRetrieveSearchParams {
|
|
|
94
201
|
*/
|
|
95
202
|
q: string;
|
|
96
203
|
/**
|
|
97
|
-
* Pagination cursor
|
|
204
|
+
* Pagination cursor for community search
|
|
98
205
|
*/
|
|
99
206
|
cursor?: string;
|
|
100
207
|
/**
|
|
@@ -105,6 +212,6 @@ export interface CommunityRetrieveSearchParams {
|
|
|
105
212
|
export declare namespace Communities {
|
|
106
213
|
export { type CommunityActionResult as CommunityActionResult, type CommunityCreateResponse as CommunityCreateResponse, type CommunityDeleteResponse as CommunityDeleteResponse, type CommunityRetrieveInfoResponse as CommunityRetrieveInfoResponse, type CommunityCreateParams as CommunityCreateParams, type CommunityDeleteParams as CommunityDeleteParams, type CommunityRetrieveMembersParams as CommunityRetrieveMembersParams, type CommunityRetrieveModeratorsParams as CommunityRetrieveModeratorsParams, type CommunityRetrieveSearchParams as CommunityRetrieveSearchParams, };
|
|
107
214
|
export { Join as Join, type JoinCreateParams as JoinCreateParams, type JoinDeleteAllParams as JoinDeleteAllParams, };
|
|
108
|
-
export { Tweets as Tweets, type TweetListParams as TweetListParams };
|
|
215
|
+
export { Tweets as Tweets, type TweetListParams as TweetListParams, type TweetListByCommunityParams as TweetListByCommunityParams, };
|
|
109
216
|
}
|
|
110
217
|
//# sourceMappingURL=communities.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communities.d.mts","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,gBAAgB,EAAE,mBAAmB,EAAE;OAC/C,KAAK,SAAS;OACd,EAAE,eAAe,EAAE,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"communities.d.mts","sourceRoot":"","s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