def retrieve_posts(piazza_class):
    """Retrieve posts of the class.

    Args:
        piazza_class: Piazza class instance.

    Returns:
        Dict of every post in the class.
    """
    feed = piazza_class.iter_all_posts()
    posts = {}
    for index, post in enumerate(feed):
        posts[index] = post
    return posts