Versions in this module Expand all Collapse all v0 v0.2.0 Mar 25, 2026 Changes in this version type Client + Me *MeService + type Me struct + APIToken string + At time.Time + BeginningOfWeek int + CountryID *int + CreatedAt time.Time + DefaultWorkspaceID int + Email string + Fullname string + HasPassword bool + ID int + ImageURL string + OpenIDEnabled bool + Timezone string + UpdatedAt time.Time + type MeService struct + func (s *MeService) GetMe(ctx context.Context) (*Me, *Response, error) + type WorkspaceClient struct + Archived bool + At time.Time + CreatorID int + ExternalReference *string + ID int + Name string + Notes *string + Permissions []string + WorkspaceID int v0.1.0 Mar 23, 2026 Changes in this version + func Bool(b bool) *bool + func Float64(f float64) *float64 + func Int(i int) *int + func String(s string) *string + func Time(t time.Time) *time.Time + type ArchiveResponse struct + Items []int + type BillableRate struct + BillableSeconds int + Currency string + HourlyRateCents int + type Client struct + Clients *ClientsService + Projects *ProjectsService + Reports *ReportsService + Tags *TagsService + TimeEntries *TimeEntriesService + Workspaces *WorkspacesService + func NewClient(token string, opts ...ClientOption) (*Client, error) + type ClientOption func(*Client) + func WithBaseURL(baseURL string) ClientOption + func WithHTTPClient(httpClient *http.Client) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + type ClientsService struct + func (s *ClientsService) ArchiveClient(ctx context.Context, workspaceID, clientID int) (*ArchiveResponse, *Response, error) + func (s *ClientsService) CreateClient(ctx context.Context, workspaceID int, opts *CreateClientOptions) (*TogglClient, *Response, error) + func (s *ClientsService) DeleteClient(ctx context.Context, workspaceID, clientID int) (*Response, error) + func (s *ClientsService) GetClient(ctx context.Context, workspaceID, clientID int) (*TogglClient, *Response, error) + func (s *ClientsService) ListClients(ctx context.Context, workspaceID int, opts *ListClientsOptions) ([]*TogglClient, *Response, error) + func (s *ClientsService) RestoreClient(ctx context.Context, workspaceID, clientID int, opts *RestoreClientOptions) (*TogglClient, *Response, error) + func (s *ClientsService) UpdateClient(ctx context.Context, workspaceID, clientID int, opts *UpdateClientOptions) (*TogglClient, *Response, error) + type CreateClientOptions struct + ExternalReference *string + Name string + Notes *string + type CreateProjectOptions struct + Active *bool + Billable *bool + ClientID *int + Color *string + Currency *string + EndDate *string + EstimatedHours *int + FixedFee *float64 + IsPrivate *bool + Name string + Rate *float64 + StartDate *string + Template *bool + TemplateID *int + type CreateTagOptions struct + Name string + type CreateTimeEntryOptions struct + Billable *bool + CreatedWith string + Description *string + Duration *int + ProjectID *int + Start time.Time + Stop *time.Time + TagIDs []int + Tags []string + TaskID *int + type DetailedExportOptions struct + CentsSeparator *string + DateFormat *string + DisplayMode *string + DurationFormat *string + HourFormat *string + type DetailedReportOptions struct + EnrichResponse *bool + FirstID *int + FirstRowNumber *int + FirstTimestamp *int + Grouped *bool + HideAmounts *bool + OrderBy *string + OrderDir *string + PageSize *int + type DetailedTimeEntry struct + Billable bool + BillableAmountCents *int + ClientName *string + Currency *string + Description *string + HourlyRateCents *int + ProjectColor *string + ProjectHex *string + ProjectID *int + ProjectName *string + RowNumber int + TagIDs []int + TagNames []string + UserID *int + Username *string + type ErrorResponse struct + Message string + Response *http.Response + StatusCode int + func (e *ErrorResponse) Error() string + type ListClientsOptions struct + Name *string + Page *int + PerPage *int + Status *string + type ListProjectsOptions struct + Active *string + Billable *bool + Name *string + Page *int + PerPage *int + Since *int64 + type ListTagsOptions struct + Page *int + PerPage *int + Search *string + type ListTimeEntriesOptions struct + Before *string + EndDate *string + Since *int64 + StartDate *string + type Pagination struct + CurrentPage int + NextID int + NextRowNumber int + PageSize int + TotalPages int + type Project struct + Active bool + ActualHours *int + ActualSeconds *int + At time.Time + AutoEstimates *bool + Billable *bool + ClientID *int + Color string + CreatedAt time.Time + Currency *string + EndDate *string + EstimatedHours *int + EstimatedSeconds *int + FixedFee float64 + ID int + IsPrivate bool + Name string + Rate float64 + RateLastUpdated *string + StartDate *string + Template *bool + TemplateID *int + WorkspaceID int + type ProjectsService struct + func (s *ProjectsService) CreateProject(ctx context.Context, workspaceID int, opts *CreateProjectOptions) (*Project, *Response, error) + func (s *ProjectsService) DeleteProject(ctx context.Context, workspaceID, projectID int, teDeletionMode *string) (*Response, error) + func (s *ProjectsService) GetProject(ctx context.Context, workspaceID, projectID int) (*Project, *Response, error) + func (s *ProjectsService) ListProjects(ctx context.Context, workspaceID int, opts *ListProjectsOptions) ([]*Project, *Response, error) + func (s *ProjectsService) UpdateProject(ctx context.Context, workspaceID, projectID int, opts *UpdateProjectOptions) (*Project, *Response, error) + type ReportFilters struct + Billable *bool + ClientIDs []int + Description *string + EndDate *string + GroupIDs []int + MaxDurationSeconds *int + MinDurationSeconds *int + ProjectIDs []int + Rounding *int + RoundingMinutes *int + StartDate *string + TagIDs []int + TaskIDs []int + TimeEntryIDs []int + UserIDs []int + type ReportsService struct + func (s *ReportsService) DetailedReport(ctx context.Context, workspaceID int, opts *DetailedReportOptions) ([]*DetailedTimeEntry, *Response, error) + func (s *ReportsService) DetailedReportTotals(ctx context.Context, workspaceID int, opts *DetailedReportOptions) (*TotalsReport, *Response, error) + func (s *ReportsService) ExportDetailedCSV(ctx context.Context, workspaceID int, opts *DetailedExportOptions) ([]byte, *Response, error) + func (s *ReportsService) ExportDetailedPDF(ctx context.Context, workspaceID int, opts *DetailedExportOptions) ([]byte, *Response, error) + func (s *ReportsService) ExportSummaryCSV(ctx context.Context, workspaceID int, opts *SummaryExportOptions) ([]byte, *Response, error) + func (s *ReportsService) ExportSummaryPDF(ctx context.Context, workspaceID int, opts *SummaryExportOptions) ([]byte, *Response, error) + func (s *ReportsService) ExportWeeklyCSV(ctx context.Context, workspaceID int, opts *WeeklyExportOptions) ([]byte, *Response, error) + func (s *ReportsService) ExportWeeklyPDF(ctx context.Context, workspaceID int, opts *WeeklyExportOptions) ([]byte, *Response, error) + func (s *ReportsService) SummaryReport(ctx context.Context, workspaceID int, opts *SummaryReportOptions) (*SummaryReportData, *Response, error) + func (s *ReportsService) WeeklyReport(ctx context.Context, workspaceID int, opts *WeeklyReportOptions) ([]*WeeklyReportEntry, *Response, error) + type Response struct + Body []byte + Headers http.Header + Pagination Pagination + Response *http.Response + StatusCode int + type RestoreClientOptions struct + Projects []int + RestoreAllProjects *bool + type SummaryAudit struct + GroupFilter *SummaryAuditFilter + ShowEmptyGroups *bool + ShowTrackedGroups *bool + type SummaryAuditFilter struct + Currency *string + MaxAmountCents *int + MaxDurationSeconds *int + MinAmountCents *int + MinDurationSeconds *int + type SummaryExportOptions struct + CentsSeparator *string + Collapse *bool + DateFormat *string + DurationFormat *string + HideAmounts *bool + HideRates *bool + OrderBy *string + OrderDir *string + Resolution *string + type SummaryGroup struct + ID *int + Rates []BillableRate + Seconds int + SubGroups []SummarySubGroup + type SummaryReportData struct + Groups []SummaryGroup + type SummaryReportOptions struct + Audit *SummaryAudit + DistinguishRates *bool + Grouping *string + IncludeTimeEntryIDs *bool + SubGrouping *string + type SummarySubGroup struct + ID *int + Rates []BillableRate + Seconds int + Title *string + type Tag struct + At time.Time + CreatorID int + DeletedAt *time.Time + ID int + IntegrationExtID *string + IntegrationExtType *string + Name string + Permissions []string + Workspace int + WorkspaceID int + func (t *Tag) UnmarshalJSON(data []byte) error + type TagsService struct + func (s *TagsService) CreateTag(ctx context.Context, workspaceID int, opts *CreateTagOptions) (*Tag, *Response, error) + func (s *TagsService) DeleteTag(ctx context.Context, workspaceID, tagID int) (*Response, error) + func (s *TagsService) ListTags(ctx context.Context, workspaceID int, opts *ListTagsOptions) ([]*Tag, *Response, error) + func (s *TagsService) UpdateTag(ctx context.Context, workspaceID, tagID int, opts *UpdateTagOptions) (*Tag, *Response, error) + type TimeEntriesService struct + func (s *TimeEntriesService) CreateTimeEntry(ctx context.Context, workspaceID int, opts *CreateTimeEntryOptions) (*TimeEntry, *Response, error) + func (s *TimeEntriesService) DeleteTimeEntry(ctx context.Context, workspaceID, entryID int) (*Response, error) + func (s *TimeEntriesService) GetRunningTimeEntry(ctx context.Context) (*TimeEntry, *Response, error) + func (s *TimeEntriesService) GetTimeEntry(ctx context.Context, entryID int) (*TimeEntry, *Response, error) + func (s *TimeEntriesService) ListTimeEntries(ctx context.Context, opts *ListTimeEntriesOptions) ([]*TimeEntry, *Response, error) + func (s *TimeEntriesService) StartTimeEntry(ctx context.Context, workspaceID int, opts *CreateTimeEntryOptions) (*TimeEntry, *Response, error) + func (s *TimeEntriesService) StopTimeEntry(ctx context.Context, workspaceID, entryID int) (*TimeEntry, *Response, error) + func (s *TimeEntriesService) UpdateTimeEntry(ctx context.Context, workspaceID, entryID int, opts *UpdateTimeEntryOptions) (*TimeEntry, *Response, error) + type TimeEntry struct + At time.Time + Billable bool + ClientID *int + CreatedWith string + Description *string + Duration int + ID int + ProjectID *int + Start time.Time + Stop *time.Time + TagIDs []int + Tags []string + TaskID *int + UserID int + WorkspaceID int + type TogglClient struct + Archived bool + At time.Time + CreatorID int + ExternalReference *string + ID int + Name string + Notes *string + Permissions []string + WorkspaceID int + type TotalsGraph struct + BillableAmountCents int + LabourCostCents int + Seconds int + type TotalsReport struct + BillableAmountCents int + Graph []TotalsGraph + LabourCostCents int + Rates []BillableRate + Resolution string + Seconds int + TrackedDays int + type UpdateClientOptions struct + ExternalReference *string + Name *string + Notes *string + type UpdateProjectOptions struct + Active *bool + Billable *bool + ClientID *int + Color *string + Currency *string + EndDate *string + EstimatedHours *int + FixedFee *float64 + IsPrivate *bool + Name *string + Rate *float64 + StartDate *string + Template *bool + type UpdateTagOptions struct + Name string + type UpdateTimeEntryOptions struct + Billable *bool + Description *string + Duration *int + ProjectID *int + Start *time.Time + Stop *time.Time + TagAction *string + TagIDs []int + Tags []string + TaskID *int + type UpdateWorkspaceOptions struct + Admins []int + DefaultCurrency *string + DefaultHourlyRate *float64 + LimitPublicProjectData *bool + Name *string + OnlyAdminsMayCreateProjects *bool + OnlyAdminsMayCreateTags *bool + OnlyAdminsSeeDashboard *bool + ProjectsBillableByDefault *bool + ProjectsEnforceBillable *bool + ProjectsPrivateByDefault *bool + RateChangeMode *string + ReportsCollapse *bool + Rounding *int + RoundingMinutes *int + type WeeklyExportOptions struct + Calculate *string + CentsSeparator *string + DateFormat *string + DurationFormat *string + GroupByTask *bool + Grouping *string + LogoURL *string + type WeeklyReportEntry struct + ClientID *int + ProjectID *int + Seconds []int + Title *string + UserID *int + type WeeklyReportOptions struct + type Workspace struct + ActiveProjectCount int + At time.Time + BusinessWs bool + DefaultCurrency string + DefaultHourlyRate *float64 + ID int + IcalEnabled bool + IcalURL *string + LogoURL *string + Name string + OnlyAdminsMayCreateProjects bool + OnlyAdminsMayCreateTags bool + OnlyAdminsSeeDashboard bool + OrganizationID int + Permissions []string + Premium bool + ProjectsBillableByDefault bool + ProjectsEnforceBillable bool + ProjectsPrivateByDefault bool + ReportsCollapse bool + Role string + Rounding int + RoundingMinutes int + type WorkspacesService struct + func (s *WorkspacesService) GetWorkspace(ctx context.Context, workspaceID int) (*Workspace, *Response, error) + func (s *WorkspacesService) ListWorkspaces(ctx context.Context) ([]*Workspace, *Response, error) + func (s *WorkspacesService) UpdateWorkspace(ctx context.Context, workspaceID int, opts *UpdateWorkspaceOptions) (*Workspace, *Response, error)