From 530fc56cb8369aeb68241531d614271a24d027b9 Mon Sep 17 00:00:00 2001 From: Rafael Dantas Justo Date: Thu, 23 Jul 2026 14:12:47 -0300 Subject: [PATCH] Enhancement: Tasklist - Add showCompleted filter to list request Add an optional ShowCompleted *bool filter to TasklistListRequestFilters. When nil (the default), the parameter is omitted and the API's default behavior of excluding completed tasklists is preserved; set it to true to include completed tasklists in the results. --- projects/tasklist.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/tasklist.go b/projects/tasklist.go index 53848c9..f17b7dd 100644 --- a/projects/tasklist.go +++ b/projects/tasklist.go @@ -399,6 +399,11 @@ type TasklistListRequestFilters struct { // PageSize is the number of tasklists to retrieve per page. Defaults to 50. PageSize int64 + // ShowCompleted indicates whether to include completed tasklists in the + // results. When nil or false, completed tasklists are excluded (the API + // default). Set to true to include them. + ShowCompleted *bool + // Fields restricts the attributes returned for the tasklist and each of its // sideloads. Each slot of TasklistListFields is a separate // `fields[entity]=…` selection; populated slots restrict the response, empty @@ -418,6 +423,9 @@ func (t TasklistListRequestFilters) apply(req *http.Request) { if t.PageSize > 0 { query.Set("pageSize", strconv.FormatInt(t.PageSize, 10)) } + if t.ShowCompleted != nil { + query.Set("showCompleted", strconv.FormatBool(*t.ShowCompleted)) + } t.Fields.apply(query) req.URL.RawQuery = query.Encode() }