projects

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

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
}

ProjectClient handles all project-related operations for the Linear API. It uses the shared BaseClient for HTTP communication and focuses on project management functionality.

func NewClient

func NewClient(base *core.BaseClient) *Client

NewProjectClient creates a new project client with the provided base client

func (*Client) CreateProject

func (pc *Client) CreateProject(name, description, teamID string) (*core.Project, error)

CreateProject creates a new project in Linear Why: Projects are containers for organizing related issues. This method enables project creation with proper team assignment.

func (*Client) GetProject

func (pc *Client) GetProject(projectID string) (*core.Project, error)

GetProject retrieves a single project by ID Why: This is the primary method for fetching detailed project information including associated issues and metadata.

func (*Client) ListAllProjects

func (pc *Client) ListAllProjects(limit int) ([]core.Project, error)

ListAllProjects retrieves all projects in the workspace Why: Users need to discover available projects. This method provides a complete list with optional limiting for performance.

func (*Client) ListByTeam

func (pc *Client) ListByTeam(teamID string, limit int) ([]core.Project, error)

ListByTeam retrieves projects for a specific team Why: Teams often have many projects. Filtering by team makes it easier to find relevant projects without seeing all org-wide projects.

func (*Client) ListUserProjects

func (pc *Client) ListUserProjects(userID string, limit int) ([]core.Project, error)

ListUserProjects retrieves projects that have issues assigned to a specific user Why: Users often want to see only projects they're actively working on. This method filters projects based on issue assignments.

func (*Client) RemoveProjectMetadataKey

func (pc *Client) RemoveProjectMetadataKey(projectID, key string) error

RemoveProjectMetadataKey removes a specific metadata key from a project Why: Metadata keys may become obsolete. This method allows selective removal without affecting other metadata. Note: Uses 'content' field instead of 'description' to avoid 255 char limit.

func (*Client) UpdateProject

func (pc *Client) UpdateProject(projectID string, input UpdateProjectInput) (*core.Project, error)

UpdateProject updates a project with the provided input Supports updating name, description, state, lead, start date, and target date

func (*Client) UpdateProjectDescription

func (pc *Client) UpdateProjectDescription(projectID, newContent string) error

UpdateProjectDescription updates a project's content while preserving metadata Why: Project content may contain both user content and metadata. This method ensures metadata is preserved during content updates. Note: Linear has two fields - 'description' (255 char limit) and 'content' (no limit). We use 'content' for longer text to avoid the character limit.

func (*Client) UpdateProjectMetadataKey

func (pc *Client) UpdateProjectMetadataKey(projectID, key string, value interface{}) error

UpdateProjectMetadataKey updates a specific metadata key for a project Why: Granular metadata updates allow changing individual values without affecting other metadata. This is more efficient than full replacements. Note: Uses 'content' field instead of 'description' to avoid 255 char limit.

func (*Client) UpdateProjectState

func (pc *Client) UpdateProjectState(projectID, state string) error

UpdateProjectState updates the state of a project Why: Projects have states (planned, started, completed, etc.) that need to be updated as work progresses. This method provides that capability.

type UpdateProjectInput

type UpdateProjectInput struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	Content     *string `json:"content,omitempty"`
	State       *string `json:"state,omitempty"`
	LeadID      *string `json:"leadId,omitempty"`
	StartDate   *string `json:"startDate,omitempty"`
	TargetDate  *string `json:"targetDate,omitempty"`
}

UpdateProjectInput represents the input for updating a project

Jump to

Keyboard shortcuts

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