import requests


def get_common_player_info(player_id):
    """Get common player info."""
    url = 'http://stats.nba.com/stats/{}/'
    query = '?PlayerID={}'
    endpoint = 'commonplayerinfo'
    full_url = url.format(endpoint) + query.format(player_id)
    r = requests.get(full_url, headers={'User-agent': 'Ryan DiCommo'})
    player_info = r.json()
    return player_info