//native
type Botify = {
token: string
}
/**
* Get urls export status
* Checks the status of an CSVUrlExportJob object. Returns json object with the status.
*/
export async function main(
auth: Botify,
username: string,
project_slug: string,
analysis_slug: string,
url_export_id: string
) {
const url = new URL(
`https://api.botify.com/analyses/${username}/${project_slug}/${analysis_slug}/urls/export/${url_export_id}`
)
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 2 days ago