teamreflex / challongephp Goto Github PK
View Code? Open in Web Editor NEWPackage for interfacing with the Challonge API.
License: MIT License
Package for interfacing with the Challonge API.
License: MIT License
The following lines in ClientWrapper.php
use a Guzzle-specific call that does not work with a standard PSR-18 client:
ChallongePHP/src/Challonge/ClientWrapper.php
Lines 55 to 61 in 470f7f0
For example, when used with the Symfony HTTP client, I receive this error:
Attempted to call an undefined method named "request" of class "Symfony\Component\HttpClient\Psr18Client".
The best approach would be to pass down a RequestFactoryInterface
(as defined in PSR-17) in order to construct a PSR-7 request. This might require a breaking change to the Challonge
class, so an alternative option could be to add a dependency on a specific PSR-7 implementation and construct the request object directly. In both cases, you would then pass that request object to $this->client->sendRequest()
.
Hi,
My dev site is working fine, however having network level issue on production, timeout permanent error.
anyone else having issues with connecting to api?
yes i have contacted support a few months back
I couldn't get this to work until i added
public ?string $team_size_range; public ?string $toxic; public ?string $use_new_style; public array $optional_display_data;
to vendor\team-reflex\challonge-php\src\Challonge\DTO\Tournament.php
Is it just me or does challonge not lock api versions?
I feel like this will break often in the future..
version 3.0.3
A quick glance of your source suggests that it is in working order, but a simple source would be appreciated, just to give an entry point and perhaps a warning about how not to use it.
bulkAddParticipant
what is the syntax for this ? this is what i have tried:
$postSquads[] = $comp->addParticipant(['participant[name]' => $team->name, 'participant[seed]' => $key + 1, 'participant[misc]' => $team->id]);
// 'participant[][name]'=>1, 'participant[][seed]'=>1, 'participant[][misc]'=>'team_id', 'participant[][email]'=>'[email protected]',
// $postSquads = $comp->bulkAddParticipant([
// 'participant[][name]'=>1, 'participant[][seed]'=>1, 'participant[][misc]'=>'team_id', 'participant[][email]'=>'[email protected]',
// // 'participant[][name]'=>2, 'participant[][seed]'=>2, 'participant[][misc]'=>'team_id',
// // 'participant[][name]'=>3, 'participant[][seed]'=>3, 'participant[][misc]'=>'team_id',
// // 'participant[][name]'=>4, 'participant[][seed]'=>4, 'participant[][misc]'=>'team_id',
// // 'participant[][name]'=>5, 'participant[][seed]'=>5, 'participant[][misc]'=>'team_id',
// // 'participant[][name]'=>6, 'participant[][seed]'=>6, 'participant[][misc]'=>'team_id',
// // 'participant[][name]'=>7, 'participant[][seed]'=>7, 'participant[][misc]'=>'team_id'
// ]);
any examples?
/**
* Bulk add participants to a tournament (up until it is started).
* @param array $options
* @return Collection
* @throws \JsonException
* @throws \Reflex\Challonge\Exceptions\InvalidFormatException
* @throws \Reflex\Challonge\Exceptions\NotFoundException
* @throws \Reflex\Challonge\Exceptions\ServerException
* @throws \Reflex\Challonge\Exceptions\UnauthorizedException
* @throws \Reflex\Challonge\Exceptions\UnexpectedErrorException
* @throws \Reflex\Challonge\Exceptions\ValidationException
*/
public function bulkAddParticipant(array $options = []): Collection
{
$response = $this->client->request('POST', "tournaments/{$this->id}/participants/bulk_add", $this->client->mapOptions($options, 'participant'));
return Collection::make($response)
->map(fn (array $participant) => Participant::fromResponse($this->client, $participant['participant']));
}
As title, is this project still active?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.