def url_avatar(hashed, quality='full'):
    """Provides the full URL for a steam avatar.

    Parameters
    ----------
    hashed : str
        The avatar hash.
    quality : str, optional
        The quality to use; may be any of:

            - icon
            - medium
            - full

    Returns
    -------
    str
        The full URL of the steam avatar.
    """
    if quality == 'icon' or quality == '':
        quality = ''
    else:
        quality = '_' + quality

    if hashed == ('0' * 40):
        # the user has no avatar, provide the steam default instead
        hashed = 'fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb'

    # first two characters of the hash are used as a tag
    tag = hashed[:2]
    return 'http://cdn.akamai.steamstatic.com/steamcommunity/public/images/avatars/{tag}/{hash}{quality}.jpg'.format(
        tag=tag, hash=hashed, quality=quality)