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

# MediaClient

미디어 작업을 위한 Client

이 Client는 X API의 미디어 엔드포인트와 상호 작용하기 위한 메서드를 제공합니다. 모든 미디어 관련 작업에 대해 인증, 요청 포맷팅, 응답 파싱을 처리합니다.

zeUpload]\(/xdks/typescript/reference/classes/MediaClient#finalizeupload)

* [initializeUpload](/ko/xdks/typescript/reference/classes/MediaClient#initializeupload)
* [createSubtitles](/ko/xdks/typescript/reference/classes/MediaClient#createsubtitles)
* [deleteSubtitles](/ko/xdks/typescript/reference/classes/MediaClient#deletesubtitles)

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

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

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

새 `MediaClient` 인스턴스를 생성합니다

#### 매개변수

| 이름       | 타입                                                       | 설명                   |
| :------- | :------------------------------------------------------- | :------------------- |
| `client` | [`Client`](/ko/xdks/typescript/reference/classes/Client) | 주요 X API Client 인스턴스 |

#### 반환

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

#### 정의 위치

[media/client.ts:250](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L250)

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

<div id="getbykey">
  ### getByKey
</div>

▸ **getByKey**(`mediaKey`, `options`): `Promise`\<`Response`>

미디어 키로 미디어 가져오기\
지정된 미디어 키로 특정 미디어 파일의 세부 정보를 조회합니다.

#### 매개변수

| Name       | Type                                                            | Description |
| :--------- | :-------------------------------------------------------------- | :---------- |
| `mediaKey` | `string`                                                        | 하나의 미디어 키.  |
| `options`  | `GetByKeyOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -           |

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

`Promise`\<`Response`>

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

#### 정의 위치

[media/client.ts:295](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L295)

▸ **getByKey**(`mediaKey`, `options?`): `Promise`\<[`Get2MediaMediaKeyResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse)>

#### 매개변수

| 이름         | Type              |
| :--------- | :---------------- |
| `mediaKey` | `string`          |
| `options?` | `GetByKeyOptions` |

#### 반환값

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

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

[media/client.ts:308](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L308)

***

<div id="getuploadstatus">
  ### getUploadStatus
</div>

▸ **getUploadStatus**(`mediaId`, `options`): `Promise`\<`Response`>

미디어 업로드 상태 가져오기
해당 업로드 id로 미디어 업로드 상태를 조회합니다.

<div id="parameters">
  #### Parameters
</div>

| Name      | Type                                                                   | Description                     |
| :-------- | :--------------------------------------------------------------------- | :------------------------------ |
| `mediaId` | `string`                                                               | 요청한 미디어 업로드 상태를 조회할 미디어의 id입니다. |
| `options` | `GetUploadStatusOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                               |

#### 반환 값

`Promise`\<`Response`>

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

#### 정의 위치

[media/client.ts:442](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L442)

▸ **getUploadStatus**(`mediaId`, `options?`): `Promise`\<[`MediaUploadResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)>

#### 매개변수

| 이름         | 타입                       |
| :--------- | :----------------------- |
| `mediaId`  | `string`                 |
| `options?` | `GetUploadStatusOptions` |

#### 반환

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

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

[media/client.ts:455](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L455)

***

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

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

미디어 업로드
포스트나 기타 콘텐츠에서 사용할 미디어 파일을 업로드합니다.

#### 매개변수

| 이름        | Type                                                          |
| :-------- | :------------------------------------------------------------ |
| `options` | `UploadOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

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

`Promise`\<`Response`>

API 응답으로 resolve되는 `Promise` 또는 `requestOptions.raw`가 `true`인 경우 원시 `Response`

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

[media/client.ts:582](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L582)

▸ **upload**(`options?`): `Promise`\<[`MediaUploadResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)>

#### 매개변수

| 이름         | type            |
| :--------- | :-------------- |
| `options?` | `UploadOptions` |

#### 반환값

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

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

[media/client.ts:591](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L591)

***

<div id="getanalytics">
  ### getAnalytics
</div>

▸ **getAnalytics**(`mediaKeys`, `endTime`, `startTime`, `granularity`, `options`): `Promise`\<`Response`>

미디어 분석 데이터 가져오기
미디어에 대한 분석 데이터를 조회합니다.

#### 매개변수

| Name          | Type                                                                | Description                                            |
| :------------ | :------------------------------------------------------------------ | :----------------------------------------------------- |
| `mediaKeys`   | `any`\[]                                                            | 쉼표로 구분된 Media Key 리스트입니다. 단일 요청당 최대 100개까지 허용됩니다.      |
| `endTime`     | `string`                                                            | YYYY-MM-DDTHH:mm:ssZ. 시간 범위의 종료 시점을 나타내는 UTC 타임스탬프입니다. |
| `startTime`   | `string`                                                            | YYYY-MM-DDTHH:mm:ssZ. 시간 범위의 시작 시점을 나타내는 UTC 타임스탬프입니다. |
| `granularity` | `string`                                                            | 검색 수 결과의 세분화 수준입니다.                                    |
| `options`     | `GetAnalyticsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                      |

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 `Promise`입니다. requestOptions.raw가 true인 경우에는 원시 `Response`가 반환됩니다.

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

[media/client.ts:699](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L699)

▸ **getAnalytics**(`mediaKeys`, `endTime`, `startTime`, `granularity`, `options?`): `Promise`\<[`MediaAnalytics`](/ko/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics)>

#### 매개변수

| 이름            | type                  |
| :------------ | :-------------------- |
| `mediaKeys`   | `any`\[]              |
| `endTime`     | `string`              |
| `startTime`   | `string`              |
| `granularity` | `string`              |
| `options?`    | `GetAnalyticsOptions` |

#### 반환 값

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

#### 정의 위치

[media/client.ts:724](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L724)

***

<div id="appendupload">
  ### appendUpload
</div>

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

미디어 업로드 이어서 추가\
미디어 업로드 요청에 데이터를 이어서 추가합니다.

#### 매개변수

| Name      | Type                                                                | Description                 |
| :-------- | :------------------------------------------------------------------ | :-------------------------- |
| `id`      | `string`                                                            | append 작업을 수행할 미디어의 식별자입니다. |
| `options` | `AppendUploadOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                           |

#### 반환값

`Promise`\<`Response`>

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

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

[media/client.ts:918](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L918)

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

#### 매개변수

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

#### 반환

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

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

[media/client.ts:931](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L931)

***

<div id="getbykeys">
  ### getByKeys
</div>

▸ **getByKeys**(`mediaKeys`, `options`): `Promise`\<`Response`>

미디어 키로 미디어 가져오기\
미디어 키를 사용하여 미디어 파일의 세부 정보를 조회합니다.

#### 매개변수

| 이름          | type                                                             | 설명                                                |
| :---------- | :--------------------------------------------------------------- | :------------------------------------------------ |
| `mediaKeys` | `any`\[]                                                         | 콤마로 구분된 Media Key 리스트입니다. 한 요청에서 최대 100개까지 허용됩니다. |
| `options`   | `GetByKeysOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                 |

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 Promise이며, requestOptions.raw가 true인 경우 원시 Response

#### 정의 위치

[media/client.ts:1039](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1039)

▸ **getByKeys**(`mediaKeys`, `options?`): `Promise`\<[`Get2MediaResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse)>

