0.4.0
[0.4.0] (2021-06-22)
Added
- Add significant rate limiting functionality using the bottleneck library
- Support for a user-specified number of retry attempts after receiving HTTP 429 errors
- Automatic rate limiting with retry timing automatically determined based on response headers
- New
max-concurrent
andmin-time
options for Riot API requests
- Setting multiple Action properties simultaneously from an object using
.set()
const summonerData = await galeforce.lol.summoner().set({ region: galeforce.region.lol.NORTH_AMERICA, summonerName: 'name' }).exec();
- Expose the
Division
,Tier
,Game
,Queue
, andRegion
enums directly viaGaleforceModule.*
import GaleforceModule, { Region } from 'galeforce'; console.log(Region.lol.NORTH_AMERICA) // na1
- Legends of Runeterra Data Dragon support under
galeforce.lor.ddragon
Changed
- [breaking] Update the structure of the config object passed into the
GaleforceModule()
constructor-
Now merges the provided configuration object with a default object
{ 'riot-api': { key: undefined, }, 'rate-limit': { type: 'bottleneck', cache: { type: 'internal', 'key-id': 'galeforce', uri: undefined, }, options: { intervals: {}, 'max-concurrent': null, 'min-time': 0, 'retry-count-after-429': 3, }, }, debug: [], }
-
- [breaking] Rename enums to have singular names
→galeforce.regions
galeforce.region
→galeforce.queues
galeforce.queue
→galeforce.tiers
galeforce.tier
→galeforce.divisions
galeforce.division
→galeforce.games
galeforce.game
- Update the
galeforce.region
object to better represent available API regions- Add an
esports
routing value to associated Riot and Valorant region objects (check Riot documentation for endpoints where this is valid) - [breaking] Split off Legends of Runeterra request regions into their own
galeforce.region.lor
enum, which is now used in allgaleforce.lor.*
endpoints
- Add an
- Update
galeforce:rate-limit
debugging output - [breaking] Move existing League of Legends Data Dragon functionality from
galeforce.ddragon
togaleforce.lol.ddragon