Script Kit Logo
Script Kit
by John Lindquist
Browse ScriptsBlogDiscuss
PeterJohn Hunt
Scripts /

PeterJohn Hunt

basecamp-api-library

by PeterJohn Hunt

// Menu: Basecamp - Create Task
// Description: Create a Basecamp task

let { me, selectTodoList, createTodo } = await lib("basecamp")

let list = await selectTodoList()

setHint(`${list.bucket.name} - ${list.title}`)

let title = await arg('Task name:')

let today = new Date()
let dd = String(today.getDate()).padStart(2, '0')
let mm = String(today.getMonth() + 1).padStart(2, '0')
let yyyy = today.getFullYear()

let response = await createTodo({
  content: title,
  assignee_ids: [me.id],
  due_on: `${yyyy}-${mm}-${dd}`
}, list.bucket.id, list.id)

setHint(`${title} Created!`)

wait(2000)

simple-zoom-room-quick-links

by PeterJohn Hunt

created by
John Lindquist
GitHub