Version numbers - C0D3D3V/Moodle-DL GitHub Wiki
The Moodle API provides us with a version number that we can use to check if a function is available.
All version numbers are listed on the releases page of Moodle.
What is also possible is to visit https://your.moodle.com/lib/upgrade.txt. There you can always find out which version of Moodle you are using.