|
23 | 23 | /**
|
24 | 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. |
27 |
| - * For more complicated usecases and more control see the Firebase class in |
| 26 | + * simplicity over all else. |
| 27 | + * For more complicated usecases and more control see the Firebase class in |
28 | 28 | * Firebase.h.
|
29 | 29 | */
|
30 | 30 | classFirebaseArduino {
|
31 | 31 | public:
|
32 | 32 | /**
|
33 |
| - * Must be called first. This initialize the client with the given |
| 33 | + * Must be called first. This initialize the client with the given |
34 | 34 | * firebase host and credentials.
|
35 | 35 | * \param host Your firebase db host, usually X.firebaseio.com.
|
36 | 36 | * \param auth Optional credentials for the db, a secret or token.
|
37 | 37 | */
|
38 | 38 | voidbegin(const String& host,const String& auth ="");
|
39 | 39 |
|
40 | 40 | /**
|
41 |
| - *Writes data to a new child location undertheparent at path. |
| 41 | + *Appends the integer value tothenode at path. |
42 | 42 | * Equivalent to the REST API's POST.
|
43 | 43 | * You should check success() after calling.
|
44 |
| - * \param path The path inside of your db to the parent object. |
45 |
| - * \param value Data that you wish to add under the parent. |
46 |
| - * \return The unique child key where the data was written. |
| 44 | + * \param path The path of the parent node. |
| 45 | + * \param value Integer value that you wish to append to the node. |
| 46 | + * \return The unique key of the new child node. |
| 47 | +*/ |
| 48 | + StringpushInt(const String& path,int value); |
| 49 | + |
| 50 | +/** |
| 51 | + * Appends the float value to the node at path. |
| 52 | + * Equivalent to the REST API's POST. |
| 53 | + * You should check success() after calling. |
| 54 | + * \param path The path of the parent node. |
| 55 | + * \param value Float value that you wish to append to the node. |
| 56 | + * \return The unique key of the new child node. |
| 57 | +*/ |
| 58 | + StringpushFloat(const String& path,float value); |
| 59 | + |
| 60 | +/** |
| 61 | + * Appends the bool value to the node at path. |
| 62 | + * Equivalent to the REST API's POST. |
| 63 | + * You should check success() after calling. |
| 64 | + * \param path The path of the parent node. |
| 65 | + * \param value Bool value that you wish to append to the node. |
| 66 | + * \return The unique key of the new child node. |
| 67 | +*/ |
| 68 | + StringpushBool(const String& path,bool value); |
| 69 | + |
| 70 | +/** |
| 71 | + * Appends the String value to the node at path. |
| 72 | + * Equivalent to the REST API's POST. |
| 73 | + * You should check success() after calling. |
| 74 | + * \param path The path of the parent node. |
| 75 | + * \param value String value that you wish to append to the node. |
| 76 | + * \return The unique key of the new child node. |
| 77 | +*/ |
| 78 | + StringpushString(const String& path,const String& value); |
| 79 | + |
| 80 | +/** |
| 81 | + * Appends the JSON data to the node at path. |
| 82 | + * Equivalent to the REST API's POST. |
| 83 | + * You should check success() after calling. |
| 84 | + * \param path The path of the parent node. |
| 85 | + * \param value JSON data that you wish to append to the node. |
| 86 | + * \return The unique key of the new child node. |
47 | 87 | */
|
48 | 88 | Stringpush(const String& path,const JsonVariant& value);
|
49 | 89 |
|
50 | 90 | /**
|
51 |
| - * Writes thedata in value to the node located at path equivalent to the |
| 91 | + * Writes theinteger value to the node located at path equivalent to the |
52 | 92 | * REST API's PUT.
|
53 | 93 | * You should check success() after calling.
|
54 | 94 | * \param path The path inside of your db to the node you wish to update.
|
55 |
| - * \param value Data that you wish to write. |
| 95 | + * \param value Integer value that you wish to write. |
| 96 | +*/ |
| 97 | +voidsetInt(const String& path,int value); |
| 98 | + |
| 99 | +/** |
| 100 | + * Writes the float value to the node located at path equivalent to the |
| 101 | + * REST API's PUT. |
| 102 | + * You should check success() after calling. |
| 103 | + * \param path The path inside of your db to the node you wish to update. |
| 104 | + * \param value Float value that you wish to write. |
| 105 | +*/ |
| 106 | +voidsetFloat(const String& path,float value); |
| 107 | + |
| 108 | +/** |
| 109 | + * Writes the bool value to the node located at path equivalent to the |
| 110 | + * REST API's PUT. |
| 111 | + * You should check success() after calling. |
| 112 | + * \param path The path inside of your db to the node you wish to update. |
| 113 | + * \param value Bool value that you wish to write. |
| 114 | +*/ |
| 115 | +voidsetBool(const String& path,bool value); |
| 116 | + |
| 117 | +/** |
| 118 | + * Writes the String value to the node located at path equivalent to the |
| 119 | + * REST API's PUT. |
| 120 | + * You should check success() after calling. |
| 121 | + * \param path The path inside of your db to the node you wish to update. |
| 122 | + * \param value String value that you wish to write. |
| 123 | +*/ |
| 124 | +voidsetString(const String& path,const String& value); |
| 125 | + |
| 126 | +/** |
| 127 | + * Writes the JSON data to the node located at path. |
| 128 | + * Equivalent to the REST API's PUT. |
| 129 | + * You should check success() after calling. |
| 130 | + * \param path The path inside of your db to the node you wish to update. |
| 131 | + * \param value JSON data that you wish to write. |
56 | 132 | */
|
57 | 133 | voidset(const String& path,const JsonVariant& value);
|
58 | 134 |
|
|