|
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(constchar* host,constchar* 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 String value 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 String value that you wish to append to the node. |
| 86 | + * \return The unique key of the new child node. |
| 87 | +*/ |
| 88 | + StringpushString(const String& path,constchar* value); |
| 89 | + |
| 90 | +/** |
| 91 | + * Appends the JSON data to the node at path. |
| 92 | + * Equivalent to the REST API's POST. |
| 93 | + * You should check success() after calling. |
| 94 | + * \param path The path of the parent node. |
| 95 | + * \param value JSON data that you wish to append to the node. |
| 96 | + * \return The unique key of the new child node. |
47 | 97 | */
|
48 | 98 | Stringpush(const String& path,const JsonVariant& value);
|
49 | 99 |
|
50 | 100 | /**
|
51 |
| - * Writes the data in value to the node located at path equivalent to the |
| 101 | + * Writes the integer value to the node located at path equivalent to the |
| 102 | + * REST API's PUT. |
| 103 | + * You should check success() after calling. |
| 104 | + * \param path The path inside of your db to the node you wish to update. |
| 105 | + * \param value integer value that you wish to write. |
| 106 | +*/ |
| 107 | +voidsetInt(const String& path,int value); |
| 108 | + |
| 109 | +/** |
| 110 | + * Writes the float value to the node located at path equivalent to the |
| 111 | + * REST API's PUT. |
| 112 | + * You should check success() after calling. |
| 113 | + * \param path The path inside of your db to the node you wish to update. |
| 114 | + * \param value float value that you wish to write. |
| 115 | +*/ |
| 116 | +voidsetFloat(const String& path,float value); |
| 117 | + |
| 118 | +/** |
| 119 | + * Writes the bool value to the node located at path equivalent to the |
52 | 120 | * REST API's PUT.
|
53 | 121 | * You should check success() after calling.
|
54 | 122 | * \param path The path inside of your db to the node you wish to update.
|
55 |
| - * \param value Data that you wish to write. |
| 123 | + * \param value float value that you wish to write. |
| 124 | +*/ |
| 125 | +voidsetBool(const String& path,bool value); |
| 126 | + |
| 127 | +/** |
| 128 | + * Writes the String value to the node located at path equivalent to the |
| 129 | + * REST API's PUT. |
| 130 | + * You should check success() after calling. |
| 131 | + * \param path The path inside of your db to the node you wish to update. |
| 132 | + * \param value String value that you wish to write. |
| 133 | +*/ |
| 134 | +voidsetString(const String& path,const String& value); |
| 135 | + |
| 136 | +/** |
| 137 | + * Writes the String value to the node located at path equivalent to the |
| 138 | + * REST API's PUT. |
| 139 | + * You should check success() after calling. |
| 140 | + * \param path The path inside of your db to the node you wish to update. |
| 141 | + * \param value String value that you wish to write. |
| 142 | +*/ |
| 143 | +voidsetString(const String& path,constchar* value); |
| 144 | + |
| 145 | +/** |
| 146 | + * Writes the JSON data to the node located at path. |
| 147 | + * Equivalent to the REST API's PUT. |
| 148 | + * You should check success() after calling. |
| 149 | + * \param path The path inside of your db to the node you wish to update. |
| 150 | + * \param value JSON data that you wish to write. |
56 | 151 | */
|
57 | 152 | voidset(const String& path,const JsonVariant& value);
|
58 | 153 |
|
|