public function createTournamentProvider( ProviderRegistrationParameters $parameters )
	{
		if ($this->getSetting(self::SET_INTERIM, false))
			return $this->createTournamentProvider_STUB($parameters);

		if (empty($parameters->url))
			throw new RequestParameterException('Callback URL (url) may not be empty.');

		if (in_array(strtolower($parameters->region), self::TOURNAMENT_ALLOWED_REGIONS, true) == false)
			throw new RequestParameterException('Value of region (region) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_REGIONS));

		$parameters->region = strtoupper($parameters->region);

		$data = json_encode($parameters, JSON_UNESCAPED_SLASHES);

		$resultPromise = $this->setEndpoint("/lol/tournament/" . self::RESOURCE_TOURNAMENT_VERSION . "/providers")
			->setResource(self::RESOURCE_TOURNAMENT, "/providers")
			->setData($data)
			->useKey(self::SET_TOURNAMENT_KEY)
			->makeCall(Region::AMERICAS, self::METHOD_POST);

		return $this->resolveOrEnqueuePromise($resultPromise, function(int $result) {
			return $result;
		});
	}
public function createTournamentProvider( ProviderRegistrationParameters $parameters )
	{
		if ($this->getSetting(self::SET_INTERIM, false))
			return $this->createTournamentProvider_STUB($parameters);

		if (empty($parameters->url))
			throw new RequestParameterException('Callback URL (url) may not be empty.');

		if (in_array(strtolower($parameters->region), self::TOURNAMENT_ALLOWED_REGIONS, true) == false)
			throw new RequestParameterException('Value of region (region) is invalid. Allowed values: ' . implode(', ', self::TOURNAMENT_ALLOWED_REGIONS));

		$parameters->region = strtoupper($parameters->region);

		$data = json_encode($parameters, JSON_UNESCAPED_SLASHES);

		$resultPromise = $this->setEndpoint("/lol/tournament/" . self::RESOURCE_TOURNAMENT_VERSION . "/providers")
			->setResource(self::RESOURCE_TOURNAMENT, "/providers")
			->setData($data)
			->useKey(self::SET_TOURNAMENT_KEY)
			->makeCall(Region::AMERICAS, self::METHOD_POST);

		return $this->resolveOrEnqueuePromise($resultPromise, function(int $result) {
			return $result;
		});
	}
public function createTournamentProvider ( ProviderRegistrationParameters $ parameters ) { if ( $ this -> getSetting ( self :: SET_INTERIM , false ) ) return $ this -> createTournamentProvider_STUB ( $ parameters ) ; if ( empty ( $ parameters -> url ) ) throw new RequestParameterException ( 'Callback URL (url) may not be empty.' ) ; if ( in_array ( strtolower ( $ parameters -> region ) , self :: TOURNAMENT_ALLOWED_REGIONS , true ) == false ) throw new RequestParameterException ( 'Value of region (region) is invalid. Allowed values: ' . implode ( ', ' , self :: TOURNAMENT_ALLOWED_REGIONS ) ) ; $ parameters -> region = strtoupper ( $ parameters -> region ) ; $ data = json_encode ( $ parameters , JSON_UNESCAPED_SLASHES ) ; $ resultPromise = $ this -> setEndpoint ( "/lol/tournament/" . self :: RESOURCE_TOURNAMENT_VERSION . "/providers" ) -> setResource ( self :: RESOURCE_TOURNAMENT , "/providers" ) -> setData ( $ data ) -> useKey ( self :: SET_TOURNAMENT_KEY ) -> makeCall ( Region :: AMERICAS , self :: METHOD_POST ) ; return $ this -> resolveOrEnqueuePromise ( $ resultPromise , function ( int $ result ) { return $ result ; } ) ; }
Creates a tournament provider and returns its ID.

@param ProviderRegistrationParameters $parameters

@return int

@throws SettingsException
@throws RequestException
@throws RequestParameterException
@throws ServerException
@throws ServerLimitException
@throws GeneralException

@link https://developer.riotgames.com/api-methods/#tournament-v4/POST_registerProviderData
Creates a tournament provider and returns its ID .