0
Delete Section
One script reply has been approved by the moderators Verified

Deletes a section. See the docs here

Created by rubenchicco 1096 days ago Viewed 16673 times
0
Submitted by hugo697 Bun
Verified 396 days ago
1
import { TodoistApi } from '@doist/todoist-api-typescript'
2
import { v9 as Todoist } from 'todoist'
3

4
type Todoist = {
5
	Token: string
6
}
7

8
export async function main(
9
	resource: Todoist,
10
	section: {
11
		id: string
12
		requestId?: string
13
	}
14
) {
15
	const api = new TodoistApi(resource.Token)
16
	const sectionResponse = await api.deleteSection(section.id, section.requestId)
17
	return sectionResponse
18
}
19