public function createTournament_STUB( TournamentRegistrationParameters $parameters )
	{
		if (empty($parameters->name))
			throw new RequestParameterException('Tournament name (name) may not be empty.');

		if ($parameters->providerId <= 0)
			throw new RequestParameterException('ProviderID (providerId) must be greater than or equal to 1.');

		$data = json_encode($parameters, JSON_UNESCAPED_SLASHES);

		$resultPromise = $this->setEndpoint("/lol/tournament-stub/" . self::RESOURCE_TOURNAMENT_STUB_VERSION . "/tournaments")
			->setResource(self::RESOURCE_TOURNAMENT_STUB, "/tournaments")
			->setData($data)
			->useKey(self::SET_TOURNAMENT_KEY)
			->makeCall(Region::AMERICAS, self::METHOD_POST);

		return $this->resolveOrEnqueuePromise($resultPromise, function(int $result) {
			return $result;
		});
	}
public function createTournament_STUB( TournamentRegistrationParameters $parameters )
	{
		if (empty($parameters->name))
			throw new RequestParameterException('Tournament name (name) may not be empty.');

		if ($parameters->providerId <= 0)
			throw new RequestParameterException('ProviderID (providerId) must be greater than or equal to 1.');

		$data = json_encode($parameters, JSON_UNESCAPED_SLASHES);

		$resultPromise = $this->setEndpoint("/lol/tournament-stub/" . self::RESOURCE_TOURNAMENT_STUB_VERSION . "/tournaments")
			->setResource(self::RESOURCE_TOURNAMENT_STUB, "/tournaments")
			->setData($data)
			->useKey(self::SET_TOURNAMENT_KEY)
			->makeCall(Region::AMERICAS, self::METHOD_POST);

		return $this->resolveOrEnqueuePromise($resultPromise, function(int $result) {
			return $result;
		});
	}
public function createTournament_STUB ( TournamentRegistrationParameters $ parameters ) { if ( empty ( $ parameters -> name ) ) throw new RequestParameterException ( 'Tournament name (name) may not be empty.' ) ; if ( $ parameters -> providerId <= 0 ) throw new RequestParameterException ( 'ProviderID (providerId) must be greater than or equal to 1.' ) ; $ data = json_encode ( $ parameters , JSON_UNESCAPED_SLASHES ) ; $ resultPromise = $ this -> setEndpoint ( "/lol/tournament-stub/" . self :: RESOURCE_TOURNAMENT_STUB_VERSION . "/tournaments" ) -> setResource ( self :: RESOURCE_TOURNAMENT_STUB , "/tournaments" ) -> setData ( $ data ) -> useKey ( self :: SET_TOURNAMENT_KEY ) -> makeCall ( Region :: AMERICAS , self :: METHOD_POST ) ; return $ this -> resolveOrEnqueuePromise ( $ resultPromise , function ( int $ result ) { return $ result ; } ) ; }
Creates a mock tournament and returns its ID.

@param TournamentRegistrationParameters $parameters

@return int

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

@link https://developer.riotgames.com/api-methods/#tournament-stub-v4/POST_registerTournament

@internal
Creates a mock tournament and returns its ID .