@ecp.eth/sdk / indexer / FetchCommentOptions
Type Alias: FetchCommentOptions
type FetchCommentOptions = {
apiUrl?: string;
chainId: number | number[];
commentId: Hex;
commentType?: number;
isReplyDeleted?: boolean;
mode?: IndexerAPICommentListModeSchemaType;
retries?: number;
signal?: AbortSignal;
viewer?: Hex;
};Defined in: packages/sdk/src/indexer/api.ts:52
Properties
apiUrl?
optional apiUrl: string;Defined in: packages/sdk/src/indexer/api.ts:87
URL on which /api/comments endpoint will be called
Default
"https://api.ethcomments.xyz"chainId
chainId: number | number[];Defined in: packages/sdk/src/indexer/api.ts:60
Filter comment and replies by chain ID(s). If the comment is not available on given chain(s) the function will throw a ResponseError.
commentId
commentId: Hex;Defined in: packages/sdk/src/indexer/api.ts:56
The ID of the comment to fetch
commentType?
optional commentType: number;Defined in: packages/sdk/src/indexer/api.ts:81
Filter replies by comment type
isReplyDeleted?
optional isReplyDeleted: boolean;Defined in: packages/sdk/src/indexer/api.ts:77
Whether to return only deleted replies or only undeleted replies. If omitted it will return both deleted and undeleted replies.
mode?
optional mode: IndexerAPICommentListModeSchemaType;Defined in: packages/sdk/src/indexer/api.ts:72
The mode to fetch replies, by default it returns only the first level of replies.
- "flat" mode returns all replies (no matter the nesting level) sorted by timestamp in descending order.
- "nested" mode returns only the first level of replies sorted by timestamp in descending order.
Default
"nested"retries?
optional retries: number;Defined in: packages/sdk/src/indexer/api.ts:97
Number of times to retry the signing operation in case of failure.
Default
3signal?
optional signal: AbortSignal;Defined in: packages/sdk/src/indexer/api.ts:91
The signal to abort the request
viewer?
optional viewer: Hex;Defined in: packages/sdk/src/indexer/api.ts:64
The viewer's address. This is useful when the content moderation is enabled on the indexer.