Add a participant to a tournament (up until it is started).

@param array $params
165341
public function addParticipant($params = [])
    {
        $response = Guzzle::post("tournaments/{$this->id}/participants", $params);

        $participant = new Participant($response->participant);
        $participant->tournament_slug = $this->id;

        return $participant;
    }
397753
public function init(array $params = array()) {
        if (count($params) !== count($this->_config)) {
            throw new Garp_Browsebox_Exception('Number of parameters does not match the number of required parameters in filter "'.$this->getId().'"');
        }
        $this->_values = $params;
    }
502585
public function prepare($params)
    {
        $this->params = !empty($params) ? $params[ 0 ] : [ ];

        // force mandatory fields
        $this->filter();
        $this->maxRecords();
    }
556414
def create(tournament, name, **params):
    """"""
    params.update({"name": name})

    return api.fetch_and_parse(
        "POST",
        "tournaments/%s/participants" % tournament,
        "participant",
        **params)
913116
protected function setParams(array $params) {
		parent::setParams($params);
		if($this->autoinc===true){
			$this->notNull=false;
		}
	}
813144
public function addParameters(&$params)
    {
        $params['grant_type'] = $this->getType();
        $params['username'] = $this->username;
        $params['password'] = $this->password;
    }
707112
public function addEvent($event, array $params = []): self
    {
        $event = $this->wrapperEvent($event, null, $params);

        /** @var $event Event */
        if (($event instanceof EventInterface) && !isset($this->events[$event->getName()])) {
            $this->events[$event->getName()] = $event;
        }

        return $this;
    }
1181313
public function setRecognizer($params)
    {
        if (is_array($params) && ! isset($params['class'])) {
            $params['class'] = Recognizer::className();
        }

        $this->_recognizer = Yii::createObject($params);
    }
475607
public function add($params)
    {
        if (is_array($params)) {
            if (!empty($params['msg'])) {
                if (isset($params['type']) && !empty($params['type'])) {
                    $this->type($params['type']);
                } else {
                    $this->type = 'light';
                }
                Session::set('sys_msg', ['msg'=>$params['msg'], 'type'=>$this->type]);

                return true;
            }
        } else {
            return false;
        }
    }
1043870
protected function runConsole(array $params): void
    {
        $kernel = $this->app->make(KernelContract::class);

        $status = $kernel->handle(
            $input = new ArgvInput(array_values($params)),
            new ConsoleOutput()
        );

        $kernel->terminate($input, $status);

        exit($status);
    }
226704
function registerResults($competitionId, array $results)
	{
		if(!$competitionId)
		{
			throw new Exception;
		}
		if(!$results)
		{
			throw new Exception;
		}
		return $this->execute('POST', '/competitions/%d/results/', array($competitionId, array($results)));
	}
578046
public function updateWithScores($scores)
    {
        // Update the winner player.
        if (isset($scores['winnerplayer'])) {
            $player = $this->getPlayer($scores['winnerplayer']);
            if ($player) {
                $this->playerQueryBuilder->save($player);
            }
        }

        // Update remaining players.
        foreach ($this->loggedInPlayers as $player) {
            $this->updatePlayer($player);
        }
        $this->playerQueryBuilder->saveAll($this->loggedInPlayers);
    }
929922
public function addRouteParameters(array $params)
    {
        $this->parameters = array_merge($this->parameters,$params);
        $this->rawParameters = array_merge($this->rawParameters, $params);

        $this->routeParameters = $params;
    }
884284
public function addParticipants(array $participants)
    {
        if (count($participants)) {
            foreach ($participants as $user_id) {
                Participant::firstOrCreate([
                    'user_id' => $user_id,
                    'thread_id' => $this->id,
                ]);
            }
        }
    }
551685
private function saveInputParams($params){
		foreach($params as $param => $value){
			$var = "_" . $param;

			if(!isset($this->{$var}) || !is_null($this->{$var})){
				$this->{$var} = $value;
			}
		}

		return $this;
	}
1353655
public function addQueryParams(array $params) {
		foreach ($params as $param => $value) {
			$this->setQueryParam($param, $value);
		}
		
		return $this;
	}
531395
public function update($params = [])
    {
        $response = Guzzle::put("tournaments/{$this->tournament_slug}/matches/{$this->id}", $params);
        return $this->updateModel($response->match);
    }