This PR combines both the ESP8266 and ESP32 examples into one, as they were near identical other than the WiFi include statements and the setInsecure() function call on the 8266 version. Both of these are now handled with preprocessor statements.
While I was at it I also made a few other improvements:
Standardized whitespace (tabs for indentation)
Fixed the millis overflow issue with the request limiter
Adjusted comment language and formatting
Improved code and serial output readability
Disabled additional debugging by default
Serial output before:
����Connecting Wifi: Foobar
...........
WiFi connected
IP address:
192.168.1.200
/youtube/v3/channels?part=statistics&id=UCezJOfu7OtqGzd5xrP3q6WA&key=supersecretkey
Tossing an unexpected character: 1
Tossing an unexpected character: d
Tossing an unexpected character: 9
Tossing an unexpected character:
Tossing an unexpected character:
Closing client
---------Stats---------
Subscriber Count: 14300
View Count: 1356962
Video Count: 127
------------------------
Serial output after:
����
Connecting to WiFi: Foobar
.........
WiFi connected!
IP address: 192.168.1.200
---------Stats---------
Subscriber Count: 14300
View Count: 1356962
Video Count: 127
------------------------
Other than the millis fix there should be no functional changes to the example itself for either board.
This PR combines both the ESP8266 and ESP32 examples into one, as they were near identical other than the WiFi
include
statements and thesetInsecure()
function call on the 8266 version. Both of these are now handled with preprocessor statements.While I was at it I also made a few other improvements:
millis
overflow issue with the request limiterSerial output before:
Serial output after:
Other than the
millis
fix there should be no functional changes to the example itself for either board.