github.com/sfanous/go-ecobee (go): Package ecobee provides a Go client for the ecobee API.  For more information about the ecobee API, see the documentation: https://www.ecobee.com/home/developer/api/introduction/index.shtml  By design, the ecobee Client accepts any http.Client so OAuth2 requests can be made by using the appropriate authenticated client. Use the https://github.com/golang/oauth2 package to obtain an http.Client which transparently authorizes requests.  You use the library by creating a Client and invoking its methods. The client can be created manually with NewClient.  The below example illustrates how to:  - Fetch a persisted OAuth2 token from a file in JSON format if one exists.  - Authorize an app and create the OAuth2 token using the ecobee PIN authorization method if no persisted OAuth2 token is found.  - Create an http.Client using the OAuth2 token. The Client will auto-refresh the token as necessary.  - Create an ecobee.Client.  - Retrieve a selection of thermostat data for one or more thermostats.  - Retrieve the OAuth2 token from the ecobee.Client (In case it was auto-refreshed).  - Persist the OAuth2 token to a file in JSON format
Keywords: api|client|ecobee|go