gtproject

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: 8

Documentation

Index

Constants

View Source
const Endpoint = "/projects"

Variables

This section is empty.

Functions

This section is empty.

Types

type Project

type Project struct {
	Id        uint64 `json:"id"`
	WId       uint64 `json:"wid"`
	CId       uint64 `json:"cid"`
	Name      string `json:"name"`
	IsPrivate *bool  `json:"is_private,omitempty"`
}

Toggl Project Definition

type ProjectClient

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

func NewClient

func NewClient(thc *gthttp.TogglHttpClient) *ProjectClient

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

thc,err := gtoggl.NewClient("token")
pc,err := gproject.NewClient(tc)

func (*ProjectClient) Create

func (tc *ProjectClient) Create(p *Project) (*Project, error)

func (*ProjectClient) Delete

func (tc *ProjectClient) Delete(id uint64) error

func (*ProjectClient) Get

func (tc *ProjectClient) Get(id uint64) (*Project, error)

func (*ProjectClient) List

func (tc *ProjectClient) List() (Projects, error)

func (*ProjectClient) Update

func (tc *ProjectClient) Update(p *Project) (*Project, error)

type Projects

type Projects []Project

Jump to

Keyboard shortcuts

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