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
|
@@ -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<
|
|
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.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;
|
|
1
|
+
{"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAA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C9D,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;
|
|
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,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoGhE,CAAC;IAlGC;;;;;;;;;;;OAWG;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;;;;;;;;;;OAUG;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;;;;;;;;;OASG;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;;;;;;;;OAQG;IACH,eAAe,CACb,EAAU,EACV,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,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,IAAA,WAAI,EAAA,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;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;
|
|
1
|
+
{"version":3,"file":"communities.mjs","sourceRoot":"","sources":["../../../src/resources/x/communities/communities.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,OAAO;OACZ,EAAE,IAAI,EAAyC;OAC/C,KAAK,SAAS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AE,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,
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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"}
|