Skip to content

Commit d647fe0

Browse files
author
brentru
committed
doxy _dashboard.cpp
1 parent 4a3309f commit d647fe0

1 file changed

Lines changed: 110 additions & 0 deletions

File tree

src/AdafruitIO_Dashboard.cpp

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ AdafruitIO_Dashboard::AdafruitIO_Dashboard(AdafruitIO *io, const char *n) {
1919

2020
AdafruitIO_Dashboard::~AdafruitIO_Dashboard() {}
2121

22+
/**************************************************************************/
23+
/*!
24+
@brief Checks if Adafruit IO Dashboard exists.
25+
https://io.adafruit.com/api/docs/#return-dashboard
26+
@return HTTP response status code, 200 if OK.
27+
*/
28+
/**************************************************************************/
2229
bool AdafruitIO_Dashboard::exists() {
2330
String url = "/api/v2/";
2431
url += _io->_username;
@@ -36,6 +43,13 @@ bool AdafruitIO_Dashboard::exists() {
3643
return status == 200;
3744
}
3845

46+
/**************************************************************************/
47+
/*!
48+
@brief Creates a new dashboard.
49+
https://io.adafruit.com/api/docs/#create-a-dashboard
50+
@return HTTP response status code, 201 if OK.
51+
*/
52+
/**************************************************************************/
3953
bool AdafruitIO_Dashboard::create() {
4054
String url = "/api/v2/";
4155
url += _io->_username;
@@ -66,46 +80,142 @@ bool AdafruitIO_Dashboard::create() {
6680
return status == 201;
6781
}
6882

83+
/**************************************************************************/
84+
/*!
85+
@brief Returns the dashboard owner.
86+
@return Adafruit IO username.
87+
*/
88+
/**************************************************************************/
6989
const char *AdafruitIO_Dashboard::user() { return _io->_username; }
7090

7191
AdafruitIO *AdafruitIO_Dashboard::io() { return _io; }
7292

93+
/**************************************************************************/
94+
/*!
95+
@brief Creates a new toggle block element on a dashboard connected
96+
to provided feed.
97+
@param *feed
98+
Reference to an Adafruit IO feed.
99+
@return Toggle block dashboard element.
100+
*/
101+
/**************************************************************************/
73102
ToggleBlock *AdafruitIO_Dashboard::addToggleBlock(AdafruitIO_Feed *feed) {
74103
return new ToggleBlock(this, feed);
75104
}
76105

106+
/**************************************************************************/
107+
/*!
108+
@brief Creates a new momentary block element on a dashboard
109+
connected to provided feed.
110+
@param *feed
111+
Reference to an Adafruit IO feed.
112+
@return Momentary block dashboard element.
113+
*/
114+
/**************************************************************************/
77115
MomentaryBlock *AdafruitIO_Dashboard::addMomentaryBlock(AdafruitIO_Feed *feed) {
78116
return new MomentaryBlock(this, feed);
79117
}
80118

119+
/**************************************************************************/
120+
/*!
121+
@brief Creates a new slider block element on a dashboard
122+
connected to provided feed.
123+
@param *feed
124+
Reference to an Adafruit IO feed.
125+
@return Slider block dashboard element.
126+
*/
127+
/**************************************************************************/
81128
SliderBlock *AdafruitIO_Dashboard::addSliderBlock(AdafruitIO_Feed *feed) {
82129
return new SliderBlock(this, feed);
83130
}
84131

132+
/**************************************************************************/
133+
/*!
134+
@brief Creates a new gauge block element on a dashboard
135+
connected to provided feed.
136+
@param *feed
137+
Reference to an Adafruit IO feed.
138+
@return Gauge block dashboard element.
139+
*/
140+
/**************************************************************************/
85141
GaugeBlock *AdafruitIO_Dashboard::addGaugeBlock(AdafruitIO_Feed *feed) {
86142
return new GaugeBlock(this, feed);
87143
}
88144

145+
/**************************************************************************/
146+
/*!
147+
@brief Creates a new momentary block element on a dashboard
148+
connected to provided feed.
149+
@param *feed
150+
Reference to an Adafruit IO feed.
151+
@return Text block dashboard element.
152+
*/
153+
/**************************************************************************/
89154
TextBlock *AdafruitIO_Dashboard::addTextBlock(AdafruitIO_Feed *feed) {
90155
return new TextBlock(this, feed);
91156
}
92157

158+
/**************************************************************************/
159+
/*!
160+
@brief Creates a new chart block element on a dashboard
161+
connected to provided feed.
162+
@param *feed
163+
Reference to an Adafruit IO feed.
164+
@return Chart block dashboard element.
165+
*/
166+
/**************************************************************************/
93167
ChartBlock *AdafruitIO_Dashboard::addChartBlock(AdafruitIO_Feed *feed) {
94168
return new ChartBlock(this, feed);
95169
}
96170

171+
/**************************************************************************/
172+
/*!
173+
@brief Creates a new color block element on a dashboard
174+
connected to provided feed.
175+
@param *feed
176+
Reference to an Adafruit IO feed.
177+
@return Color block dashboard element.
178+
*/
179+
/**************************************************************************/
97180
ColorBlock *AdafruitIO_Dashboard::addColorBlock(AdafruitIO_Feed *feed) {
98181
return new ColorBlock(this, feed);
99182
}
100183

184+
/**************************************************************************/
185+
/*!
186+
@brief Creates a new map block element on a dashboard
187+
connected to provided feed.
188+
@param *feed
189+
Reference to an Adafruit IO feed.
190+
@return Map block dashboard element.
191+
*/
192+
/**************************************************************************/
101193
MapBlock *AdafruitIO_Dashboard::addMapBlock(AdafruitIO_Feed *feed) {
102194
return new MapBlock(this, feed);
103195
}
104196

197+
/**************************************************************************/
198+
/*!
199+
@brief Creates a new stream block element on a dashboard
200+
connected to provided feed.
201+
@param *feed
202+
Reference to an Adafruit IO feed.
203+
@return Stream block dashboard element.
204+
*/
205+
/**************************************************************************/
105206
StreamBlock *AdafruitIO_Dashboard::addStreamBlock(AdafruitIO_Feed *feed) {
106207
return new StreamBlock(this, feed);
107208
}
108209

210+
/**************************************************************************/
211+
/*!
212+
@brief Creates a new image block element on a dashboard
213+
connected to provided feed.
214+
@param *feed
215+
Reference to an Adafruit IO feed.
216+
@return Image block dashboard element.
217+
*/
218+
/**************************************************************************/
109219
ImageBlock *AdafruitIO_Dashboard::addImageBlock(AdafruitIO_Feed *feed) {
110220
return new ImageBlock(this, feed);
111221
}

0 commit comments

Comments
 (0)