Mark functions that need pagination support
This commit is contained in:
@@ -16,6 +16,7 @@ type projectsResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (wc *WorkspaceClient) GetProjects() ([]*Project, error) {
|
func (wc *WorkspaceClient) GetProjects() ([]*Project, error) {
|
||||||
|
// TODO: Handle pagination
|
||||||
path := fmt.Sprintf("workspaces/%s/projects", wc.workspace.GID)
|
path := fmt.Sprintf("workspaces/%s/projects", wc.workspace.GID)
|
||||||
resp := &projectsResponse{}
|
resp := &projectsResponse{}
|
||||||
err := wc.client.get(path, nil, resp)
|
err := wc.client.get(path, nil, resp)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ type sectionAddTaskRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (wc *WorkspaceClient) GetSections(project *Project) ([]*Section, error) {
|
func (wc *WorkspaceClient) GetSections(project *Project) ([]*Section, error) {
|
||||||
|
// TODO: Handle pagination
|
||||||
path := fmt.Sprintf("projects/%s/sections", project.GID)
|
path := fmt.Sprintf("projects/%s/sections", project.GID)
|
||||||
resp := §ionsResponse{}
|
resp := §ionsResponse{}
|
||||||
err := wc.client.get(path, nil, resp)
|
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) {
|
func (wc *WorkspaceClient) GetTasksFromSection(section *Section) ([]*Task, error) {
|
||||||
|
// TODO: Handle pagination
|
||||||
path := fmt.Sprintf("sections/%s/tasks", section.GID)
|
path := fmt.Sprintf("sections/%s/tasks", section.GID)
|
||||||
resp := &tasksResponse{}
|
resp := &tasksResponse{}
|
||||||
err := wc.client.get(path, nil, resp)
|
err := wc.client.get(path, nil, resp)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ type tagsResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (wc *WorkspaceClient) GetTags() ([]*Tag, error) {
|
func (wc *WorkspaceClient) GetTags() ([]*Tag, error) {
|
||||||
|
// TODO: Handle pagination
|
||||||
path := fmt.Sprintf("workspaces/%s/tags", wc.workspace.GID)
|
path := fmt.Sprintf("workspaces/%s/tags", wc.workspace.GID)
|
||||||
resp := &tagsResponse{}
|
resp := &tagsResponse{}
|
||||||
err := wc.client.get(path, nil, resp)
|
err := wc.client.get(path, nil, resp)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ func (c *Client) InWorkspace(name string) (*WorkspaceClient, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) GetWorkspaces() ([]*Workspace, error) {
|
func (c *Client) GetWorkspaces() ([]*Workspace, error) {
|
||||||
|
// TODO: Handle pagination
|
||||||
resp := &workspacesResponse{}
|
resp := &workspacesResponse{}
|
||||||
err := c.get("workspaces", nil, resp)
|
err := c.get("workspaces", nil, resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user