From 1a86bcce4de34e16788e8d21b3acf556c4dfd869 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Thu, 23 Sep 2021 04:33:55 +0000 Subject: [PATCH] Mark functions that need pagination support --- client/project.go | 1 + client/section.go | 2 ++ client/tag.go | 1 + client/workspace.go | 1 + 4 files changed, 5 insertions(+) diff --git a/client/project.go b/client/project.go index 78213f9..371236f 100644 --- a/client/project.go +++ b/client/project.go @@ -16,6 +16,7 @@ type projectsResponse struct { } func (wc *WorkspaceClient) GetProjects() ([]*Project, error) { + // TODO: Handle pagination path := fmt.Sprintf("workspaces/%s/projects", wc.workspace.GID) resp := &projectsResponse{} err := wc.client.get(path, nil, resp) diff --git a/client/section.go b/client/section.go index a3c0e5a..b75c4a2 100644 --- a/client/section.go +++ b/client/section.go @@ -20,6 +20,7 @@ type sectionAddTaskRequest struct { } func (wc *WorkspaceClient) GetSections(project *Project) ([]*Section, error) { + // TODO: Handle pagination path := fmt.Sprintf("projects/%s/sections", project.GID) resp := §ionsResponse{} err := wc.client.get(path, nil, resp) @@ -76,6 +77,7 @@ func (wc *WorkspaceClient) AddTaskToSection(task *Task, section *Section) error } func (wc *WorkspaceClient) GetTasksFromSection(section *Section) ([]*Task, error) { + // TODO: Handle pagination path := fmt.Sprintf("sections/%s/tasks", section.GID) resp := &tasksResponse{} err := wc.client.get(path, nil, resp) diff --git a/client/tag.go b/client/tag.go index b7f1e05..841144d 100644 --- a/client/tag.go +++ b/client/tag.go @@ -12,6 +12,7 @@ type tagsResponse struct { } func (wc *WorkspaceClient) GetTags() ([]*Tag, error) { + // TODO: Handle pagination path := fmt.Sprintf("workspaces/%s/tags", wc.workspace.GID) resp := &tagsResponse{} err := wc.client.get(path, nil, resp) diff --git a/client/workspace.go b/client/workspace.go index 0989d58..ac7c326 100644 --- a/client/workspace.go +++ b/client/workspace.go @@ -24,6 +24,7 @@ func (c *Client) InWorkspace(name string) (*WorkspaceClient, error) { } func (c *Client) GetWorkspaces() ([]*Workspace, error) { + // TODO: Handle pagination resp := &workspacesResponse{} err := c.get("workspaces", nil, resp) if err != nil {