Version: v0.0.0-...-c0d4f26 Latest Latest

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

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 5 Imported by: 0




View Source
const Endpoint = "/me"
View Source
const MeWithRelatedData = "/me?with_related_data=true"
View Source
const ResetEndpoint = "/reset_token"
View Source
const SignupEndpoint = "/signups"


This section is empty.


This section is empty.


type User

type User struct {
	Id         uint64                 `json:"id"`
	ApiToken   string                 `json:"api_token"`
	Email      string                 `json:"email"`
	FullName   string                 `json:"fullname"`
	Timezone   string                 `json:"timezone"`
	Clients    gtclient.Clients       `json:"clients"`
	Projects   gtproject.Projects     `json:"projects"`
	Workspaces gtworkspace.Workspaces `json:"workspaces"`

Toggl User Definition

type UserClient

type UserClient struct {
	// contains filtered or unexported fields

func NewClient

func NewClient(thc *gthttp.TogglHttpClient) *UserClient

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 (*UserClient) Create

func (c *UserClient) Create(email, password, timezone string) (*User, error)

func (*UserClient) Get

func (c *UserClient) Get(realatedData bool) (*User, error)

func (*UserClient) ResetToken

func (c *UserClient) ResetToken() (string, error)

func (*UserClient) Update

func (c *UserClient) Update(u *User) (*User, error)

type UserCreate

type UserCreate struct {
	Email       string `json:"email"`
	Password    string `json:"password"`
	Timezone    string `json:"timezone"`
	CreatedWith string `json:"created_with"`

type UserUpdate

type UserUpdate struct {
	Email    string `json:"email"`
	FullName string `json:"fullname"`

type Users

type Users []User

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL