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