# all files / lib/Endpoints/DDragonEndpoints/ DDragonRealmEndpoint.js

100% Statements 6/6
100% Branches 2/2
100% Functions 2/2
100% Lines 6/6

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    241×

    1×

    3×

    3×

    2×

    1×
     import DDragonRequest, {
        DDragonRequestTypes,
    } from 'RequestClient/DDragonRequest'
    import METHOD_NAMES from 'Enums/method-names'

    class DDragonRealmEndpoint {
        constructor(config) {
            this.config = config

            this.list = this.list.bind(this)
        }

        list(region) {
            return new DDragonRequest(
                this.config,
                `${region || this.config.region}.json`,
                DDragonRequestTypes.REALMS,
                METHOD_NAMES.DDRAGON.REALM_LIST,
            )
        }
    }

    export default DDragonRealmEndpoint