//native
type Beamer = {
apiKey: string
}
export async function main(resource: Beamer, featureRequestId: string) {
const url = new URL(`https://api.getbeamer.com/v0/requests/${featureRequestId}`)
const response = await fetch(url, {
method: 'GET',
headers: {
'Beamer-Api-Key': resource.apiKey
}
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
const data = await response.json()
return data
}
Submitted by hugo697 2 days ago