//native
/**
* Get list of available integrations
* Retrieve a list of all available provider integrations on the API.
*/
export async function main(auth: RT.Terra) {
const url = new URL(`https://api.tryterra.co/v2/integrations`)
const response = await fetch(url, {
method: 'GET',
headers: {
'dev-id': auth.devId,
'X-api-key': auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 235 days ago