- Preparing search index...
- The search index is not available
cardano-sdk
Function fetchSequentially
- fetchSequentially<Item, Arg, Response>(props: {
arg: Arg;
haveEnoughItems?: ((items: Item[]) => boolean);
paginationOptions?: PaginationOptions;
request: ((arg: Arg, pagination: PaginationOptions) => Promise<Response[]>);
responseTranslator?: ((response: Response[], arg: Arg) => Item[]);
}, page?: number, accumulated?: Item[]): Promise<Item[]>
-
Parameters
-
props: {
arg: Arg;
haveEnoughItems?: ((items: Item[]) => boolean);
paginationOptions?: PaginationOptions;
request: ((arg: Arg, pagination: PaginationOptions) => Promise<Response[]>);
responseTranslator?: ((response: Response[], arg: Arg) => Item[]);
}
-
arg: Arg
-
Optional
haveEnoughItems?: ((items: Item[]) => boolean)
-
- (items: Item[]): boolean
-
Returns boolean
-
Optional
paginationOptions?: PaginationOptions
-
request: ((arg: Arg, pagination: PaginationOptions) => Promise<Response[]>)
-
- (arg: Arg, pagination: PaginationOptions): Promise<Response[]>
-
Parameters
-
arg: Arg
-
pagination: PaginationOptions
Returns Promise<Response[]>
-
Optional
responseTranslator?: ((response: Response[], arg: Arg) => Item[])
-
- (response: Response[], arg: Arg): Item[]
-
Parameters
-
response: Response[]
-
arg: Arg
Returns Item[]
-
page: number = 1
-
accumulated: Item[] = []
Returns Promise<Item[]>
Returns
true to indicate that current result set should be returned