dolejska-daniel/riot-api

Fail opening an exemple program

Closed this issue · 3 comments

Hi,

As a beginner in PHP, i did not understand everything (used another API for PHP before). In fact, i've tried to load the getSummonerByName.php in examples file but have got this error :

Warning: require(C:\xampp\htdocs\Final_shortcode_plugin\api\examples\LeagueAPI/../../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\Final_shortcode_plugin\api\examples\LeagueAPI\_init.php on line 7

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\Final_shortcode_plugin\api\examples\LeagueAPI/../../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\Final_shortcode_plugin\api\examples\LeagueAPI\_init.php on line 7

Did i miss anything ?

Thanks a lot

Okay i think it's because i just downloaded it without composer (i'll try to use it as a custom wordpress plugin). But i admit that a don't know how to initialize it so.

Hello and thank you for the interest in this library :)

To be able to correctly use the library you first need to download it, which you've already done, and then you have to install all required dependencies via composer install command in the library directory. For that you will need Composer installed on your machine.

Please check out some YouTube tutorials on composer if you're unsure about how it exactly works.

Okay it works perfectly thank you :) Now i'll have to see how the League callback work !