Updates a section. [See the docs here](https://developer.todoist.com/rest/v2/#update-a-section)
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
args: {
13
name: string
14
15
requestId?: string
16
17
) {
18
const api = new TodoistApi(resource.Token)
19
const sections = await api.updateSection(section.id, section.args)
20
return sections
21
22