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.
Files changed (310) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +5 -5
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/account.d.mts +19 -0
  11. package/resources/account.d.mts.map +1 -1
  12. package/resources/account.d.ts +19 -0
  13. package/resources/account.d.ts.map +1 -1
  14. package/resources/account.js +20 -1
  15. package/resources/account.js.map +1 -1
  16. package/resources/account.mjs +20 -1
  17. package/resources/account.mjs.map +1 -1
  18. package/resources/api-keys.d.mts +20 -0
  19. package/resources/api-keys.d.mts.map +1 -1
  20. package/resources/api-keys.d.ts +20 -0
  21. package/resources/api-keys.d.ts.map +1 -1
  22. package/resources/api-keys.js +20 -3
  23. package/resources/api-keys.js.map +1 -1
  24. package/resources/api-keys.mjs +20 -3
  25. package/resources/api-keys.mjs.map +1 -1
  26. package/resources/compose.d.mts +28 -3
  27. package/resources/compose.d.mts.map +1 -1
  28. package/resources/compose.d.ts +28 -3
  29. package/resources/compose.d.ts.map +1 -1
  30. package/resources/compose.js +9 -0
  31. package/resources/compose.js.map +1 -1
  32. package/resources/compose.mjs +9 -0
  33. package/resources/compose.mjs.map +1 -1
  34. package/resources/credits.d.mts +12 -0
  35. package/resources/credits.d.mts.map +1 -1
  36. package/resources/credits.d.ts +12 -0
  37. package/resources/credits.d.ts.map +1 -1
  38. package/resources/credits.js +12 -0
  39. package/resources/credits.js.map +1 -1
  40. package/resources/credits.mjs +12 -0
  41. package/resources/credits.mjs.map +1 -1
  42. package/resources/drafts.d.mts +33 -0
  43. package/resources/drafts.d.mts.map +1 -1
  44. package/resources/drafts.d.ts +33 -0
  45. package/resources/drafts.d.ts.map +1 -1
  46. package/resources/drafts.js +24 -0
  47. package/resources/drafts.js.map +1 -1
  48. package/resources/drafts.mjs +24 -0
  49. package/resources/drafts.mjs.map +1 -1
  50. package/resources/draws.d.mts +46 -1
  51. package/resources/draws.d.mts.map +1 -1
  52. package/resources/draws.d.ts +46 -1
  53. package/resources/draws.d.ts.map +1 -1
  54. package/resources/draws.js +27 -0
  55. package/resources/draws.js.map +1 -1
  56. package/resources/draws.mjs +27 -0
  57. package/resources/draws.mjs.map +1 -1
  58. package/resources/events.d.mts +25 -1
  59. package/resources/events.d.mts.map +1 -1
  60. package/resources/events.d.ts +25 -1
  61. package/resources/events.d.ts.map +1 -1
  62. package/resources/extractions.d.mts +74 -5
  63. package/resources/extractions.d.mts.map +1 -1
  64. package/resources/extractions.d.ts +74 -5
  65. package/resources/extractions.d.ts.map +1 -1
  66. package/resources/extractions.js +36 -0
  67. package/resources/extractions.js.map +1 -1
  68. package/resources/extractions.mjs +36 -0
  69. package/resources/extractions.mjs.map +1 -1
  70. package/resources/index.d.mts +1 -1
  71. package/resources/index.d.mts.map +1 -1
  72. package/resources/index.d.ts +1 -1
  73. package/resources/index.d.ts.map +1 -1
  74. package/resources/index.js.map +1 -1
  75. package/resources/index.mjs.map +1 -1
  76. package/resources/integrations.d.mts +77 -0
  77. package/resources/integrations.d.mts.map +1 -1
  78. package/resources/integrations.d.ts +77 -0
  79. package/resources/integrations.d.ts.map +1 -1
  80. package/resources/integrations.js +47 -0
  81. package/resources/integrations.js.map +1 -1
  82. package/resources/integrations.mjs +47 -0
  83. package/resources/integrations.mjs.map +1 -1
  84. package/resources/monitors.d.mts +46 -0
  85. package/resources/monitors.d.mts.map +1 -1
  86. package/resources/monitors.d.ts +46 -0
  87. package/resources/monitors.d.ts.map +1 -1
  88. package/resources/monitors.js +31 -0
  89. package/resources/monitors.js.map +1 -1
  90. package/resources/monitors.mjs +31 -0
  91. package/resources/monitors.mjs.map +1 -1
  92. package/resources/radar.d.mts +4 -1
  93. package/resources/radar.d.mts.map +1 -1
  94. package/resources/radar.d.ts +4 -1
  95. package/resources/radar.d.ts.map +1 -1
  96. package/resources/shared.d.mts +12 -0
  97. package/resources/shared.d.mts.map +1 -1
  98. package/resources/shared.d.ts +12 -0
  99. package/resources/shared.d.ts.map +1 -1
  100. package/resources/styles.d.mts +63 -4
  101. package/resources/styles.d.mts.map +1 -1
  102. package/resources/styles.d.ts +63 -4
  103. package/resources/styles.d.ts.map +1 -1
  104. package/resources/styles.js +55 -8
  105. package/resources/styles.js.map +1 -1
  106. package/resources/styles.mjs +55 -8
  107. package/resources/styles.mjs.map +1 -1
  108. package/resources/support/tickets.d.mts +34 -0
  109. package/resources/support/tickets.d.mts.map +1 -1
  110. package/resources/support/tickets.d.ts +34 -0
  111. package/resources/support/tickets.d.ts.map +1 -1
  112. package/resources/support/tickets.js +34 -0
  113. package/resources/support/tickets.js.map +1 -1
  114. package/resources/support/tickets.mjs +34 -0
  115. package/resources/support/tickets.mjs.map +1 -1
  116. package/resources/trends.d.mts +4 -1
  117. package/resources/trends.d.mts.map +1 -1
  118. package/resources/trends.d.ts +4 -1
  119. package/resources/trends.d.ts.map +1 -1
  120. package/resources/trends.js +1 -1
  121. package/resources/trends.mjs +1 -1
  122. package/resources/webhooks.d.mts +54 -0
  123. package/resources/webhooks.d.mts.map +1 -1
  124. package/resources/webhooks.d.ts +54 -0
  125. package/resources/webhooks.d.ts.map +1 -1
  126. package/resources/webhooks.js +36 -0
  127. package/resources/webhooks.js.map +1 -1
  128. package/resources/webhooks.mjs +36 -0
  129. package/resources/webhooks.mjs.map +1 -1
  130. package/resources/x/accounts.d.mts +59 -3
  131. package/resources/x/accounts.d.mts.map +1 -1
  132. package/resources/x/accounts.d.ts +59 -3
  133. package/resources/x/accounts.d.ts.map +1 -1
  134. package/resources/x/accounts.js +55 -5
  135. package/resources/x/accounts.js.map +1 -1
  136. package/resources/x/accounts.mjs +55 -5
  137. package/resources/x/accounts.mjs.map +1 -1
  138. package/resources/x/bookmarks.d.mts +11 -1
  139. package/resources/x/bookmarks.d.mts.map +1 -1
  140. package/resources/x/bookmarks.d.ts +11 -1
  141. package/resources/x/bookmarks.d.ts.map +1 -1
  142. package/resources/x/bookmarks.js +10 -0
  143. package/resources/x/bookmarks.js.map +1 -1
  144. package/resources/x/bookmarks.mjs +10 -0
  145. package/resources/x/bookmarks.mjs.map +1 -1
  146. package/resources/x/communities/communities.d.mts +118 -11
  147. package/resources/x/communities/communities.d.mts.map +1 -1
  148. package/resources/x/communities/communities.d.ts +118 -11
  149. package/resources/x/communities/communities.d.ts.map +1 -1
  150. package/resources/x/communities/communities.js +45 -16
  151. package/resources/x/communities/communities.js.map +1 -1
  152. package/resources/x/communities/communities.mjs +45 -16
  153. package/resources/x/communities/communities.mjs.map +1 -1
  154. package/resources/x/communities/index.d.mts +1 -1
  155. package/resources/x/communities/index.d.mts.map +1 -1
  156. package/resources/x/communities/index.d.ts +1 -1
  157. package/resources/x/communities/index.d.ts.map +1 -1
  158. package/resources/x/communities/index.js.map +1 -1
  159. package/resources/x/communities/index.mjs.map +1 -1
  160. package/resources/x/communities/join.d.mts +18 -2
  161. package/resources/x/communities/join.d.mts.map +1 -1
  162. package/resources/x/communities/join.d.ts +18 -2
  163. package/resources/x/communities/join.d.ts.map +1 -1
  164. package/resources/x/communities/join.js +16 -0
  165. package/resources/x/communities/join.js.map +1 -1
  166. package/resources/x/communities/join.mjs +16 -0
  167. package/resources/x/communities/join.mjs.map +1 -1
  168. package/resources/x/communities/tweets.d.mts +28 -5
  169. package/resources/x/communities/tweets.d.mts.map +1 -1
  170. package/resources/x/communities/tweets.d.ts +28 -5
  171. package/resources/x/communities/tweets.d.ts.map +1 -1
  172. package/resources/x/communities/tweets.js +20 -6
  173. package/resources/x/communities/tweets.js.map +1 -1
  174. package/resources/x/communities/tweets.mjs +20 -6
  175. package/resources/x/communities/tweets.mjs.map +1 -1
  176. package/resources/x/dm.d.mts +19 -2
  177. package/resources/x/dm.d.mts.map +1 -1
  178. package/resources/x/dm.d.ts +19 -2
  179. package/resources/x/dm.d.ts.map +1 -1
  180. package/resources/x/dm.js +17 -0
  181. package/resources/x/dm.js.map +1 -1
  182. package/resources/x/dm.mjs +17 -0
  183. package/resources/x/dm.mjs.map +1 -1
  184. package/resources/x/followers.d.mts +8 -0
  185. package/resources/x/followers.d.mts.map +1 -1
  186. package/resources/x/followers.d.ts +8 -0
  187. package/resources/x/followers.d.ts.map +1 -1
  188. package/resources/x/followers.js +8 -0
  189. package/resources/x/followers.js.map +1 -1
  190. package/resources/x/followers.mjs +8 -0
  191. package/resources/x/followers.mjs.map +1 -1
  192. package/resources/x/index.d.mts +2 -2
  193. package/resources/x/index.d.mts.map +1 -1
  194. package/resources/x/index.d.ts +2 -2
  195. package/resources/x/index.d.ts.map +1 -1
  196. package/resources/x/index.js.map +1 -1
  197. package/resources/x/index.mjs.map +1 -1
  198. package/resources/x/lists.d.mts +27 -6
  199. package/resources/x/lists.d.mts.map +1 -1
  200. package/resources/x/lists.d.ts +27 -6
  201. package/resources/x/lists.d.ts.map +1 -1
  202. package/resources/x/lists.js +23 -16
  203. package/resources/x/lists.js.map +1 -1
  204. package/resources/x/lists.mjs +23 -16
  205. package/resources/x/lists.mjs.map +1 -1
  206. package/resources/x/media.d.mts +17 -1
  207. package/resources/x/media.d.mts.map +1 -1
  208. package/resources/x/media.d.ts +17 -1
  209. package/resources/x/media.d.ts.map +1 -1
  210. package/resources/x/media.js +16 -0
  211. package/resources/x/media.js.map +1 -1
  212. package/resources/x/media.mjs +16 -0
  213. package/resources/x/media.mjs.map +1 -1
  214. package/resources/x/profile.d.mts +30 -3
  215. package/resources/x/profile.d.mts.map +1 -1
  216. package/resources/x/profile.d.ts +30 -3
  217. package/resources/x/profile.d.ts.map +1 -1
  218. package/resources/x/profile.js +27 -0
  219. package/resources/x/profile.js.map +1 -1
  220. package/resources/x/profile.mjs +27 -0
  221. package/resources/x/profile.mjs.map +1 -1
  222. package/resources/x/tweets/like.d.mts +18 -4
  223. package/resources/x/tweets/like.d.mts.map +1 -1
  224. package/resources/x/tweets/like.d.ts +18 -4
  225. package/resources/x/tweets/like.d.ts.map +1 -1
  226. package/resources/x/tweets/like.js +18 -4
  227. package/resources/x/tweets/like.js.map +1 -1
  228. package/resources/x/tweets/like.mjs +18 -4
  229. package/resources/x/tweets/like.mjs.map +1 -1
  230. package/resources/x/tweets/retweet.d.mts +18 -4
  231. package/resources/x/tweets/retweet.d.mts.map +1 -1
  232. package/resources/x/tweets/retweet.d.ts +18 -4
  233. package/resources/x/tweets/retweet.d.ts.map +1 -1
  234. package/resources/x/tweets/retweet.js +18 -4
  235. package/resources/x/tweets/retweet.js.map +1 -1
  236. package/resources/x/tweets/retweet.mjs +18 -4
  237. package/resources/x/tweets/retweet.mjs.map +1 -1
  238. package/resources/x/tweets/tweets.d.mts +146 -15
  239. package/resources/x/tweets/tweets.d.mts.map +1 -1
  240. package/resources/x/tweets/tweets.d.ts +146 -15
  241. package/resources/x/tweets/tweets.d.ts.map +1 -1
  242. package/resources/x/tweets/tweets.js +74 -10
  243. package/resources/x/tweets/tweets.js.map +1 -1
  244. package/resources/x/tweets/tweets.mjs +74 -10
  245. package/resources/x/tweets/tweets.mjs.map +1 -1
  246. package/resources/x/users/follow.d.mts +19 -4
  247. package/resources/x/users/follow.d.mts.map +1 -1
  248. package/resources/x/users/follow.d.ts +19 -4
  249. package/resources/x/users/follow.d.ts.map +1 -1
  250. package/resources/x/users/follow.js +19 -4
  251. package/resources/x/users/follow.js.map +1 -1
  252. package/resources/x/users/follow.mjs +19 -4
  253. package/resources/x/users/follow.mjs.map +1 -1
  254. package/resources/x/users/users.d.mts +94 -21
  255. package/resources/x/users/users.d.mts.map +1 -1
  256. package/resources/x/users/users.d.ts +94 -21
  257. package/resources/x/users/users.d.ts.map +1 -1
  258. package/resources/x/users/users.js +78 -33
  259. package/resources/x/users/users.js.map +1 -1
  260. package/resources/x/users/users.mjs +78 -33
  261. package/resources/x/users/users.mjs.map +1 -1
  262. package/resources/x/x.d.mts +42 -6
  263. package/resources/x/x.d.mts.map +1 -1
  264. package/resources/x/x.d.ts +42 -6
  265. package/resources/x/x.d.ts.map +1 -1
  266. package/resources/x/x.js +21 -5
  267. package/resources/x/x.js.map +1 -1
  268. package/resources/x/x.mjs +21 -5
  269. package/resources/x/x.mjs.map +1 -1
  270. package/src/client.ts +2 -0
  271. package/src/resources/account.ts +20 -1
  272. package/src/resources/api-keys.ts +23 -3
  273. package/src/resources/compose.ts +32 -1
  274. package/src/resources/credits.ts +12 -0
  275. package/src/resources/drafts.ts +33 -0
  276. package/src/resources/draws.ts +46 -1
  277. package/src/resources/events.ts +25 -1
  278. package/src/resources/extractions.ts +74 -5
  279. package/src/resources/index.ts +1 -0
  280. package/src/resources/integrations.ts +77 -0
  281. package/src/resources/monitors.ts +46 -0
  282. package/src/resources/radar.ts +4 -1
  283. package/src/resources/shared.ts +12 -0
  284. package/src/resources/styles.ts +67 -8
  285. package/src/resources/support/tickets.ts +34 -0
  286. package/src/resources/trends.ts +4 -1
  287. package/src/resources/webhooks.ts +54 -0
  288. package/src/resources/x/accounts.ts +72 -7
  289. package/src/resources/x/bookmarks.ts +11 -1
  290. package/src/resources/x/communities/communities.ts +142 -26
  291. package/src/resources/x/communities/index.ts +1 -1
  292. package/src/resources/x/communities/join.ts +18 -2
  293. package/src/resources/x/communities/tweets.ts +41 -11
  294. package/src/resources/x/dm.ts +19 -2
  295. package/src/resources/x/followers.ts +8 -0
  296. package/src/resources/x/index.ts +2 -0
  297. package/src/resources/x/lists.ts +30 -22
  298. package/src/resources/x/media.ts +17 -1
  299. package/src/resources/x/profile.ts +30 -3
  300. package/src/resources/x/tweets/like.ts +20 -6
  301. package/src/resources/x/tweets/retweet.ts +20 -14
  302. package/src/resources/x/tweets/tweets.ts +157 -27
  303. package/src/resources/x/users/follow.ts +21 -10
  304. package/src/resources/x/users/users.ts +103 -52
  305. package/src/resources/x/x.ts +50 -8
  306. package/src/version.ts +1 -1
  307. package/version.d.mts +1 -1
  308. package/version.d.ts +1 -1
  309. package/version.js +1 -1
  310. package/version.mjs +1 -1
