Constructors
constructor
• new CommunitiesClient(client): CommunitiesClient
Creates a new communities client instance
Parameters
| Name | Type | Description |
|---|---|---|
client | Client | The main X API client instance |
Returns
CommunitiesClient
Defined in
communities/client.ts:102Methods
search
▸ search(query, options): Promise<Response>
Search Communities
Retrieves a list of Communities matching the specified search query.
Parameters
| Name | Type | Description |
|---|---|---|
query | string | Query to search communities. |
options | SearchOptions & { requestOptions: { raw: true } } | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
communities/client.ts:147 ▸ search(query, options?): Promise<Get2CommunitiesSearchResponse>
Parameters
| Name | Type |
|---|---|
query | string |
options? | SearchOptions |
Returns
Promise<Get2CommunitiesSearchResponse>
Defined in
communities/client.ts:160getById
▸ getById(id, options): Promise<Response>
Get Community by ID
Retrieves details of a specific Community by its ID.
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The ID of the Community. |
options | GetByIdOptions & { requestOptions: { raw: true } } | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
communities/client.ts:352 ▸ getById(id, options?): Promise<Get2CommunitiesIdResponse>
Parameters
| Name | Type |
|---|---|
id | string |
options? | GetByIdOptions |
Returns
Promise<Get2CommunitiesIdResponse>