dolejska-daniel / riot-api

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

Bad request on Tournament Provider v4 #37

Closed regiszanandrea closed 5 years ago

regiszanandrea commented 5 years ago

Describe the bug Hi, I'm getting error 400 on creating Tournament Provider on v4

To Reproduce Main code

use RiotAPI\LeagueAPI\Objects\ProviderRegistrationParameters;

$riot = new LeagueAPI([
                LeagueAPI::SET_KEY => config('riot.key'),
                LeagueAPI::SET_TOURNAMENT_KEY => config('riot.key'),
                LeagueAPI::SET_REGION => Region::BRASIL,
                LeagueAPI::SET_CACHE_RATELIMIT => config('riot.rate_limit_control_enabled'),
                LeagueAPI::SET_CACHE_PROVIDER => RiotRedisProvider::class,
                LeagueAPI::SET_CACHE_CALLS => config('riot.cache_enabled')
            ]);

$parameters = new ProviderRegistrationParameters([
      'region' => 'br',
      'url' => 'https://myproject.com/riot/callback',
]);

$riot->createTournamentProvider($parameters);

Expected behavior Tournament Provider created

Server (please complete the following information):

Additional context I'm using Laravel.

dolejska-daniel commented 5 years ago

Hey @regiszanandrea, thanks for reporting this issue - there has been a problem with sending request bodies for POST and PUT requests. It should be fixed now (#38 should be fixed as well).