def parse_scopes(name_or_url):
    """
    Allows for simpler specification of scopes instead of the full url
    """
    api_base_url = 'https://www.googleapis.com/auth/'
    gmail_url = 'https://mail.google.com/'
    if name_or_url == 'gmail' or name_or_url == gmail_url:
        name_or_url = 'https://mail.google.com/'
    elif not name_or_url.startswith(api_base_url):
        name_or_url = api_base_url + name_or_url
    return name_or_url
