Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs add GroupService with All and Create actions May 27, 2016
.gitignore add .profile to gitignore May 25, 2016
.travis.yml update travis config Jun 3, 2016
README.md add godoc badge Jun 13, 2016
adafruitio.go cleanup and document everything Jun 1, 2016
client_test.go add Data API filtering Jun 8, 2016
data_service_test.go add Data API filtering Jun 8, 2016
example_interface_test.go add client interface godoc-compatible example Jun 1, 2016
feed_service_test.go include tests as part of `package adafruitio` Jun 1, 2016
group_service.go cleanup and document everything Jun 1, 2016


talk to adafruit io from Go

GoDoc Build Status

A go client library for talking to your io.adafruit.com account.

Requires go version 1.2 or better. Running tests requires the github.com/stretchr/testify library, which can be installed with:

$ go get github.com/stretchr/testify


import "github.com/adafruit/io-client-go"

The io-client-go repository provides the adafruitio package.

Authentication for Adafruit IO is managed by providing your Adafruit IO token in the head of all web requests via the X-AIO-Key header. This is handled for you by the client library, which expects you API Token when it is initialized.

We recommend keeping the Token in an environment variable to avoid including it directly in your code.

client := adafruitio.NewClient(os.Getenv("ADAFRUIT_IO_KEY"))
feeds, _, err := adafruitio.Feed.All()

Some API calls expect parameters, which must be provided when making the call.

feed := &aio.Feed{Name: "my-new-feed"}

Data related API calls expect a Feed to be set before the call is made.

NOTE: the Feed doesn't have to exist yet if you're using the Data.Send() method, but it still needs to be set. If you're relying on the Data API to create the Feed, make sure you set the Key attribute on the new Feed.

feed := &aio.Feed{Name: "My New Feed", Key: "my-new-feed"}
client.Data.Send(&adafruitio.Data{Value: 100})

For full package documentation, visit the godoc page at https://godoc.org/github.com/adafruit/io-client-go


Copyright (c) 2016 Adafruit Industries. Licensed under the MIT license.


  • Fork it ( http://github.com/adafruit/io-client-go/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

adafruit invests time and resources providing this open source code. please support adafruit and open-source hardware by purchasing products from adafruit.