Download the PHP package dolejska-daniel/riot-api-league without Composer

On this page you can find all versions of the php package dolejska-daniel/riot-api-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 riot-api-league

RiotAPI PHP wrapper for League of Legends

Version v2.0.0

PHP Composer codecov Packagist Packagist Packagist PHP Version Support Support Project

Table of Contents

  1. Introduction
  2. Downloading
  3. League of Legends API
    1. Resource versions
    2. Initializing the library
    3. Usage example
    4. Cache providers
    5. Rate limiting
    6. Call caching
    7. Asynchronous requests
    8. StaticData endpoints
    9. StaticData linking
    10. Extensions
    11. Callback functions
    12. CLI support
  4. Other Riot APIs

Introduction

Welcome to the League of Legends PHP library repo! The goal of this library is to create easy-to-use library for anyone who might need one. This is a fully object oriented API wrapper for League of Legends API.

Here are some handy features:

Please, refer mainly to the wiki pages. This file contains only general introduction to library features.

Downloading

The easiest way to download and use this library is via Composer. If you are not using Composer yet, you should start right now!

While having Composer installed on your machine it takes only composer require "dolejska-daniel/riot-api-league:^1" command to get the library ready to roll!

For additional information about downloading and initial setup, please see the wiki pages.

League of Legends API

Resource versions

Below you can find table of implemented API resources and the version in which these are currently implemented. Please refer to wiki pages for additional information about endpoints and resources.

Resource Status
Champion Champion resource implemented version
Champion Mastery Champion Mastery resource implemented version
Challenges Challenges resource implemented version
Clash Clash resource implemented version
League League resource implemented version
League Exp League Exp resource implemented version
Masteries Masteries resource implemented version
Match Match resource implemented version
Runes Runes resource implemented version
Spectator Spectator resource implemented version
Static Data Static Data resource implemented version
Stats Stats endpoint implemented version
Status Status resource implemented version
Summoner Summoner resource implemented version
Third Party Code Third Party Code endpoint implemented version
Tournament Tournament resource implemented version
Tournament Stub Tournament Stub resource implemented version

Initializing the library

How to begin?

And there is a lot more settings that you can set when initializing the library - mainly to enable special features or to amend default behaviour of the library. Please see the wiki pages for complete list of library's settings.

Usage example

Working with LeagueAPI can not be easier, just take a look at how to fetch summoner information based on summoner's name:

More usage examples for LeagueAPI can be found here.

Cache providers

Cache providers are responsible for keeping data of static data within instances of the library for easy re-use. This feature is automatically enabled, when any of previously mentioned features is used.

When using this feature, you can set LeagueAPI::SET_CACHE_PROVIDER to any class, thought it has to be compatible with PSR-6 standard, eg. implement Psr\Cache\CacheItemPoolInterface interface. By using LeagueAPI::SET_CACHE_PROVIDER_PARAMS or LeagueAPI::SET_DD_CACHE_PROVIDER_PARAMS option, you can pass any data to the cache provider class.

For additional information about cache providers, please see the wiki pages.

Rate limiting

This clever feature will easily prevent exceeding your per key call limits & method limits. In order to enable this feature, you have to set LeagueAPI::SET_CACHE_RATELIMIT to true. Everything else is completly automatic, so all you need to do is to enable this feature.

For additional information about rate limiting, please see the wiki pages.

Call caching

This feature can prevent unnecessary calls to API within short timespan by temporarily saving fetched data from API and using them as the result data. In order to enable this feature, you have to set LeagueAPI::SET_CACHE_CALLS to true. You should also provide LeagueAPI::SET_CACHE_CALLS_LENGTH option to specify cached data lifetime or else default time interval of 60 seconds will be used.

For additional information about API call caching, please see the wiki pages.

Asynchronous requests

This feature allows request grouping and their asynchronous sending using Guzzle. After request is sent and its response received, user provided callbacks are invoked with received data.

For additional information about asynchronous requests, please see the wiki pages.

StaticData endpoints

These endpoints provide you with easy way to transform StaticData into object instances and easily work with them. They are also supported in numerous DataDragonAPI functions (displaying images).

For additional information about StaticData endpoints, please see the wiki pages.

StaticData linking

This feature allows you to automatically link static data related to your request, any data are managed through DataDragonAPI. All the static data will be locally cached, which makes this operation very fast after its initial requests. Also, any requests made by DataDragonAPI do not count towards your rate limit.

For additional information about StaticData linking, please see the wiki pages.

Extensions

Using extensions for ApiObjects is extremely useful tool, allowing implementation of your own methods and logic into the ApiObjects themselves. Extensions are enabled by using settings option LeagueAPI::SET_EXTENSIONS when initializing the library.

For additional information about API object extensions, please see the wiki pages.

Callback functions

Allows you to provide custom functions to be called before and after the actual API request is sent.

Before callbacks have ability to cancel upcomming request - when false is returned by any callback function, exception Exceptions\RequestException is raised and request is cancelled.

For additional information about callback functions, please see the wiki pages.

Other Riot APIs

Library Description Latest Version Stable Version
All APIs (metapackage) GitHub Latest Release GitHub Release PHP Version
DataDragon API GitHub Latest Release GitHub Release PHP Version
Teamfight Tactics API GitHub Latest Release GitHub Release PHP Version
Legends of Runeterra API GitHub Latest Release GitHub Release PHP Version
Valorant API GitHub Latest Release GitHub Release PHP Version

All versions of riot-api-league with dependencies

PHP Build Version
Package Version
Requires dolejska-daniel/riot-api-base Version ^v2
php Version >=8.1
ext-json Version *
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 dolejska-daniel/riot-api-league contains the following files

Loading the files please wait ....