all files / lib/Endpoints/ ChampionRotationEndpoint.js

100% Statements 9/9
100% Branches 0/0
100% Functions 2/2
100% Lines 9/9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36                                                      
import PlatformSuperclass from './PlatformSuperclass'
import Request from 'RequestClient/Request'
import METHOD_NAMES from 'Enums/method-names'
 
class ChampionRotationEndpoint extends PlatformSuperclass {
    constructor(config, limiter) {
        super()
 
        this.config = config
 
        this.list = this.list.bind(this)
 
        this.serviceName = 'platform'
 
        this.limiter = limiter
    }
 
    /**
     * Returns champion rotations, including free-to-play and low-level free-to-play rotations.
     *
     * Implements GET `/lol/platform/v3/champion-rotations`.
     */
    list() {
        return new Request(
            this.config,
            this.serviceName,
            `champion-rotations`,
            METHOD_NAMES.CHAMPION.GET_CHAMPION_ROTATIONS,
            'GET',
            this.limiter,
        )
    }
}
 
export default ChampionRotationEndpoint