dolejska-daniel / riot-api

Riot League of Legends & DataDragon API wrappers for PHP7 and PHP8.
GNU General Public License v3.0
112 stars 25 forks source link

Fail opening an exemple program #78

Closed YsarocK closed 4 years ago

YsarocK commented 4 years ago

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

YsarocK commented 4 years ago

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.

dolejska-daniel commented 4 years ago

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.

YsarocK commented 4 years ago

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