Skip to content

llun/sensibo-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensibo API for Go

Sensibo API implementation in Golang

Usage

package main

import (
	"fmt"

	"github.com/llun/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