maxm avatar
fetchJSON
@maxm
Script
An interactive, runnable TypeScript val by maxm
pomdtr avatar
emeraldDragon
@pomdtr
Script
* Fetches JSON data from a URL. * @async * @param {string | URL} url - The URL to fetch JSON data from. * @param {RequestInit & { bearer?: string; fetch?: typeof fetch }} [options] - Additional options for the fetch. * @returns {Promise<any>} - A Promise that resolves to the fetched JSON data.
vladimyr avatar
fetchJSON
@vladimyr
Script
An interactive, runnable TypeScript val by vladimyr
pomdtr avatar
fetchJSON
@pomdtr
Script
An interactive, runnable TypeScript val by pomdtr
nbbaier avatar
fetchPaginatedData
@nbbaier
Script
Fetch Paginated Data This val exports a function that loops through paginated API responses and returns the combined data as an array. It expects pagination with next and there to be a data property in the API response. This conforms to the Val Town API, so this function is useful when fetching paginated Val Town API responses for creating custom folders in pomdtr's vscode extension . Usage: const id = <vt user id> await fetchPaginatedData(`https://api.val.town/v1/users/${id}/vals`, { headers: { Authorization: `Bearer ${Deno.env.get("valtown")}` }, }); For demo usage in the context of the vscode extension see this val .
radarthreat avatar
fetchJSON
@radarthreat
Script
An interactive, runnable TypeScript val by radarthreat
mgruel avatar
fetchJSON
@mgruel
Script
// Forked from @stevekrouse.fetchJSON
dpetrouk avatar
fetchJSON
@dpetrouk
Script
// Forked from @stevekrouse.fetchJSON
1
Next
v45
July 2, 2024