Netzo Logo

clickup

ClickUp is a productivity platform that provides a way to work.

Usage

import { clickup } from 'netzo/apis/clickup.ts'

const api = clickup({
  personalApiKey: Deno.env.get('CLICKUP_PERSONAL_API_KEY'),
})

Configuration

The clickup factory function expects an object with the following, and returns an object with an API client api.

ParamTypeDefaultDescription
personalApiKeystringDeno.env.get('CLICKUP_PERSONAL_API_KEY')the api key to use for authentication
Refer to the API documentation to get the required information.

Examples

The following examples assume you have created an api client instance.

Find lists

Find all lists that match the query.

const query: QueryLists = {}
const result = await api.folder[FOLDER_ID].list.get<Lists>(query)
const resultData = result.lists

Get list

Get a list by id.

const resultData = await api.list[LIST_ID].get<List>()

Find tasks

Find all tasks of a specific list that match the query.

const query: QueryTasks = {}
const result = await api.list[LIST_ID].task.get<Tasks>(query)
const resultData = result.tasks

Add task

Add a new task.

const data: DataAddTask = { name: 'New Task' }
const resultData = await api.list[LIST_ID].task.post<Task>(data)

Update task

Update a task by id.

const data: DataAddTask = { name: 'Updated Task Name' }
const resultData = await api.task[TASK_ID].put<Task>(data)

Delete task

Delete a task by id.

const resultData = await api.task[TASK_ID].delete<{}>()

References