netatmo

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

README

netatmo

netatmo is a helper package to use the official netatmo api provided here: https://dev.netatmo.com/guideline

Documentation

Overview

package netatmo

Index

Constants

View Source
const (

	// BaseURL is netatmo api url
	BaseURL = "https://api.netatmo.net/"

	// AuthURL is netatmo auth url
	AuthURL = BaseURL + "oauth2/token"

	// deviceURL is netatmo device url
	DeviceURL = BaseURL + "/api/getstationsdata"
)

Variables

This section is empty.

Functions

func Echo

func Echo(echo string) string

Types

type AuthorizationCode

type AuthorizationCode struct {
	ClientID    string `json:"clint_id"`
	RedirectURI string `json:"redirect_uri"`
	Scope       string `json:"scope"`
	State       string `json:"state"`
}

AuthorizationCode represents the data which is necessary for using the "Authorization code" grant type. This standard method. This method is for personal use only (the account with which the API application have been created). As alternative "Client credentials" grant type can be used.

type ClientCredentials

type ClientCredentials struct {
	GrantType string `json:"grant_type"`

	ClientID     string `json:"clint_id"`
	ClientSecret string `json:"client_secret"`

	Username string   `json:"username"`
	Password string   `json:"password"`
	Scope    []string `json:"scope"`
}

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	Username     string
	Password     string
}

https://github.com/exzz/netatmo-api-go/blob/master/weather.go Config is used to specify credential to Netatmo API ClientID : Client ID from netatmo app registration at http://dev.netatmo.com/dev/listapps ClientSecret : Client app secret Username : Your netatmo account username Password : Your netatmo account password

type RefreshToken

type RefreshToken struct {
}

type Token

type Token struct {
	AccessToken  string
	ExpiresIn    string
	RefreshToken RefreshToken
}

Jump to

Keyboard shortcuts

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