example WiFi-encryption

Hi,
I think there is a mistake in this example:
Arduino - WiFiEncryptionType.
“status” should be “WiFi.status()”.
Do I really need “#include <SPI.h>”?
The example does not work, when copiled on a ESP8266 with the ESP8266WiFi-library.
In which way do I have to alter the following line?
byte encryption = WiFi.encryptionType();
data type uint8_t does not work either.
Gruss, wonk