import requests


def get_article_versions(article_id):
    """
    Get version_to_url dictionary for a figshare article.
    """
    url = 'https://api.figshare.com/v2/articles/{}/versions'.format(article_id)
    response = requests.get(url)
    version_to_url = {d['version']: d['url'] for d in response.json()}
    return version_to_url