//native
type Phrase = {
token: string
baseUrl: string
}
/**
* Get a single organization job template locale
* Get a single job template locale for a given organization job template.
*/
export async function main(
auth: Phrase,
account_id: string,
job_template_id: string,
job_template_locale_id: string
) {
const url = new URL(
`${auth.baseUrl}/accounts/${account_id}/job_templates/${job_template_id}/locales/${job_template_locale_id}`
)
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: 'ApiToken ' + auth.token
},
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