Download the PHP package sct/league without Composer

On this page you can find all versions of the php package sct/league. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package league

"League" PHP API Library

A simple PHP library for the official League of Legends API

Still heavily in development. Currently supports getting Summoner data and Champion data. Can also request specific summoner stats for champions or game types.

Requirements

Installation

You can install this library using composer. Learn about composer @ getcomposer.org

1) Require the package in your composer.json

"sct/league": "dev-master"

2) Run Composer to install the new requirement

php composer.phar install

or

php composer.phar update

Now make sure you are using the composer autoload in your project:

require 'vendor/autoload.php';

use sct\League\Summoner;

$summoner = new Summoner("summoner", "region", "APIKEY");

And thats it you are good to go.

Changes

In version 1.4 the Summoner constructor was changed. You should use the factory method in Summoner to create Summoner objects. The factory supports requesting mulitple Summoners with one request.

Example Usage for multiple summoners

$summoners = Summoner::factory(array("Dyrus", "Xpecial"), "na", "api_key");

$summoners['Dyrus']->getSummonerLevel();

Usage

Getting Summoner Data

$dyrus = Summoner::factory("Dyrus", "na", "api_key");

$dyrus->getSummonerLevel();
$dyrus->getStats();
$dyrus->getRankedStats();
$dyrus->getStatsForGameType(GameType::Unranked);
$dyrus->getStatsForChampionByName("Darius");
$dyrus->getMatchHistory();
$dyrus->getMasteries();
$dyrus->getRunes();

// New Methods
$dyrus->getLeague();
$dyrus->getTeams();

Getting Champion Data

Champions::loadChampions("na", "api key");

$anivia = Champions::getChampion("Anivia");

$anivia->getActive();
$anivia->getRanks();
$anivia->getRankedPlayEnabled();
$anivia->getFreeToPlay();

License

This project is licensed under the MIT License. Feel free to do whatever you want with it.

If you do use this project, it would be great if you could add credit (although you don't have to!) Also I would love to see where and how you are using the project, so send me a message and let me know where I can check it out!

This product is not endorsed, certified or otherwise approved in any way by Riot Games, Inc. or any of its affiliates.


All versions of league with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
guzzle/guzzle Version ~3.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sct/league contains the following files

Loading the files please wait ....