"""Change api server"""
priority = 0
from tqdm import tqdm

import json
import requests

def apply(config: dict) -> bool:
    response = requests.get(config['server'])
    if response.status_code == 200:
        for item in json.loads(response.text)["modding"]:
            tqdm.write(item)
        return True
    tqdm.write(f"Failed to fetch data {response.status_code} {response.text}")
    return False
