def get_champion_by_id(region='euw'):
    url = 'https://global.api.pvp.net/api/lol/static-data/' \
          + region + '/v1.2/champion?locale=en_US&champData=all&api_key=' \
          + config.riot_api_key

    champion_by_id = url_requests.request(url)['keys']
    static_io.write_json(champion_by_id, 'champions_by_id.json')
def get_minions_by_id(region='euw'):
    minions_by_id = {}
    url = 'https://global.api.pvp.net/api/lol/static-data/' + region \
          + '/v1.2/item?locale=en_US&api_key=' + config.riot_api_key
    data = url_requests.request(url)['data']

    for key, value in data.items():
        if 'group' in value and value['group'].startswith('BWMerc1'):
            minions_by_id[value['id']] = value['name']

    static_io.write_json(minions_by_id, 'minions_by_id.json')