https://github.com/petersil1998/thresh-example
This is a example Usage for the Thresh library
https://github.com/petersil1998/thresh-example
data-dragon league-api league-of-legends-api php7 riot-api riot-games-api twig-templates
Last synced: 2 months ago
JSON representation
This is a example Usage for the Thresh library
- Host: GitHub
- URL: https://github.com/petersil1998/thresh-example
- Owner: Petersil1998
- Created: 2020-08-24T23:39:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-08T21:29:39.000Z (about 4 years ago)
- Last Synced: 2025-01-02T03:25:20.948Z (4 months ago)
- Topics: data-dragon, league-api, league-of-legends-api, php7, riot-api, riot-games-api, twig-templates
- Language: JavaScript
- Homepage:
- Size: 3.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Thresh Example
This is an example project for the [Thresh](https://github.com/Petersil1998/Thresh) library.
Main file: public/index.php (uses **Twig** as templating engine)
public/summoner.php and public/game.php are pure **PHP** and **HTML** examples
In order to use the **Thresh** library you must have this code in your main PHP file:
Use `EncryptionUtils::encrypt('')` to encrypt your RIOT API KEY which you can get [here](https://developer.riotgames.com)
Use `Config::setApiKey($encrypted_api_key)` to set your api key for the application (this key will be used for the Riot API calls)
Use `Config::setRegion()` to set and update the region that the library uses for API calls (full list of Regions can be found [here](https://github.com/Petersil1998/Thresh/blob/master/src/Constants/Regions.php) )
Use `Config::setPlatform()` to set and update the platform that the library uses for API calls (full list of Platforms can be found [here](https://github.com/Petersil1998/Thresh/blob/master/src/Constants/Platforms.php) )
Use `Loader::init()` to initialize the Application (It automatically updates Champions, Runes, Maps, QueueTypes, etc... when there is a new version available)