Giter Club home page Giter Club logo

challonge-api's Introduction

Challonge API PHP7 wrapper

Version pre-v0.4

Build Status Test Coverage GitHub release GitHub pre release Packagist Packagist

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!

With easy usage and clean code.

ChallongeAPI

Initializing the library

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

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:

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!

// 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>";

challonge-api's People

Contributors

dolejska-daniel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rankpingames

challonge-api's Issues

Standings

Hello,

do you have any examples on how standings look?

i cant seem to find example of this in your code.

post scores

All the readme.md says is to list a tournament, what about extending so we can post scores and show game status, live updates and a leader board?

or am i missing something aand this is what we can do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.