> ## 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.

# CommunityNotesClient

コミュニティノート用クライアント

このクライアントは、X API のコミュニティノート用エンドポイントとやり取りするためのメソッドを提供します。認証、リクエストの整形、レスポンスの解析を行い、コミュニティノートに関連するすべての操作を処理します。

<div id="constructors">
  ## コンストラクタ
</div>

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

• **new CommunityNotesClient**(`client`): [`CommunityNotesClient`](/ja/xdks/typescript/reference/classes/CommunityNotesClient)

新しい CommunityNotesClient のインスタンスを作成します

<div id="parameters">
  #### パラメーター
</div>

| Name     | Type                                                     | Description               |
| :------- | :------------------------------------------------------- | :------------------------ |
| `client` | [`Client`](/ja/xdks/typescript/reference/classes/Client) | X API 用のメイン Client インスタンス |

#### 戻り値

[`CommunityNotesClient`](/ja/xdks/typescript/reference/classes/CommunityNotesClient)

#### 定義元

[community\_notes/client.ts:186](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L186)

<div id="methods">
  ## メソッド
</div>

<div id="searcheligibleposts">
  ### searchEligiblePosts
</div>

▸ **searchEligiblePosts**(`testMode`, `options`): `Promise`\<`Response`>

コミュニティノートの対象となる投稿を検索します。
コミュニティノートの対象となるすべての投稿を返します。

<div id="parameters">
  #### パラメーター
</div>

| Name       | Type                                                                       | Description                                                              |
| :--------- | :------------------------------------------------------------------------- | :----------------------------------------------------------------------- |
| `testMode` | `boolean`                                                                  | true の場合、テスト用の投稿のリストを返します。false の場合、ボットがプロダクトに関する提案ノートを作成できる投稿のリストを返します。 |
| `options`  | `SearchEligiblePostsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                                        |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。`requestOptions.raw` が true の場合は生の Response

<div id="defined-in">
  #### 定義場所
</div>

[community\_notes/client.ts:231](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L231)

▸ **searchEligiblePosts**(`testMode`, `options?`): `Promise`\<[`Get2NotesSearchPostsEligibleForNotesResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse)>

<div id="parameters">
  #### パラメーター
</div>

| 名前         | type                         |
| :--------- | :--------------------------- |
| `testMode` | `boolean`                    |
| `options?` | `SearchEligiblePostsOptions` |

#### 戻り値

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

<div id="defined-in">
  #### 定義場所
</div>

[community\_notes/client.ts:244](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L244)

***

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

▸ **evaluate**(`options`): `Promise`\<`Response`>

コミュニティノートの評価を行います\
コミュニティノートを評価するためのエンドポイントです。

#### パラメータ

| 名前        | type                                                            |
| :-------- | :-------------------------------------------------------------- |
| `options` | `EvaluateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンス、または requestOptions.raw が true の場合は生の Response を返す Promise

<div id="defined-in">
  #### 定義場所
</div>

[community\_notes/client.ts:535](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L535)

▸ **evaluate**(`options?`): `Promise`\<[`EvaluateNoteResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse)>

<div id="parameters">
  #### パラメーター
</div>

| 名前         | Type              |
| :--------- | :---------------- |
| `options?` | `EvaluateOptions` |

#### 戻り値

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

#### 定義元

[community\_notes/client.ts:544](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L544)

***

<div id="searchwritten">
  ### searchWritten
</div>

▸ **searchWritten**(`testMode`, `options`): `Promise`\<`Response`>

投稿したコミュニティノートを検索します\
ユーザーが投稿したすべてのコミュニティノートを返します。

<div id="parameters">
  #### パラメーター
</div>

| 名前         | type                                                                 | 説明                                                                        |
| :--------- | :------------------------------------------------------------------- | :------------------------------------------------------------------------ |
| `testMode` | `boolean`                                                            | `true` の場合はテスト用に呼び出し元が作成したノートを返します。`false` の場合はプロダクト上で呼び出し元が作成したノートを返します。 |
| `options`  | `SearchWrittenOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                                         |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンス (requestOptions.raw が true の場合は生の Response) で解決される Promise

<div id="defined-in">
  #### 定義場所
</div>

[community\_notes/client.ts:640](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L640)

▸ **searchWritten**(`testMode`, `options?`): `Promise`\<[`Get2NotesSearchNotesWrittenResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse)>

#### パラメータ

| 名前         | type                   |
| :--------- | :--------------------- |
| `testMode` | `boolean`              |
| `options?` | `SearchWrittenOptions` |

#### 戻り値

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

#### 定義元

[community\_notes/client.ts:653](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L653)

***

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

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

コミュニティノートの削除\
コミュニティノートを削除します。

#### パラメータ

| Name                         | Type     | Description       |
| :--------------------------- | :------- | :---------------- |
| `id`                         | `string` | 削除するコミュニティノートのid。 |
| `options`                    | `Object` | -                 |
| `options.requestOptions`     | `Object` | -                 |
| `options.requestOptions.raw` | `true`   | -                 |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンスで解決される Promise。`requestOptions.raw` が true の場合は生の `Response` を返します

<div id="defined-in">
  #### 定義場所
</div>

[community\_notes/client.ts:826](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L826)

▸ **delete**(`id`): `Promise`\<[`DeleteNoteResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse)>

#### パラメータ

| 名前   | 型        |
| :--- | :------- |
| `id` | `string` |

#### 戻り値

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

#### 定義元

[community\_notes/client.ts:839](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L839)

***

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

▸ **create**(`options`): `Promise`\<`Response`>

コミュニティノートを作成します\
LLM のユースケース向けのコミュニティノート作成エンドポイントです。

<div id="parameters">
  #### パラメーター
</div>

| 名前        | type                                                          |
| :-------- | :------------------------------------------------------------ |
| `options` | `CreateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンスで解決される Promise。requestOptions.raw が true の場合は生の Response。

#### 定義箇所

[community\_notes/client.ts:926](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L926)

▸ **create**(`options?`): `Promise`\<[`CreateNoteResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse)>

<div id="parameters">
  #### パラメーター
</div>

| 名前         | type            |
| :--------- | :-------------- |
| `options?` | `CreateOptions` |

#### 戻り値

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

#### 定義元

[community\_notes/client.ts:935](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L935)
