gtoggl

package module
v0.0.0-...-2f02d1a Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Toggl API for golang

Throttle API for toggle

GoDoc Build Status Coverage Status Go Report

Installation

$ go get -u github.com/kruc/gtoggl-api
$ go get -u github.com/kruc/gtoggl

Quick Start

import "github.com/kruc/gtoggl"
import "github.com/kruc/gtoggl-api/gtproject"

func main() {
  thc, err := gtoggl.NewClient("token")
  ...
  tc, err := gtproject.NewClient(thc)
  ...
  project,err := tc.Get(1)
  if err == nil {
    panic(err)
   }
}

The gtoggl clients provides throttling

Usage

See gtoggl cli

Examples

See godoc for more examples

Prerequisites

go 1.x

Tests

$ go test -v ./...

Deployment

Contributing

All PRs are welcome

Authors

License

This project is licensed under the Apache License - see the LICENSE file for details

Acknowledgments

TODO

Documentation

Overview

Package gtoggl access to toggl REST API

Example:

        import "github.com/kruc/gtoggl.v8"

        func main() {
       	    tc, err := gtoggl.NewClient("token")
	    if err == nil {
    		panic(err)
         }
         timeentry, _:= tc.TimeentryClient.Get(1)
	}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TogglClient

type TogglClient struct {
	TogglHttpClient *gthttp.TogglHttpClient
	WorkspaceClient *gtworkspace.WorkspaceClient
	ProjectClient   *gtproject.ProjectClient
	TClient         *gtclient.TClient
	UserClient      *gtuser.UserClient
	TimeentryClient *gttimeentry.TimeEntryClient
}

Client is an Toggl REST client. Created by calling NewClient.

func NewClient

func NewClient(key string, options ...gthttp.ClientOptionFunc) (*TogglClient, error)

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

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

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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