dida

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package dida provides a client for interacting with the Dida365 API. It implements all the basic operations for managing projects and tasks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a Dida365 API client.

func NewClient

func NewClient(log *zap.Logger, token string) *Client

NewClient creates a new Dida365 API client with the given logger and authentication token.

func (*Client) CompleteTask

func (c *Client) CompleteTask(ctx context.Context, projectID, taskID string) error

CompleteTask marks a task as completed.

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, req *api.CreateProjectRequest) (*api.Project, error)

CreateProject creates a new project with the given parameters.

func (*Client) CreateTask

func (c *Client) CreateTask(ctx context.Context, req *api.CreateTaskRequest) (*api.Task, error)

CreateTask creates a new task with the given parameters.

func (*Client) DeleteProject

func (c *Client) DeleteProject(ctx context.Context, projectID string) error

DeleteProject deletes a project by its ID.

func (*Client) DeleteTask

func (c *Client) DeleteTask(ctx context.Context, projectID, taskID string) error

DeleteTask deletes a task by its ID.

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, projectID string) (*api.Project, error)

GetProject retrieves a specific project by its ID.

func (*Client) GetProjectData

func (c *Client) GetProjectData(ctx context.Context, projectID string) (*api.ProjectData, error)

GetProjectData retrieves detailed data for a specific project.

func (*Client) GetTask

func (c *Client) GetTask(ctx context.Context, projectID, taskID string) (*api.Task, error)

GetTask retrieves a specific task by project ID and task ID.

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context) ([]*api.Project, error)

ListProjects returns a list of all projects.

func (*Client) UpdateProject

func (c *Client) UpdateProject(ctx context.Context, req *api.UpdateProjectRequest) (*api.Project, error)

UpdateProject updates an existing project with the given parameters.

func (*Client) UpdateTask

func (c *Client) UpdateTask(ctx context.Context, req *api.UpdateTaskRequest) (*api.Task, error)

UpdateTask updates an existing task with the given parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址