/** * Randomize seeds among participants. * * @param string $tournament * @return array */ public function randomizeParticipants($tournament) { $response = Guzzle::post("tournaments/{$tournament}/participants/randomize"); $participants = []; foreach ($response as $team) { $participant = new Participant($team->participant); $participant->tournament_slug = $tournament; $participants[] = $participant; } return $participants; }
/** * Bulk add participants to a tournament (up until it is started). * * @param array $params * @return array */ public function bulkAddParticipant($params = []) { $response = Guzzle::post("tournaments/{$this->id}/participants/bulk_add", $params); $participants = []; foreach ($response->participant as $participant) { $participant = new Participant($participant); $participant->tournament_slug = $tournament; $participants[] = $participant; } return $participants; }