Documentation ¶
Index ¶
- Constants
- type TimeEntries
- type TimeEntry
- type TimeEntryClient
- func (c *TimeEntryClient) Create(t *TimeEntry) (*TimeEntry, error)
- func (c *TimeEntryClient) Current() (*TimeEntry, error)
- func (tc *TimeEntryClient) Delete(id uint64) error
- func (c *TimeEntryClient) Get(tid uint64) (*TimeEntry, error)
- func (c *TimeEntryClient) GetRange(start time.Time, end time.Time) (TimeEntries, error)
- func (c *TimeEntryClient) List() (TimeEntries, error)
- func (c *TimeEntryClient) Start(t *TimeEntry) (*TimeEntry, error)
- func (c *TimeEntryClient) Stop(t *TimeEntry) (*TimeEntry, error)
- func (c *TimeEntryClient) Update(t *TimeEntry) (*TimeEntry, error)
Constants ¶
View Source
const Endpoint = "/time_entries"
View Source
const EndpointCurrent = Endpoint + "/current"
View Source
const EndpointStart = Endpoint + "/start"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeEntries ¶
type TimeEntries []TimeEntry
type TimeEntry ¶
type TimeEntry struct { Id uint64 `json:"id,omitempty"` Description string `json:"description"` Project *gtproject.Project `json:"project"` Start time.Time `json:"start"` Stop time.Time `json:"stop"` Duration int64 `json:"duration"` Billable bool `json:"billable"` Workspace *gtworkspace.Workspace `json:"workspace"` Tags []string `json:"tags"` Pid uint64 `json:"pid"` Wid uint64 `json:"wid"` Tid uint64 `json:"tid"` CreatedWith string `json:"created_with,omitempty" ` }
type TimeEntryClient ¶
type TimeEntryClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(thc *gthttp.TogglHttpClient) *TimeEntryClient
Return a UserClient. An error is also returned when some configuration option is invalid
thc,err := gtoggl.NewClient("token") uc,err := guser.NewClient(thc)
func (*TimeEntryClient) Current ¶
func (c *TimeEntryClient) Current() (*TimeEntry, error)
func (*TimeEntryClient) Delete ¶
func (tc *TimeEntryClient) Delete(id uint64) error
func (*TimeEntryClient) GetRange ¶
func (c *TimeEntryClient) GetRange(start time.Time, end time.Time) (TimeEntries, error)
func (*TimeEntryClient) List ¶
func (c *TimeEntryClient) List() (TimeEntries, error)
Click to show internal directories.
Click to hide internal directories.