Skip to content

gonzolino/gotado

Folders and files

NameName
Last commit message
Last commit date
Dec 25, 2022
Apr 13, 2022
Apr 13, 2021
Nov 11, 2021
Jan 24, 2021
Feb 20, 2023
Jan 24, 2021
Apr 13, 2021
Mar 18, 2022
Apr 13, 2022
Apr 13, 2022
Mar 18, 2022
Nov 11, 2021
Nov 11, 2021
Feb 20, 2023
Feb 20, 2023
Mar 18, 2022
Mar 18, 2022
Dec 11, 2022
Nov 22, 2022
Mar 18, 2022
Apr 13, 2021
Apr 13, 2021
Mar 18, 2022
Mar 18, 2022

Repository files navigation

gotado

Build Actions Status Go Report Card PkgGoDev

Go client for the tado° Web API. Still in early development, so only a subset of the API functionality is implemented.

Installation

Install gotado with go get:

go get github.com/gonzolino/gotado

Then you can import "github.com/gonzolino/gotado" in your packages. Have a look at the examples directory to see example code.

Usage

Authentication

Besides your tado° username and password you need a clientId and clientSecret to authenticate with the tado° API. One way to get those is to grab them from https://my.tado.com/webapp/env.js.

Getting Started

Get started by creating a client object:

tado := gotado.New("cliendId", "clientSecret")

With the client you can authenticate and start using the gotado functions:

me, err := tado.Me(ctx, "username", "password")
fmt.Printf("User Email: %s\n", me.Email)

home, err := me.GetHome(client, "My Home Name")
fmt.Printf("Home Address:\n%s\n%s %s\n", *home.Address.AddressLine1, *home.Address.ZipCode, *home.Address.City)

Just have a look at the package documentation to learn more about whats possible.

Contributing

Please feel free to submit issues and/or pull requests if you discover bugs or missing features.