2017 © Pedro Peláez
 

library challonge-api

ChallongeAPI wrapper for PHP7

image

dolejska-daniel/challonge-api

ChallongeAPI wrapper for PHP7

  • Monday, August 7, 2017
  • by dolejska-daniel
  • Repository
  • 3 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Challonge API PHP7 wrapper

Version pre-v0.4, (*1)

Build Status Test Coverage GitHub release GitHub pre release Packagist Packagist, (*2)

Table of Contents

  1. Introduction
  2. ChallongeAPI
    1. Initializing the library
    2. Using the library
    3. Taking advantage of objects

Introduction

This is Challonge API wrapper for PHP7!, (*3)

With easy usage and clean code., (*4)

ChallongeAPI

Initializing the library

Initializing the library is easy, it just needs array of settings. Mainly, your SET_API_KEY. Take a look:, (*5)

use ChallongeAPI\ChallongeAPI;

$api = new ChallongeAPI([
    //  Your Challonge API key, you can get one at https://challonge.com/settings/developer
    ChallongeAPI::SET_API_KEY => 'YOUR_CHALLONGE_API_KEY'
]);

Available library settings:, (*6)

Name Value Description
SET_API_KEY string Required. Your Challonge API key, you can get one at https://challonge.com/settings/developer
SET_VERIFY_SSL bool Useful when debuging on localhost, cURL might throw SSL verification errors. Should not be used in production.

Using the library

Working with Challonge API was never easier!, (*7)

// Fetches all tournaments created on your account
$api->tList();

// Fetches all tournaments created by organization 'csgo' (csgo.challonge.com)
$api->tList('csgo');

Taking advantage of objects

// Fetches all tournaments created on your account
$list = $api->tList();

//  Outputs name of all tournaments on your account
foreach ($list->getTournaments() as $tournament)
    echo $tournament->name . "<br>";

//  Finds tournament by it's ID in the list
$tournament = $list->getTournamentById(123456789);
echo $tournament->name . "<br>";

//  Finds tournament by it's URL name in the list
$tournament = $list->getTournamentByUrl('best_tournament');
echo $tournament->name . "<br>";

The Versions

07/08 2017

dev-master

9999999-dev https://github.com/dolejska-daniel/challonge-api

ChallongeAPI wrapper for PHP7

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Daniel Dolejška

api wrapper php7 tournaments challonge

29/06 2017

v0.3

0.3.0.0 https://github.com/dolejska-daniel/challonge-api

ChallongeAPI wrapper for PHP7

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Daniel Dolejška

api wrapper php7 tournaments challonge