Class: PaginatedResponseAdapter<Result, JSONResult>
moralis-monorepo / @moralisweb3/common-core / PaginatedResponseAdapter
Class: PaginatedResponseAdapter<Result, JSONResult>
@moralisweb3/common-core.PaginatedResponseAdapter
Type parameters
Name |
---|
Result |
JSONResult |
Table of contents
Constructors
Methods
Properties
Accessors
Constructors
constructor
• new PaginatedResponseAdapter<Result
, JSONResult
>(pagination
, jsonResponse
, getResult
, nextHandler
)
Type parameters
Name |
---|
Result |
JSONResult |
Parameters
Name | Type |
---|---|
pagination | Pagination |
jsonResponse | PaginatedJSONResponse <JSONResult > |
getResult | () => Result |
nextHandler | undefined | () => Promise <PaginatedResponseAdapter <Result , JSONResult >> |
Methods
hasNext
▸ Readonly
hasNext(): boolean
Returns
boolean
toJSON
▸ toJSON(): PaginatedJSONResponse
<JSONResult
>
Returns
PaginatedJSONResponse
<JSONResult
>
Properties
next
• next: () => Promise
<PaginatedResponseAdapter
<Result
, JSONResult
>>
Type declaration
▸ (): Promise
<PaginatedResponseAdapter
<Result
, JSONResult
>>
Returns
Promise
<PaginatedResponseAdapter
<Result
, JSONResult
>>
pagination
• Readonly
pagination: Pagination
Accessors
raw
• get
raw(): PaginatedJSONResponse
<JSONResult
>
Returns
PaginatedJSONResponse
<JSONResult
>
result
• get
result(): Result
Returns
Result