2017 © Pedro Peláez
 

library plol

PHP interface wrapper to the League of Legends API

image

kolter/plol

PHP interface wrapper to the League of Legends API

  • Saturday, March 26, 2016
  • by Kolter
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PLoL

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

PLoL is a PHP API that tries to simplify with the League of Legends API The main focus is to add versability and scalability. It implements a cache system and a rate limiter handler, custom output modes, custom error codes handler., (*2)

Libraries used

How to install

Using Composer, (*3)

composer require "kolter/plol" dev-master

composer.json, (*4)

"require":
{
"kolter/plol":"dev-master"
}

Configuration

First of all, get your League of Legends API KEY. You will need this api key to instance resources. In the config/config.json folder there are some parameters you may want to change:, (*5)

There are some default options that you may consider change:, (*6)

  • cache: true means resources will be cached, false won't.
  • region: default region to the api. (check regions acronym)

Basic Api Usage

This library use the PSR-4 implementation of namespaces. Basic implementation: ``` php <?php use Kolter\PLoL\Resources\Game;, (*7)

include('path/to/vendor/autoload.php');, (*8)

$game = new Game("{YOUR API KEY HERE}"); echo $game->get(1245678);, (*9)

This is basic usage, you will get the result in json (by default). you can set some option in one specified instance.

``` php
$game = (new Game("{YOUR API KEY HERE}"))->setCache(false)
->setOutputMode(ObjectOutput());
$game->get(1245678)->games->fellowPlayers[0]->teamId;

Take a look at the ResourceRequest class API for more information., (*10)

Structure

Resources are what you can get in the League of Legends API. Bellow there are different resources and how to use them, with examples., (*11)

ResourceHandler

Every resource class extends from this. This is where the core is., (*12)

Champion

Get info of a specific champion, (*13)

Get info of the current game., (*14)

Game

Get info of the current game., (*15)

League

Get info of the current game., (*16)

The Versions

26/03 2016

dev-master

9999999-dev https://github.com/Ozumas7/plol

PHP interface wrapper to the League of Legends API

  Sources   Download

GPL-3.0

The Requires

 

by Pablo Luna

api lol league of legends plol

26/03 2016

v1.0.0

1.0.0.0 https://github.com/Ozumas7/plol

PHP interface wrapper to the League of Legends API

  Sources   Download

GPL-3.0

The Requires

 

by Pablo Luna

api lol league of legends plol