//native
type Botify = {
token: string
}
/**
* Get saved explorers
* List all the project's Saved Explorers.
*/
export async function main(auth: Botify, username: string, project_slug: string) {
const url = new URL(`https://api.botify.com/projects/${username}/${project_slug}/saved_explorers`)
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: 'Token ' + auth.token
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.text()
}
Submitted by hugo697 51 days ago