#### 매개변수

| 이름          | type               |
| :---------- | :----------------- |
| `mediaKeys` | `any`\[]           |
| `options?`  | `GetByKeysOptions` |

#### 반환

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

#### 정의 위치

[media/client.ts:1052](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1052)

***

<div id="createmetadata">
  ### createMetadata
</div>

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

미디어 메타데이터 생성
미디어 파일의 메타데이터를 생성합니다.

#### 매개변수

| 이름        | 타입                                                                    |
| :-------- | :-------------------------------------------------------------------- |
| `options` | `CreateMetadataOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 반환

`Promise`\<`Response`>

API 응답으로 resolve되는 Promise이거나, requestOptions.raw가 true인 경우 원시 Response 객체

#### 정의 위치

[media/client.ts:1191](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1191)

▸ **createMetadata**(`options?`): `Promise`\<[`MetadataCreateResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse)>

#### 매개변수

| 이름         | 타입                      |
| :--------- | :---------------------- |
| `options?` | `CreateMetadataOptions` |

#### 반환

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

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

[media/client.ts:1200](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1200)

***

<div id="finalizeupload">
  ### finalizeUpload
</div>

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

미디어 업로드 최종 처리
미디어 업로드 요청을 완료합니다.

#### 매개변수

| Name                         | Type     | Description                      |
| :--------------------------- | :------- | :------------------------------- |
| `id`                         | `string` | 업로드를 최종 완료할 대상 미디어의 media id입니다. |
| `options`                    | `Object` | -                                |
| `options.requestOptions`     | `Object` | -                                |
| `options.requestOptions.raw` | `true`   | -                                |

