def get_api_url(account):
    """construct the tumblr API URL"""
    global blog_name
    blog_name = account
    if '.' not in account:
        blog_name += '.tumblr.com'
    return 'http://api.tumblr.com/v2/blog/' + blog_name + '/posts'