esp8266wifi Library

hello
i am working on a project using esp8266 or esp-01
and i want to try to build my own program using the esp8266wifi library i am intending to use the esp-01 as a webserver to control some leds , however i cant find the full documentation of the library , with an explanation of each function or method in it , can anyone provide this , also in the examples there is an object with a method called (server.on()) i searched for it but i couldnt find it , can anyone tell me how can i use it?
thanks in advance

yazan666: and i want to try to build my own program using the esp8266wifi library

In programming and electronics, it's extremely important to be precise. You'll do well to take the same approach here on the forum. There is no such thing as an "esp8266wifi library". There have been two popular libraries with similar names. One is the ESP8266WiFi library bundled with the ESP8266 core for Arduino. The other is the ESP8266wifi library, which is for controlling ESP8266 modules running the AT firmware. Because you were too lazy to press the shift key, I had to waste time looking for an on() function in both libraries. If you expect us to spend our time helping you for free, the least you could do is make the minimal effort to capitalize words correctly.

The on() function is actually part of the ESP8266WebServer library. Most of the library documentation for the ESP8266 core for Arduino is found here: https://arduino-esp8266.readthedocs.io/en/latest/index.html but for some reason the ESP8266WebServer library documentation is missing from those pages. You can find it here: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WebServer/README.rst

As for the ESP8266WiFi documentation, it is here: https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/readme.html Generally the ESP8266 libraries attempt to follow the API of the standard Arduino libraries and only document the differences. You may find it useful to refer to the Arduino WiFi library reference pages in addition to the ESP8266WiFi documentation: https://www.arduino.cc/en/Reference/WiFi

Note how, in addition to spending my time to provide you with free help, I had the respect to use proper capitalization and punctuation.