gtworkspace

package
v0.0.0-...-7924af4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 3 Imported by: 7

Documentation

Index

Constants

View Source
const Endpoint = "/workspaces"

Variables

This section is empty.

Functions

This section is empty.

Types

type Workspace

type Workspace struct {
	Id      uint64 `json:"id"`
	Name    string `json:"name"`
	Premium bool   `json:"premium"`
}

type WorkspaceClient

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

func NewClient

func NewClient(tc *gthttp.TogglHttpClient) *WorkspaceClient

Return a Workspace Cilent. An error is also returned when some configuration option is invalid

tc,err := gtoggl.NewClient("token")
wsc,err := gtoggl.NewWorkspaceClient(tc)

func (*WorkspaceClient) Get

func (wc *WorkspaceClient) Get(id uint64) (*Workspace, error)

GET https://www.toggl.com/api/v8/workspaces/123213

func (*WorkspaceClient) List

func (wc *WorkspaceClient) List() (Workspaces, error)

GET https://www.toggl.com/api/v8/workspaces

func (*WorkspaceClient) Update

func (wc *WorkspaceClient) Update(ws *Workspace) (*Workspace, error)

PUT https://www.toggl.com/api/v8/workspaces

type Workspaces

type Workspaces []Workspace

Jump to

Keyboard shortcuts

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