
Public
Like
1
list-all-vt-sdk
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
If you want to paginate through all resources in a list method in the Val Town
SDK, use Array.fromAsync.
await Array.fromAsync(vt.me.vals.list({}));
await Array.fromAsync(vt.vals.branches.list(VAL_ID, {}));
const files = await Array.fromAsync(vt.vals.files.retrieve(VAL_ID, {
path: "",
recursive: true,
})
Thanks Stainless! Read more about how Stainless paginates here.