21
21
#include " FirebaseObject.h"
22
22
23
23
/* *
24
- *Gateway class for Arduino clients to interact withthe Firebase backend .
24
+ *Main class for Arduino clients to interact with Firebase.
25
25
* This implementation is designed to follow Arduino best practices and favor
26
- * simplicity over all else. For more complicated usecases and more control
27
- * see the Firebase class in Firebase.h.
26
+ * simplicity over all else.
27
+ * For more complicated usecases and more control see the Firebase class in
28
+ * Firebase.h.
28
29
*/
29
30
class FirebaseArduino {
30
31
public:
31
32
/* *
32
- * Must be called first. This sets the class up for use.
33
- * \param host Your firebase db server domain name, usually X.firebaseIO.com.
34
- * \param auth Optional authentication for the db, a Secret or Token.
33
+ * Must be called first. This initialize the client with the given
34
+ * firebase host and credentials.
35
+ * \param host Your firebase db host, usually X.firebaseio.com.
36
+ * \param auth Optional credentials for the db, a secret or token.
35
37
*/
36
38
void begin (const char * host,const char * auth =" " );
37
39
38
40
/* *
39
- *Adds the datain value to the list located at path.Equivilent to the
40
- * REST API's POST.
41
+ *Writes datato a new child location under the parent at path.
42
+ *Equivalent to the REST API's POST.
41
43
* You should check success() after calling.
42
- * \param path The path inside of your db to thelist you wish to update .
43
- * \param value Data that you wish to addto thelist .
44
- * \return The childname where the data was written.
44
+ * \param path The path inside of your db to theparent object .
45
+ * \param value Data that you wish to addunder theparent .
46
+ * \return Theunique childkey where the data was written.
45
47
*/
46
48
Stringpush (const String& path,const JsonVariant& value);
47
49
48
50
/* *
49
- * Writes the data in value to the node located at pathEquivilent to the
51
+ * Writes the data in value to the node located at pathequivalent to the
50
52
* REST API's PUT.
51
53
* You should check success() after calling.
52
54
* \param path The path inside of your db to the node you wish to update.
@@ -58,16 +60,16 @@ class FirebaseArduino {
58
60
/* *
59
61
* Gets the value located at path.
60
62
* You should check success() after calling.
61
- * \param path The pathinside of your db of the node you wish to retrieve.
63
+ * \param path The pathto the node you wish to retrieve.
62
64
* \return The data located at that path. This may either be a single element
63
65
* or it may be a json structure. Will only be populated if success() is true.
64
66
*/
65
67
FirebaseObjectget (const char * path);
66
68
67
69
/* *
68
- * Remove thevariable , and possibly entire tree, located at path.
70
+ * Remove thenode , and possibly entire tree, located at path.
69
71
* You should check success() after calling.
70
- * \param path The pathinside of your db to the node you wish to remove,
72
+ * \param path The path to the node you wish to remove,
71
73
* including all of its children.
72
74
*/
73
75
void remove (const char * path);