def format_api_output(response):
    """Format retrieved json from API call"""
    data = response["items"][0]
    return {
        "rep": data["reputation"],
        "gold": data["badge_counts"]["gold"],
        "silver": data["badge_counts"]["silver"],
        "bronze": data["badge_counts"]["bronze"],
    }