> ## Documentation Index
> Fetch the complete documentation index at: https://generaltranslation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CommunitiesClient

커뮤니티 관련 작업을 위한 Client

이 Client는 X API의 커뮤니티 관련 엔드포인트와 상호작용하기 위한 메서드를 제공합니다.
인증, 요청 포맷 구성, 응답 파싱을 처리하여 커뮤니티 관련 모든 작업을 수행합니다.

<div id="constructors">
  ## 생성자
</div>

<div id="constructor">
  ### constructor
</div>

• **new CommunitiesClient**(`client`): [`CommunitiesClient`](/ko/xdks/typescript/reference/classes/CommunitiesClient)

새 CommunitiesClient 인스턴스를 생성합니다

<div id="parameters">
  #### 매개변수
</div>

| Name     | Type                                                     | Description            |
| :------- | :------------------------------------------------------- | :--------------------- |
| `client` | [`Client`](/ko/xdks/typescript/reference/classes/Client) | 기본 X API `Client` 인스턴스 |

#### 반환

[`CommunitiesClient`](/ko/xdks/typescript/reference/classes/CommunitiesClient)

<div id="defined-in">
  #### 정의된 위치
</div>

[communities/client.ts:102](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L102)

<div id="methods">
  ## 메서드
</div>

<div id="search">
  ### search
</div>

▸ **search**(`query`, `options`): `Promise`\<`Response`>

커뮤니티 검색
지정된 검색 쿼리에 해당하는 커뮤니티 리스트를 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

| Name      | Type                                                          | Description       |
| :-------- | :------------------------------------------------------------ | :---------------- |
| `query`   | `string`                                                      | 커뮤니티를 검색하는 쿼리입니다. |
| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

<div id="returns">
  #### 반환값
</div>

`Promise`\<`Response`>

API 응답을 resolve하는 `Promise`이며, `requestOptions.raw`가 true인 경우 원시 `Response`입니다.

<div id="defined-in">
  #### 정의된 위치
</div>

[communities/client.ts:147](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L147)

▸ **search**(`query`, `options?`): `Promise`\<[`Get2CommunitiesSearchResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse)>

<div id="parameters">
  #### 매개변수
</div>

| 이름         | type            |
| :--------- | :-------------- |
| `query`    | `string`        |
| `options?` | `SearchOptions` |

<div id="returns">
  #### 반환값
</div>

`Promise`\<[`Get2CommunitiesSearchResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse)>

#### 정의 위치

[communities/client.ts:160](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L160)

***

<div id="getbyid">
  ### getById
</div>

▸ **getById**(`id`, `options`): `Promise`\<`Response`>

커뮤니티 ID로 가져오기\
지정된 커뮤니티 ID를 사용해 해당 커뮤니티의 세부 정보를 조회합니다.

<div id="parameters">
  #### 매개변수
</div>

| 이름        | 타입                                                             | 설명          |
| :-------- | :------------------------------------------------------------- | :---------- |
| `id`      | `string`                                                       | 커뮤니티 ID입니다. |
| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -           |

<div id="returns">
  #### 반환값
</div>

`Promise`\<`Response`>

API 응답으로 resolve되는 `Promise`이며, `requestOptions.raw`가 `true`인 경우 원시 `Response`를 반환합니다.

#### 정의 위치

[communities/client.ts:352](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L352)

▸ **getById**(`id`, `options?`): `Promise`\<[`Get2CommunitiesIdResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse)>

<div id="parameters">
  #### 매개변수
</div>

| 이름         | 타입               |
| :--------- | :--------------- |
| `id`       | `string`         |
| `options?` | `GetByIdOptions` |

<div id="returns">
  #### 반환값
</div>

`Promise`\<[`Get2CommunitiesIdResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse)>

#### 정의 위치

[communities/client.ts:365](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L365)
