mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
feat: add Ddragon items endpoint to Jax Provider
This commit is contained in:
parent
9903d03d8a
commit
e59416c446
2 changed files with 19 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
const DDragonRequest = require('../../DDragonRequest')
|
||||
|
||||
class DDragonItemEndpoint {
|
||||
constructor(version) {
|
||||
this.version = version
|
||||
}
|
||||
|
||||
list() {
|
||||
return new DDragonRequest(
|
||||
`item.json`,
|
||||
'cdn',
|
||||
this.version
|
||||
).execute()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DDragonItemEndpoint
|
||||
|
|
@ -8,6 +8,7 @@ const SummonerEndpoint = require('./Endpoints/SummonerEndpoint')
|
|||
const DDragonVersionEndpoint = require('./Endpoints/DDragonEndpoints/DDragonVersionEndpoint')
|
||||
const DDragonChampionEndpoint = require('./Endpoints/DDragonEndpoints/DDragonChampionEndpoint')
|
||||
const DDragonRuneEndpoint = require('./Endpoints/DDragonEndpoints/DDragonRuneEndpoint')
|
||||
const DDragonItemEndpoint = require('./Endpoints/DDragonEndpoints/DDragonItemEndpoint')
|
||||
|
||||
class Jax {
|
||||
constructor(config) {
|
||||
|
|
@ -32,6 +33,7 @@ class Jax {
|
|||
|
||||
this.DDragon = {
|
||||
Champion: new DDragonChampionEndpoint(this.version),
|
||||
Item: new DDragonItemEndpoint(this.version),
|
||||
Rune: new DDragonRuneEndpoint(this.version),
|
||||
Version: this.version
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue