@lolmath/ddragon
v2.0.4
Published
Get data from League of Legends Ddragon API.
Downloads
200
Readme
ddragon
ddragon api for League of Legends.
Usage
import { Ddragon } from "@lolmath/ddragon";
const dd = new Ddragon({
version: "6.24.1", // defaults to 8.9.1
language: "ja_JP", // defaults to en_US
dataBaseUrl: "https://ddragon.leagueoflegends.com/cdn" // defaults to https://ddragon.leagueoflegends.com/cdn
imageBaseUrl: "https://ddragon.leagueoflegends.com/cdn" // defaults to https://ddragon.leagueoflegends.com/cdn
imageUrlTransformer: (url) => url // defaults to (url) => url
});
dd.images.splash("Cassiopeia", 0); // https://ddragon.leagueoflegends.com/cdn/img/champion/splash/Cassiopeia_0.jpgGlobal
import { ddragon } from "ddragon/global";
ddragon.configure({
version: "6.24.1",
});
ddragon.images.splash("Cassiopeia", 0); // https://ddragon.leagueoflegends.com/cdn/img/champion/splash/Cassiopeia_0.jpgWebp
import { Ddragon, withWebp } from "@lolmath/ddragon";
const dd = new Ddragon(withWebp());
dd.images.splash("Cassiopeia", 0); // https://ddragon-webp.lolmath.net/img/champion/centered/Cassiopeia_0.webpDocs
Documentation can be found at https://docs.lolmath.net/ddragon