#### 반환값

`Promise`\<`Response`>

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

#### 정의 위치

[media/client.ts:1296](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1296)

▸ **finalizeUpload**(`id`): `Promise`\<[`MediaUploadResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)>

#### 매개변수

| 이름   | 타입       |
| :--- | :------- |
| `id` | `string` |

#### 반환

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

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

[media/client.ts:1309](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1309)

***

<div id="initializeupload">
  ### initializeUpload
</div>

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

미디어 업로드 초기화\
미디어 업로드를 초기화합니다.

#### 매개변수

| 이름        | type                                                                    |
| :-------- | :---------------------------------------------------------------------- |
| `options` | `InitializeUploadOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 반환값

`Promise`\<`Response`>

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

#### 정의 위치

[media/client.ts:1396](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1396)

▸ **initializeUpload**(`options?`): `Promise`\<[`MediaUploadResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)>

#### 매개변수

| 이름         | type                      |
| :--------- | :------------------------ |
| `options?` | `InitializeUploadOptions` |

#### 반환

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

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

[media/client.ts:1405](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1405)

***

<div id="createsubtitles">
  ### createSubtitles
</div>

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

미디어 자막 만들기
특정 미디어 파일의 자막을 생성합니다.

#### 매개변수

| 이름        | type                                                                   |
| :-------- | :--------------------------------------------------------------------- |
| `options` | `CreateSubtitlesOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

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

`Promise`\<`Response`>

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

#### 정의 위치

[media/client.ts:1497](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1497)

▸ **createSubtitles**(`options?`): `Promise`\<[`SubtitlesCreateResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse)>

#### 매개변수

| 이름         | type                     |
| :--------- | :----------------------- |
| `options?` | `CreateSubtitlesOptions` |

#### 반환값

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

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

[media/client.ts:1506](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1506)

***

<div id="deletesubtitles">
  ### deleteSubtitles
</div>

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

미디어 자막 삭제
특정 미디어 파일에 대한 자막을 삭제합니다.

#### 매개변수

| 이름        | type                                                                   |
| :-------- | :--------------------------------------------------------------------- |
| `options` | `DeleteSubtitlesOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 `Promise` 또는 `requestOptions.raw`가 true인 경우 원본 `Response`

#### 정의된 곳

[media/client.ts:1598](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1598)

▸ **deleteSubtitles**(`options?`): `Promise`\<[`SubtitlesDeleteResponse`](/ko/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse)>

#### 매개변수

| 이름         | type                     |
| :--------- | :----------------------- |
| `options?` | `DeleteSubtitlesOptions` |

#### 반환 값

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

#### 정의 위치

[media/client.ts:1607](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1607)
