The HTTP API follows the same Feed identifying and Name-to-Key conversion rules as the MQTT API because under the hood they're talking to the same backend.

This means if you're using the Ruby IO client library, the following will produce publications to the same feed as the MQTT examples given above.

require 'rubygems'
require 'adafruit/io'

client = Adafruit::IO::Client.new(key: ENV['AIO_KEY'])

[
  'Test Mode',
  'test mode',
  'test-mode',
  '44'
].each do |feed_ident|
  client.feeds(feed_ident).data.send_data(feed_ident)
end

This guide was first published on Jul 15, 2016. It was last updated on Mar 08, 2024.

This page (Naming and Accessing Feeds With the HTTP API) was last updated on Jul 15, 2016.

Text editor powered by tinymce.