Class: ApiResultAdapter<Data, AdaptedData, JSONData, Params>

moralis-monorepo / @moralisweb3/api-utils / ApiResultAdapter

Class: ApiResultAdapter<Data, AdaptedData, JSONData, Params>

@moralisweb3/api-utils.ApiResultAdapter

The adapter for the API result.

Type parameters

Name
Data
AdaptedData
JSONData
Params

Hierarchy

Table of contents

Accessors

Methods

Accessors

raw

get raw(): Data

Returns

Data

a raw data from the API.


result

get result(): AdaptedData

Returns

AdaptedData

the result adapted into SDK types.

Methods

toJSON

toJSON(): JSONData

Returns

JSONData

the result in the JSON format.


format

format(formatType): Data

Parameters

NameType
formatTypeRAW

Returns

Data

the result in the raw format.

format(formatType): unknown

Parameters

NameType
formatTypeJSON

Returns

unknown

athe result in the JSON format.

format(formatType): AdaptedData

Parameters

NameType
formatTypeNORMAL

Returns

AdaptedData

the result adapted into SDK types.


Did this page help you?