Skip to content

tskaard/sensibo-golang

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensibo API for Go

Sensibo API implementation in Golang
Fork from github.com/llun/sensibo-golang

Some changes was made to get more information about pods

Usage

package main

import (
	"fmt"

	"github.com/tskaard/sensibo-golang"
)

func main() {
	api := sensibo.NewSensibo("user-api-key")
	pods, err := api.GetPods()
	if err != nil {
		panic("Cannot get pods information from Sensibo")
	}

	for _, pod := range pods {
		states, err := api.GetAcStates(pod.ID)
		if err != nil {
			fmt.Println("Cannot get ac state")
			continue
		}

		fmt.Println(states)
	}
}

License

MIT

About

Sensibo API for go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%