dolejska-daniel/riot-api

Cannot even start

Closed this issue · 1 comments

I've imported it with the composer.
Setup the key
but the example report this error:

Fatal error: Uncaught RiotAPI\LeagueAPI\Exceptions\SettingsException: DataDragon API was not initialized properly! StaticData endpoints cannot be used. in /home/xxxxx.cloudwaysapps.com/zwejmghdjb/public_html/riot/vendor/dolejska-daniel/riot-api/src/LeagueAPI/LeagueAPI.php:1986 Stack trace: #0 /home/xxxx.cloudwaysapps.com/zwejmghdjb/public_html/riot/_importer_item.php(36): RiotAPI\LeagueAPI\LeagueAPI->getStaticChampion() #1 {main} Next TypeError: Argument 1 passed to RiotAPI\LeagueAPI\Objects\ApiObject::__construct() must be of the type array, bool given, called in /home/xxxxx.cloudwaysapps.com/zwejmghdjb/public_html/riot/vendor/dolejska-daniel/riot-api/src/LeagueAPI/LeagueAPI.php on line 1995 and defined in /home/xxx.cloudwaysapps.com/zwejmghdjb/public_html/riot/vendor/dolejska-daniel/riot-api/src/LeagueAPI/Objects/ApiObject.php:47 Stack trace: #0 /home/xxxxx.cloudwaysapps.com/zwejmghdjb/public_html/riot/vendor/dolejska-daniel/riot-api/src/LeagueAPI/LeagueAPI.php(1995): RiotAPI\LeagueAPI\Objects\ApiObject->__cons in /home/xxxxx.cloudwaysapps.com/zwejmghdjb/public_html/riot/vendor/dolejska-daniel/riot-api/src/LeagueAPI/Objects/ApiObject.php on line 47

can you help me understanding where i'm doing error?

Hello, thank you for the interest in this library ☺️ To use StaticData endpoints you first have to initialize DataDragonAPI or allow it's initialization - please see wiki pages for more information.