Download the PHP package michaelgarrez/lol-api without Composer

On this page you can find all versions of the php package michaelgarrez/lol-api. 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 lol-api

League of Legends API wrapper in PHP

Scrutinizer Code Quality Code Coverage Build Status Build Status SensioLabsInsight Latest Stable Version Total Downloads Latest Unstable Version License Dependency Status

Introduction

Simple PHP wrapper for League of legends API.

This library implements two custom exceptions to catch your API rate limits (ServiceRateLimitException && UserRateLimitException).

It also implements Doctrine cache to cache the API results into your favorite cache driver.

Migration from 0. to 1.

Three main features breaking BC caused a bump to the 1.* version:

Only the third one can actually break BC. You should now use the getResult() method on the ApiResult object returned.

How to use

Basic use

You first have to select the API you want to fetch from and then the specific method. Each call will return an ApiResult object containing the URL called, the Guzzle Response object and an array containing the API result.

To get the result you can call the method getResult() on the ApiResult object.

Use cache

By default Symfony NullAdapter cache is used. You can specify another Cache Adapter (implementing PSR6 Adapters) to the ApiClient.

Example with Predis :

The default ttl value cacheApiResult() method is 60 seconds.

Rate limit

When you reach the rate limit (User or Service) the library will throw you an implementation of the AbstractRateLimitException. You can get the type of rate limit and the time to wait before a new call (Riot is very strict on the rate limit respect).

Example with a sleep :

API implemented

API Version
Summoner API v3
Match API v3
Champion API v3
Spetactor API v3
Static Data API v3
League API v3
Status API v3
Champion Mastery API v3
Masteries API v3
Runes API v3

Contributing

Please create issues if you have any problem with this library integration.

If you want to contribute, create a PR, you must respect PSR-2 and your code must be tested.

Thank you !


All versions of lol-api with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.0
symfony/cache Version ^3.2|^4.0
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 michaelgarrez/lol-api contains the following files

Loading the files please wait ....