Comments (6)
Thank you very much 🥇
from riot-api.
Hello,
DataDragon implementation is currently not documented, so the only way to check how it works is to read function documentation comments directly in file.
I can briefly introduce it for you:
- You need to initialize the library using one of these functions:
DataDragonAPI::initByCdn()
, this will fetch latest version of DD from DD itselfDataDragonAPI::initByRegion('eune')
, this will fetch latest version of DD from provided region (eune, euw, etc. -- make sure its lowercase)DataDragonAPI::initByVersion('8.1.1')
, this will explicitly specify requested version of DD, makes no requestDataDragonAPI::initByApi($api)
, this function requires instance ofRiotAPI
and will request realm (region) object from API and use it to read current DD versionDataDragonAPI::initByRealmObject($realm)
, this function accepts realm (region) object on its own, makes no request
- You use static functions to get what you want!
DataDragonAPI::getProfileIcon(50)
, this function returns instance ofHtml
class, which on__toString()
automatically renders itself as an<img>
tag, with all the required attributes to display the image.
If you've got any further questions, feel free to ask 😺
from riot-api.
I find small issue. When you initalize the library using DataDragonAPI::initByApi($api)
and then DataDragonAPI::getProfileIcon(50)
return this link http://ddragon.leagueoflegends.com/cdn8.1.1/img/profileicon/588.png
but you need cdn/8.1.1
from riot-api.
@Tiposbingo thanks! There was a bug, CDN link was not formed correctly when initialized by API or RealmObject. It should be fixed in cdd5e08.
from riot-api.
@Tiposbingo, I've updated DataDragonAPI's wiki pages, feel free to check them out 😸
from riot-api.
@dolejska-daniel thanks, I'll test it with my laravel app soon
from riot-api.
Related Issues (20)
- Question HOT 1
- Issue on DataDragonAPI::getProfileIcon($id) HOT 17
- Question about Winrate per Champion HOT 2
- Package not working with symfony/console v5 HOT 3
- TFT Implementation HOT 14
- MemCache failed to set key
- Rate limiting - how to handle it? HOT 6
- Third party code endpoint returns 404 not found. HOT 2
- Local DDragon error 500
- Guzzle Update to V7
- Question : Can we select more than one region for init.php ? HOT 2
- [Questions] Proxy and passing region constant thru variable HOT 8
- Using TFT api without needing to set League API Key HOT 2
- PHP 8 Support HOT 7
- Help Wanted SettingsException HOT 5
- A little Help with async request HOT 4
- Help with Tournament Stub HOT 7
- Get object values HOT 8
- getMatchlistByAccount with filters returning 404 HOT 2
- Features Update HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riot-api.