gtclient

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

Documentation

Index

Constants

View Source
const Endpoint = "/clients"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Id       uint64 `json:"id"`
	WId      uint64 `json:"wid"`
	Name     string `json:"name"`
	Currency string `json:"currency"`
}

Toggl Client Definition

type Clients

type Clients []Client

type TClient

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

func NewClient

func NewClient(thc *gthttp.TogglHttpClient) *TClient

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

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

func (*TClient) Create

func (tc *TClient) Create(c *Client) (*Client, error)

func (*TClient) Delete

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

func (*TClient) Get

func (tc *TClient) Get(id uint64) (*Client, error)

func (*TClient) List

func (tc *TClient) List() (Clients, error)

func (*TClient) Update

func (tc *TClient) Update(c *Client) (*Client, error)

Jump to

Keyboard shortcuts

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