This project is a wrapper for Riot API. It uses Retrofit and Picasso.
Do not publish your api key, you can use a proxy. Tuto : How to secure your API key using a proxy
To build this project, use ./gradlew assemble.
Then put the aar file that can be found in riot-api/build/outputs/aar/riot-api-0.0.1.aar to your lib directory
//datadragon api(no need api key, only static data)
var dataDragonApi: DataDragonApi = DataDragonApi(context) //forced cache
var dataDragonApi: DataDragonApi = DataDragonApi() //auto cache
//riot api (do not publish app with your api key)
val riotApi: RiotApi = RiotApi("api-key", "na1.api.riotgames.com")var call: Call<ChampionListData> = dataDragon.getChampions() //champions list
var call: Call<ShardStatus> = riotApi.getLoLStatus() //servers statusval options = mapOf("Accept-Language" to "en-US,en;q=0.5")
riotApi.matchService.getMatchById(000000000, options)var bitmap: Bitmap = dataDragonApi.getChampionSquare("6.24.1", "en_US", "Aatrox.png") //get directly the bitmap
dataDragonApi.getChampionSquare("6.24.1", "en_US","Aatrox.png", callback) //with Callback
dataDragonApi.getChampionSquare("6.24.1", "en_US","Aatrox.png", imageView) //with ImageViewval options = mapOf("fit" to false, "center-crop" to false, "resize" to Pair(50, 50))
dataDragonApi.getChampionSquare("Aatrox.png", imageView, options)Implementation of all api reference is done.
Todo: Test Tounament-Stub and Tournament
Inspired by spotify-web-api-android