2017 © Pedro Peláez
 

library challonge-php

Unofficial API to interface with the bracket generator Challonge.

image

team-reflex/challonge-php

Unofficial API to interface with the bracket generator Challonge.

  • Monday, April 10, 2017
  • by uniquoooo
  • Repository
  • 5 Watchers
  • 7 Stars
  • 5,923 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

ChallongePHP

Test Latest Version Downloads, (*1)

PSR-18 compliant package for interfacing with the Challonge API., (*2)

Installation

Refer to the table for PHP version compatibility:, (*3)

ChallongePHP Ver. Compatible PHP
^5.0 8.1 - 8.2
^4.0 8.0 - 8.1
^3.0 7.4 - 8.0
^2.1 7.4
^2.0 7.4
^1.0 7.0 - 7.4

Install via composer:, (*4)

composer require team-reflex/challonge-php:version

Usage

As the package is PSR-18 compliant, it does not come with an HTTP client by default., (*5)

You can use a client such as Guzzle, and pass an instance of it when instantiating:, (*6)

$http = new GuzzleHttp\Client();
$challonge = new Challonge($http, 'api_key_here', true);

By default, the package maps the keys of any input, as Challonge requires its input to be in a format such as:, (*7)

$tournament = $challonge->createTournament([
    'tournament[name]' => 'test'
]);

Which means you are able to use the package without prefixing your keys:, (*8)

$tournament = $challonge->createTournament([
    'name' => 'test'
]);

You can change the third argument to false to disable this mapping if you would prefer to do it yourself., (*9)

Now you're ready to make requests:, (*10)

$tournament = $challonge->fetchTournament('challongephptest');

API Updates

Challonge does not lock their API and has been consistently adding new fields to objects, thus breaking strongly typed DTOs., (*11)

As of 3.0.4, all three DTOs have been marked to ignore missing fields. If Challonge adds a new field, it will no longer throw a DataTransferObjectError, but the DTO will also however not contain that new field., (*12)

Documentation

As the package is fully type-hinted, everything should be self documenting, however there is documentation in the wiki., (*13)

Contact

The Versions

10/04 2017

dev-master

9999999-dev

Unofficial API to interface with the bracket generator Challonge.

  Sources   Download

MIT

The Requires

 

10/04 2017

v1.0.3

1.0.3.0

Unofficial API to interface with the bracket generator Challonge.

  Sources   Download

MIT

The Requires

 

17/01 2016

v1.0.2

1.0.2.0

Unofficial API to interface with the bracket generator Challonge.

  Sources   Download

MIT

The Requires

 

23/12 2015

v1.0.1

1.0.1.0

Unofficial API to interface with the bracket generator Challonge.

  Sources   Download

MIT

The Requires

 

16/12 2015

v1.0

1.0.0.0

Unofficial API to interface with the bracket generator Challonge.

  Sources   Download

MIT

The Requires