//native
type Holded = {
apiKey: string;
};
/**
* Get a specific time-tracking
* Get a specific time-tracking by Id.
*/
export async function main(auth: Holded, employeeTimeId: string) {
const url = new URL(
`https://api.holded.com/api/team/v1/employees/times/${employeeTimeId}`,
);
const response = await fetch(url, {
method: "GET",
headers: {
key: auth.apiKey,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.text();
}
Submitted by hugo697 235 days ago