https://github.com/imbue/challonge-php
Simple Challonge API wrapper, in PHP. (unofficial)
https://github.com/imbue/challonge-php
api challonge php wrapper
Last synced: 9 months ago
JSON representation
Simple Challonge API wrapper, in PHP. (unofficial)
- Host: GitHub
- URL: https://github.com/imbue/challonge-php
- Owner: imbue
- License: mit
- Created: 2018-04-09T17:58:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-09T18:43:02.000Z (over 4 years ago)
- Last Synced: 2025-08-02T12:57:06.522Z (11 months ago)
- Topics: api, challonge, php, wrapper
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Challonge PHP wrapper
Simple [Challonge](https://api.challonge.com/v1) API wrapper, in PHP.
## Installation
```bash
composer require imbue/challonge-php
```
## Usage
```php
$challonge = new Challonge('api_key');
```
```php
// Retrieve a set of tournaments created with your account.
$tournaments = $challonge->getTournaments();
// Retrieve a single tournament
$tournament = $challonge->getTournament('tournament_id');
```
```php
// Create a new tournament
$tourament = $challonge->createTournament([
'tournament' => [
'name' => 'Tournament name',
'url' => 'imbues_new_tournament',
...
]
]);
// Update an existing tournament
$tournament = $challonge->updateTournament($tournament, [
'tournament' => [
'name' => 'New tournament name',
...
]
]);
// for the full list of available parameters visit: https://api.challonge.com/v1/documents/tournaments/create
```
## List of available methods
### Tournaments
```php
getTournaments();
getTournament($tournament);
createTournament($params);
updateTournament($tournament, $params);
deleteTournament($tournament);
```
### Participants
```php
getParticipants($tournament);
getParticipant($tournament. $participant);
createParticipant($tournament, $params);
updateParticipant($tournament, $participant, $params);
randomizeParticipants($tournament);
```
### Matches
```php
getMatches($tournament);
getMatch($tournament, $match);
updateMatch($tournament, $match, $params);
```