Skip to content

idriesalbender/go-tado

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-tado

Caution

This is a side-project and still very much a work in progress.

go-tado is a Go client library for the tado° API.

Usage

import "github.com/idriesalbender/go-tado"

Construct a new tado° client and set up authentication using the WithOAuthClient method.

WithOAuthClient expects an initial authentication token and returns a tado.Client that will then automatically refresh the access token.

// get initial token
token, _ := tado.DefaultOauth2Config.PasswordCredentialsToken(context.Background(), "username", "password")

// create tado client that auto-refreshes access token
client := tado.NewClient(nil).WithOAuthClient(context.Background(), nil, token)