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

# EventPaginator

이벤트(예: DM 이벤트)용 페이지네이터

<div id="hierarchy">
  ## 상속 계층 구조
</div>

* [`Paginator`](/ko/xdks/typescript/reference/classes/Paginator)\<`any`>

  ↳ **`EventPaginator`**

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

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

• **new EventPaginator**(`fetchPage`): [`EventPaginator`](/ko/xdks/typescript/reference/classes/EventPaginator)

새 페이지네이터 인스턴스를 생성합니다

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

| Name        | Type                                                                                                                          | Description                            |
| :---------- | :---------------------------------------------------------------------------------------------------------------------------- | :------------------------------------- |
| `fetchPage` | (`token?`: `string`) => `Promise`\<[`PaginatedResponse`](/ko/xdks/typescript/reference/interfaces/PaginatedResponse)\<`any`>> | 페이지네이션 토큰이 주어졌을 때, 해당 데이터 페이지를 가져오는 함수 |

#### 반환

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

#### 다음에서 상속됨

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[constructor](/ko/xdks/typescript/reference/classes/Paginator#constructor)

#### 정의된 위치

[paginator.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L90)

<div id="accessors">
  ## 접근자
</div>

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

• `get` **items**(): `T`\[]

가져온 모든 항목을 반환합니다.

#### 반환값

`T`\[]

<div id="inherited-from">
  #### 다음으로부터 상속됨
</div>

Paginator.items

#### 정의된 위치

[paginator.ts:97](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L97)

***

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

• `get` **meta**(): `any`

현재 페이지네이션 메타데이터를 반환합니다

#### 반환값

`any`

<div id="inherited-from">
  #### 다음으로부터 상속됨
</div>

Paginator.meta

#### 정의 위치

[paginator.ts:104](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L104)

***

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

• `get` **includes**(): `undefined` | `Record`\<`string`, `any`>

현재 includes 데이터를 가져옵니다

#### 반환값

`undefined` | `Record`\<`string`, `any`>

<div id="inherited-from">
  #### 다음으로부터 상속됨
</div>

Paginator.includes

#### 정의 위치

[paginator.ts:111](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L111)

***

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

• `get` **errors**(): `undefined` | `any`\[]

현재 errors를 반환합니다

#### 반환값

`undefined` | `any`\[]

<div id="inherited-from">
  #### 다음으로부터 상속됨
</div>

Paginator.errors

#### 정의된 위치

[paginator.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L118)

***

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

• `get` **done**(): `boolean`

페이지네이션이 완료되었는지 확인합니다.

#### 반환값

`boolean`

#### 상속

Paginator.done

#### 정의 위치

[paginator.ts:125](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L125)

***

<div id="ratelimited">
  ### rateLimited
</div>

• `get` **rateLimited**(): `boolean`

rate limit에 걸렸는지 확인합니다

#### 반환

`boolean`

#### 다음에서 상속됨

Paginator.rateLimited

#### 정의된 위치

[paginator.ts:132](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L132)

***

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

• `get` **events**(): `any`\[]

#### 반환값

`any`\[]

#### 정의된 위치

[paginator.ts:362](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L362)

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

<div id="fetchnext">
  ### fetchNext
</div>

▸ **fetchNext**(): `Promise`\<`void`>

다음 페이지를 가져와 현재 인스턴스에 항목을 추가합니다

이 메서드는 데이터의 다음 페이지를 가져와 항목을 현재 paginator 인스턴스에 추가합니다. 또한 페이지네이션 상태와 메타데이터를 업데이트합니다.

#### 반환

`Promise`\<`void`>

**`Example`**

```typescript theme={null}
const followers = await client.users.getFollowers('783214');
await followers.fetchNext(); // 첫 페이지 가져오기
console.log(followers.items.length); // 팔로워 수

if (!followers.done) {
  await followers.fetchNext(); // 두 번째 페이지 가져오기
  console.log(followers.items.length); // 페이지 전체의 총 팔로워 수
}
```

**`Throws`**

API 요청이 실패한 경우

#### 상속

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[fetchNext](/ko/xdks/typescript/reference/classes/Paginator#fetchnext)

#### 정의 위치

[paginator.ts:156](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L156)

***

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

▸ **next**(): `Promise`\<[`Paginator`](/ko/xdks/typescript/reference/classes/Paginator)\<`any`>>

다음 페이지를 새로운 인스턴스로 가져옵니다.

이 메서드는 현재 paginator의 상태에는 영향을 주지 않고,
다음 페이지부터 시작하는 새로운 paginator 인스턴스를 생성합니다.

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

`Promise`\<[`Paginator`](/ko/xdks/typescript/reference/classes/Paginator)\<`any`>>

다음 페이지용 새 Paginator 인스턴스

**`예시`**

```typescript theme={null}
const followers = await client.users.getFollowers('783214');
await followers.fetchNext(); // 첫 페이지 가져오기

if (!followers.done) {
  const nextPage = await followers.next(); // 새 인스턴스로 다음 페이지 가져오기
  console.log(followers.items.length); // 여전히 첫 페이지
  console.log(nextPage.items.length); // 두 번째 페이지
}
```

#### 상속

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[next](/ko/xdks/typescript/reference/classes/Paginator#next)

#### 정의된 위치

[paginator.ts:211](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L211)

***

<div id="fetchprevious">
  ### fetchPrevious
</div>

▸ **fetchPrevious**(): `Promise`\<`void`>

이전 페이지를 가져옵니다(지원되는 경우).

#### 반환

`Promise`\<`void`>

#### 상속

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[fetchPrevious](/ko/xdks/typescript/reference/classes/Paginator#fetchprevious)

#### 정의 위치

[paginator.ts:225](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L225)

***

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

▸ **previous**(): `Promise`\<[`Paginator`](/ko/xdks/typescript/reference/classes/Paginator)\<`any`>>

이전 페이지를 새 인스턴스로 가져옵니다.

#### 반환값

`Promise`\<[`Paginator`](/ko/xdks/typescript/reference/classes/Paginator)\<`any`>>

#### 상속됨

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[previous](/ko/xdks/typescript/reference/classes/Paginator#previous)

<div id="defined-in">
  #### 다음에 정의됨
</div>

[paginator.ts:260](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L260)

***

<div id="fetchlast">
  ### fetchLast
</div>

▸ **fetchLast**(`count`): `Promise`\<`void`>

지정한 최대 개수만큼 추가 항목을 가져옵니다

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

| 이름      | Type     |
| :------ | :------- |
| `count` | `number` |

#### 반환값

`Promise`\<`void`>

#### 상속

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[fetchLast](/ko/xdks/typescript/reference/classes/Paginator#fetchlast)

#### 정의 위치

[paginator.ts:274](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L274)

***

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

▸ **reset**(): `void`

페이지네이터를 초기 상태로 되돌립니다

#### 반환값

`void`

<div id="inherited-from">
  #### 다음으로부터 상속됨
</div>

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[reset](/ko/xdks/typescript/reference/classes/Paginator#reset)

#### 정의 위치

[paginator.ts:288](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L288)

***

<div id="iterator">
  ### \[iterator]
</div>

▸ **\[iterator]**(): `Iterator`\<`any`, `any`, `undefined`>

가져온 모든 항목을 순회하는 이터레이터

#### 반환값

`Iterator`\<`any`, `any`, `undefined`>

#### 상속

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[\[iterator\]](Paginator.md#\[iterator])

#### 정의 위치

[paginator.ts:303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L303)

***

<div id="asynciterator">
  ### \[asyncIterator]
</div>

▸ **\[asyncIterator]**(): `AsyncIterator`\<`any`, `any`, `undefined`>

페이지를 자동으로 가져오는 비동기 이터레이터입니다.

#### 반환

`AsyncIterator`\<`any`, `any`, `undefined`>

<div id="inherited-from">
  #### 다음으로부터 상속됨
</div>

[Paginator](/ko/xdks/typescript/reference/classes/Paginator).[\[asyncIterator\]](Paginator.md#\[asynciterator])

#### 정의된 위치

[paginator.ts:312](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L312)
