toggl

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Summary

type Summary struct {
	Entries []summaryEntry
}

Summary represents Toggl summary report data with total tracked time per project.

type Toggl

type Toggl struct {
	APIToken string
}

Toggl represents a Toggl service configuration.

func New

func New(apiToken string) *Toggl

New creates a new instance of Toggl service configuration.

func (*Toggl) GetClientID

func (tgl *Toggl) GetClientID(workspaceID int, clientName string) (int, error)

GetClientID returns id of the specified Toggl client within the given. Only the given workspace is searched.

func (*Toggl) GetDetailedReportPDF

func (tgl *Toggl) GetDetailedReportPDF(workspaceID int, clientID int, from time.Time, to time.Time) ([]byte, error)

GetDetailedReportPDF returns a Toggl detailed report PDF for days between the specified dates.

func (*Toggl) GetSummary

func (tgl *Toggl) GetSummary(workspaceID int, clientID int, from time.Time, to time.Time) (*Summary, error)

GetSummary returns total tracked time per project between the specified dates.

func (*Toggl) GetSummaryReportPDF

func (tgl *Toggl) GetSummaryReportPDF(workspaceID int, clientID int, from time.Time, to time.Time) ([]byte, error)

GetSummaryReportPDF returns a Toggl summary report PDF for days between the specified dates.

func (*Toggl) GetWorkspaceID

func (tgl *Toggl) GetWorkspaceID(workspaceName string) (int, error)

GetWorkspaceID returns id of the specified Toggl workspace.

Jump to

Keyboard shortcuts

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