import requests


def get_gear(name,realm="sargeras"):
    """Query the raider.io server for gear information on a character and return as a formatted string"""
    url = f"https://raider.io/api/v1/characters/profile?region=us&realm={realm}&name={name}&fields=gear"
    response = requests.get(url).json()
    gear = response["gear"]
    message = f"{name}'s Gear:\n" \
              f"--------------------\n" \
              f"Equipped Item Level: {gear['item_level_equipped']}\n" \
              f"Total Item Level: {gear['item_level_total']}\n" \
              f"Artifact Traits: {gear['artifact_traits']}\n" \
              f"-------------------\n"
    return message