diff --git a/api.html b/api.html
index 35ea364..0934f31 100644
--- a/api.html
+++ b/api.html
@@ -18,9 +18,10 @@ title: API Documentation
boolean connect (clientID, username, password, willTopic, willQoS, willRetain, willMessage)
void disconnect ()
int publish (topic, payload)
- int publish (topic, payload, length)
- int publish (topic, payload, length, retained)
- int publish_P (topic, payload, length, retained)
+ int publish (topic, payload, retained)
+ int publish (topic, payload, length)
+ int publish (topic, payload, length, retained)
+ int publish_P (topic, payload, length, retained)
boolean subscribe (topic, [qos])
boolean unsubscribe (topic)
boolean loop ()
@@ -173,33 +174,16 @@ void setup() {
- int publish (topic, payload, length)
- Publishes a message to the specified topic.
+ int publish (topic, payload, retained)
+ Publishes a string message to the specified topic.
Parameters
- topic - the topic to publish to (const char[])
- - payload - the message to publish (byte array)
- - length - the length of the message (byte)
-
- Returns
-
- - false - publish failed, either connection lost, or message too large
- - true - publish succeeded
-
-
-
-
- int publish (topic, payload, length, retained)
- Publishes a message to the specified topic, with the retained flag as specified.
- Parameters
-
- - topic - the topic to publish to (const char[])
- - payload - the message to publish (byte array)
- - length - the length of the message (byte)
- - retained - whether the message should be retained (byte)
+
- payload - the message to publish (const char[])
+ - retained - whether the message should be retained (boolean)
- - 0 - not retained
- - 1 - retained
+ - false - not retained
+ - true - retained
@@ -210,18 +194,56 @@ void setup() {
+
+ int publish (topic, payload, length)
+ Publishes a message to the specified topic.
+ Parameters
+
+ - topic - the topic to publish to (const char[])
+ - payload - the message to publish (byte[])
+ - length - the length of the message (byte)
+
+ Returns
+
+ - false - publish failed, either connection lost, or message too large
+ - true - publish succeeded
+
+
+
+ int publish (topic, payload, length, retained)
+ Publishes a message to the specified topic, with the retained flag as specified.
+ Parameters
+
+ - topic - the topic to publish to (const char[])
+ - payload - the message to publish (byte[])
+ - length - the length of the message (byte)
+ - retained - whether the message should be retained (boolean)
+
+ - false - not retained
+ - true - retained
+
+
+
+ Returns
+
+ - false - publish failed, either connection lost, or message too large
+ - true - publish succeeded
+
+
+
+
int publish_P (topic, payload, length, retained)
Publishes a message stored in PROGMEN
to the specified topic, with the retained flag as specified.
Parameters
- topic - the topic to publish to (const char[])
- - payload - the message to publish (PROGMEM byte array)
+ - payload - the message to publish (PROGMEM byte[])
- length - the length of the message (byte)
- - retained - whether the message should be retained (byte)
+
- retained - whether the message should be retained (boolean)
- - 0 - not retained
- - 1 - retained
+ - false - not retained
+ - true - retained