@@ -1,8 +1,9 @@
1
1
  import { APIResource } from "../../../core/resource.js";
2
+ import * as Shared from "../../shared.js";
2
3
  import * as JoinAPI from "./join.js";
3
4
  import { Join, JoinCreateParams, JoinDeleteAllParams } from "./join.js";
4
5
  import * as TweetsAPI from "./tweets.js";
5
- import { TweetListParams, Tweets } from "./tweets.js";
6
+ import { TweetListByCommunityParams, TweetListParams, Tweets } from "./tweets.js";
6
7
  import { APIPromise } from "../../../core/api-promise.js";
7
8
  import { RequestOptions } from "../../../internal/request-options.js";
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<void>;
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<void>;
67
+ retrieveModerators(id: string, query?: CommunityRetrieveModeratorsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUsers>;
31
68
  /**
32
69
  * Search tweets across communities
33
- */
34
- retrieveSearch(query: CommunityRetrieveSearchParams, options?: RequestOptions): APIPromise<void>;
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: unknown;
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 account ID)
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 account ID)
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.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"communities.d.ts","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;OAC3B,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IACpD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIlG;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAItC;;OAEG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAI7F;;OAEG;IACH,eAAe,CACb,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,8BAA8B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IAQnB;;OAEG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AAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACtE"}
1
+ {"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,EAAE,IAAI,EAAE,gBAAgB,EAAE,mBAAmB,EAAE;OAC/C,KAAK,SAAS;OACd,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,EAAE;OACvD,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IACpD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIlG;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EAC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ACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -8,7 +8,6 @@ const JoinAPI = tslib_1.__importStar(require("./join.js"));
8
8
  const join_1 = require("./join.js");
9
9
  const TweetsAPI = tslib_1.__importStar(require("./tweets.js"));
10
10
  const tweets_1 = require("./tweets.js");
11
- const headers_1 = require("../../../internal/headers.js");
12
11
  const path_1 = require("../../../internal/utils/path.js");
13
12
  class Communities extends resource_1.APIResource {
14
13
  constructor() {
@@ -18,51 +17,81 @@ class Communities extends resource_1.APIResource {
18
17
  }
19
18
  /**
20
19
  * Create community
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const community = await client.x.communities.create({
24
+ * account: '@elonmusk',
25
+ * name: 'Example Name',
26
+ * description: 'A community for Tesla enthusiasts',
27
+ * });
28
+ * ```
21
29
  */
22
30
  create(body, options) {
23
31
  return this._client.post('/x/communities', { body, ...options });
24
32
  }
25
33
  /**
26
34
  * Delete community
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const community = await client.x.communities.delete('id', {
39
+ * account: '@elonmusk',
40
+ * community_name: 'Tesla Fans',
41
+ * });
42
+ * ```
27
43
  */
28
44
  delete(id, body, options) {
29
45
  return this._client.delete((0, path_1.path) `/x/communities/${id}`, { body, ...options });
30
46
  }
31
47
  /**
32
48
  * Get community details
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const response = await client.x.communities.retrieveInfo(
53
+ * 'id',
54
+ * );
55
+ * ```
33
56
  */
34
57
  retrieveInfo(id, options) {
35
58
  return this._client.get((0, path_1.path) `/x/communities/${id}/info`, options);
36
59
  }
37
60
  /**
38
61
  * Get community members
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * const paginatedUsers =
66
+ * await client.x.communities.retrieveMembers('id');
67
+ * ```
39
68
  */
40
69
  retrieveMembers(id, query = {}, options) {
41
- return this._client.get((0, path_1.path) `/x/communities/${id}/members`, {
42
- query,
43
- ...options,
44
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
45
- });
70
+ return this._client.get((0, path_1.path) `/x/communities/${id}/members`, { query, ...options });
46
71
  }
47
72
  /**
48
73
  * Get community moderators
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * const paginatedUsers =
78
+ * await client.x.communities.retrieveModerators('id');
79
+ * ```
49
80
  */
50
81
  retrieveModerators(id, query = {}, options) {
51
- return this._client.get((0, path_1.path) `/x/communities/${id}/moderators`, {
52
- query,
53
- ...options,
54
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
55
- });
82
+ return this._client.get((0, path_1.path) `/x/communities/${id}/moderators`, { query, ...options });
56
83
  }
57
84
  /**
58
85
  * Search tweets across communities
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * const paginatedTweets =
90
+ * await client.x.communities.retrieveSearch({ q: 'q' });
91
+ * ```
59
92
  */
60
93
  retrieveSearch(query, options) {
61
- return this._client.get('/x/communities/search', {
62
- query,
63
- ...options,
64
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
65
- });
94
+ return this._client.get('/x/communities/search', { query, ...options });
66
95
  }
67
96
  }
68
97
  exports.Communities = Communities;
@@ -1 +1 @@
1
- {"version":3,"file":"communities.js","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,2DAAkC;AAClC,oCAAqE;AACrE,+DAAsC;AACtC,wCAAmD;AAEnD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmEhE,CAAC;IAjEC;;OAEG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,EAAU,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,eAAe,CACb,EAAU,EACV,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,UAAU,EAAE;YAC1D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,kBAAkB,CAChB,EAAU,EACV,QAA8D,EAAE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,aAAa,EAAE;YAC7D,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,KAAoC,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE;YAC/C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AArED,kCAqEC;AAyFD,WAAW,CAAC,IAAI,GAAG,WAAI,CAAC;AACxB,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC"}
1
+ {"version":3,"file":"communities.js","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,2DAAkC;AAClC,oCAAqE;AACrE,+DAAsC;AACtC,wCAA+E;AAG/E,0DAAoD;AAEpD,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,SAAI,GAAiB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ACZ,KAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AAtGD,kCAsGC;AAwKD,WAAW,CAAC,IAAI,GAAG,WAAI,CAAC;AACxB,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC"}
@@ -4,7 +4,6 @@ import * as JoinAPI from "./join.mjs";
4
4
  import { Join } from "./join.mjs";
5
5
  import * as TweetsAPI from "./tweets.mjs";
6
6
  import { Tweets } from "./tweets.mjs";
7
- import { buildHeaders } from "../../../internal/headers.mjs";
8
7
  import { path } from "../../../internal/utils/path.mjs";
9
8
  export class Communities extends APIResource {
10
9
  constructor() {
@@ -14,51 +13,81 @@ export class Communities extends APIResource {
14
13
  }
15
14
  /**
16
15
  * Create community
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const community = await client.x.communities.create({
20
+ * account: '@elonmusk',
21
+ * name: 'Example Name',
22
+ * description: 'A community for Tesla enthusiasts',
23
+ * });
24
+ * ```
17
25
  */
18
26
  create(body, options) {
19
27
  return this._client.post('/x/communities', { body, ...options });
20
28
  }
21
29
  /**
22
30
  * Delete community
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const community = await client.x.communities.delete('id', {
35
+ * account: '@elonmusk',
36
+ * community_name: 'Tesla Fans',
37
+ * });
38
+ * ```
23
39
  */
24
40
  delete(id, body, options) {
25
41
  return this._client.delete(path `/x/communities/${id}`, { body, ...options });
26
42
  }
27
43
  /**
28
44
  * Get community details
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const response = await client.x.communities.retrieveInfo(
49
+ * 'id',
50
+ * );
51
+ * ```
29
52
  */
30
53
  retrieveInfo(id, options) {
31
54
  return this._client.get(path `/x/communities/${id}/info`, options);
32
55
  }
33
56
  /**
34
57
  * Get community members
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const paginatedUsers =
62
+ * await client.x.communities.retrieveMembers('id');
63
+ * ```
35
64
  */
36
65
  retrieveMembers(id, query = {}, options) {
37
- return this._client.get(path `/x/communities/${id}/members`, {
38
- query,
39
- ...options,
40
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
41
- });
66
+ return this._client.get(path `/x/communities/${id}/members`, { query, ...options });
42
67
  }
43
68
  /**
44
69
  * Get community moderators
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * const paginatedUsers =
74
+ * await client.x.communities.retrieveModerators('id');
75
+ * ```
45
76
  */
46
77
  retrieveModerators(id, query = {}, options) {
47
- return this._client.get(path `/x/communities/${id}/moderators`, {
48
- query,
49
- ...options,
50
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
51
- });
78
+ return this._client.get(path `/x/communities/${id}/moderators`, { query, ...options });
52
79
  }
53
80
  /**
54
81
  * Search tweets across communities
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * const paginatedTweets =
86
+ * await client.x.communities.retrieveSearch({ q: 'q' });
87
+ * ```
55
88
  */
56
89
  retrieveSearch(query, options) {
57
- return this._client.get('/x/communities/search', {
58
- query,
59
- ...options,
60
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
61
- });
90
+ return this._client.get('/x/communities/search', { query, ...options });
62
91
  }
63
92
  }
64
93
  Communities.Join = Join;
@@ -1 +1 @@
1
- {"version":3,"file":"communities.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,IAAI,EAAyC;OAC/C,KAAK,SAAS;OACd,EAAmB,MAAM,EAAE;OAE3B,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,WAAM,GAAqB,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AC/E,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAU,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;OAQG;IACH,eAAe,CACb,EAAU,EACV,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;OAQG;IACH,kBAAkB,CAChB,EAAU,EACV,QAA8D,EAAE,EAChE,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;OAQG;IACH,cAAc,CACZ,KAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AAwKD,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC;AACxB,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { Communities, type CommunityActionResult, type CommunityCreateResponse, type CommunityDeleteResponse, type CommunityRetrieveInfoResponse, type CommunityCreateParams, type CommunityDeleteParams, type CommunityRetrieveMembersParams, type CommunityRetrieveModeratorsParams, type CommunityRetrieveSearchParams, } from "./communities.mjs";
2
2
  export { Join, type JoinCreateParams, type JoinDeleteAllParams } from "./join.mjs";
3
- export { Tweets, type TweetListParams } from "./tweets.mjs";
3
+ export { Tweets, type TweetListParams, type TweetListByCommunityParams } from "./tweets.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,GACnC;OACM,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzD,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,GACnC;OACM,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzD,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE,KAAK,0BAA0B,EAAE"}
@@ -1,4 +1,4 @@
1
1
  export { Communities, type CommunityActionResult, type CommunityCreateResponse, type CommunityDeleteResponse, type CommunityRetrieveInfoResponse, type CommunityCreateParams, type CommunityDeleteParams, type CommunityRetrieveMembersParams, type CommunityRetrieveModeratorsParams, type CommunityRetrieveSearchParams, } from "./communities.js";
2
2
  export { Join, type JoinCreateParams, type JoinDeleteAllParams } from "./join.js";
3
- export { Tweets, type TweetListParams } from "./tweets.js";
3
+ export { Tweets, type TweetListParams, type TweetListByCommunityParams } from "./tweets.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,GACnC;OACM,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzD,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,GACnC;OACM,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE;OACzD,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE,KAAK,0BAA0B,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAWuB;AAVrB,0GAAA,WAAW,OAAA;AAWb,kCAA+E;AAAtE,4FAAA,IAAI,OAAA;AACb,sCAAwD;AAA/C,gGAAA,MAAM,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAWuB;AAVrB,0GAAA,WAAW,OAAA;AAWb,kCAA+E;AAAtE,4FAAA,IAAI,OAAA;AACb,sCAAyF;AAAhF,gGAAA,MAAM,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,GAUZ;OACM,EAAE,IAAI,EAAmD;OACzD,EAAE,MAAM,EAAwB"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,GAUZ;OACM,EAAE,IAAI,EAAmD;OACzD,EAAE,MAAM,EAAyD"}
@@ -8,22 +8,38 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
8
8
  export declare class Join extends APIResource {
9
9
  /**
10
10
  * Join community
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const communityActionResult =
15
+ * await client.x.communities.join.create('id', {
16
+ * account: '@elonmusk',
17
+ * });
18
+ * ```
11
19
  */
12
20
  create(id: string, body: JoinCreateParams, options?: RequestOptions): APIPromise<CommunitiesAPI.CommunityActionResult>;
13
21
  /**
14
22
  * Leave community
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const communityActionResult =
27
+ * await client.x.communities.join.deleteAll('id', {
28
+ * account: '@elonmusk',
29
+ * });
30
+ * ```
15
31
  */
16
32
  deleteAll(id: string, body: JoinDeleteAllParams, options?: RequestOptions): APIPromise<CommunitiesAPI.CommunityActionResult>;
17
33
  }
18
34
  export interface JoinCreateParams {
19
35
  /**
20
- * X account (@username or account ID)
36
+ * X account identifier (@username or account ID)
21
37
  */
22
38
  account: string;
23
39
  }
24
40
  export interface JoinDeleteAllParams {
25
41
  /**
26
- * X account (@username or account ID)
42
+ * X account identifier (@username or account ID)
27
43
  */
28
44
  account: string;
29
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"join.d.mts","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;IAInD;;OAEG;IACH,SAAS,CACP,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;CAGpD;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CACvG"}
1
+ {"version":3,"file":"join.d.mts","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;IAInD;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;CAGpD;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CACvG"}
@@ -8,22 +8,38 @@ import { RequestOptions } from "../../../internal/request-options.js";
8
8
  export declare class Join extends APIResource {
9
9
  /**
10
10
  * Join community
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const communityActionResult =
15
+ * await client.x.communities.join.create('id', {
16
+ * account: '@elonmusk',
17
+ * });
18
+ * ```
11
19
  */
12
20
  create(id: string, body: JoinCreateParams, options?: RequestOptions): APIPromise<CommunitiesAPI.CommunityActionResult>;
13
21
  /**
14
22
  * Leave community
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const communityActionResult =
27
+ * await client.x.communities.join.deleteAll('id', {
28
+ * account: '@elonmusk',
29
+ * });
30
+ * ```
15
31
  */
16
32
  deleteAll(id: string, body: JoinDeleteAllParams, options?: RequestOptions): APIPromise<CommunitiesAPI.CommunityActionResult>;
17
33
  }
18
34
  export interface JoinCreateParams {
19
35
  /**
20
- * X account (@username or account ID)
36
+ * X account identifier (@username or account ID)
21
37
  */
22
38
  account: string;
23
39
  }
24
40
  export interface JoinDeleteAllParams {
25
41
  /**
26
- * X account (@username or account ID)
42
+ * X account identifier (@username or account ID)
27
43
  */
28
44
  account: string;
29
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;IAInD;;OAEG;IACH,SAAS,CACP,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;CAGpD;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CACvG"}
1
+ {"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;IAInD;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC;CAGpD;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CACvG"}
@@ -10,12 +10,28 @@ const path_1 = require("../../../internal/utils/path.js");
10
10
  class Join extends resource_1.APIResource {
11
11
  /**
12
12
  * Join community
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const communityActionResult =
17
+ * await client.x.communities.join.create('id', {
18
+ * account: '@elonmusk',
19
+ * });
20
+ * ```
13
21
  */
14
22
  create(id, body, options) {
15
23
  return this._client.post((0, path_1.path) `/x/communities/${id}/join`, { body, ...options });
16
24
  }
17
25
  /**
18
26
  * Leave community
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const communityActionResult =
31
+ * await client.x.communities.join.deleteAll('id', {
32
+ * account: '@elonmusk',
33
+ * });
34
+ * ```
19
35
  */
20
36
  deleteAll(id, body, options) {
21
37
  return this._client.delete((0, path_1.path) `/x/communities/${id}/join`, { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"join.js","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,SAAS,CACP,EAAU,EACV,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAtBD,oBAsBC"}
1
+ {"version":3,"file":"join.js","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAU,EACV,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAU,EACV,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAtCD,oBAsCC"}
@@ -7,12 +7,28 @@ import { path } from "../../../internal/utils/path.mjs";
7
7
  export class Join extends APIResource {
8
8
  /**
9
9
  * Join community
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const communityActionResult =
14
+ * await client.x.communities.join.create('id', {
15
+ * account: '@elonmusk',
16
+ * });
17
+ * ```
10
18
  */
11
19
  create(id, body, options) {
12
20
  return this._client.post(path `/x/communities/${id}/join`, { body, ...options });
13
21
  }
14
22
  /**
15
23
  * Leave community
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const communityActionResult =
28
+ * await client.x.communities.join.deleteAll('id', {
29
+ * account: '@elonmusk',
30
+ * });
31
+ * ```
16
32
  */
17
33
  deleteAll(id, body, options) {
18
34
  return this._client.delete(path `/x/communities/${id}/join`, { body, ...options });
@@ -1 +1 @@
1
- {"version":3,"file":"join.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,SAAS,CACP,EAAU,EACV,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}
1
+ {"version":3,"file":"join.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/join.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAU,EACV,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;OAUG;IACH,SAAS,CACP,EAAU,EACV,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}