auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
this.arr = ["1", "2", "3"]
An array of post IDs to return from https://jsonplaceholder.typicode.com/posts
async
params => {
}
const got = require("got")
const { posts } = params
// For each element of the input array of posts, format an HTTP request, storing them in an array
const requests = posts.map(p => got(`https://jsonplaceholder.typicode.com/posts/${p}`, { responseType: 'json' }))
return (await Promise.all(requests)).map(response => response.body)