Skip to content

0.4.0-dev.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@b-cho b-cho released this 22 May 01:46
· 58 commits to master since this release

This is a development build. Stability is not guaranteed, and new features may change at any time.


0.4.0-dev.2

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 and min-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, and Region enums directly via GaleforceModule.*
    import GaleforceModule, { Region } from 'galeforce';
    
    console.log(Region.lol.NORTH_AMERICA) // na1

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.regionsgaleforce.region
    • galeforce.queuesgaleforce.queue
    • galeforce.tiersgaleforce.tier
    • galeforce.divisionsgaleforce.division
    • galeforce.gamesgaleforce.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 all galeforce.lor.* endpoints
  • Updated galeforce:rate-limit debugging output