scraper/tfs/__init__.py
def create_tfs_core_client(url, token=None):
    """
    Create a core_client.py client for a Team Foundation Server Enterprise connection instance

    If token is not provided, will attempt to use the TFS_API_TOKEN
    environment variable if present.
    """
    if token is None:
        token = os.environ.get('TFS_API_TOKEN', None)

    tfs_connection = create_tfs_connection(url, token)
    tfs_client = tfs_connection.get_client('vsts.core.v4_1.core_client.CoreClient')

    if tfs_client is None:
        msg = 'Unable to connect to TFS Enterprise (%s) with provided token.'
        raise RuntimeError(msg, url)

    return tfs_client
def create_tfs_core_client(url, token=None):
    """
    Create a core_client.py client for a Team Foundation Server Enterprise connection instance

    If token is not provided, will attempt to use the TFS_API_TOKEN
    environment variable if present.
    """
    if token is None:
        token = os.environ.get('TFS_API_TOKEN', None)

    tfs_connection = create_tfs_connection(url, token)
    tfs_client = tfs_connection.get_client('vsts.core.v4_1.core_client.CoreClient')

    if tfs_client is None:
        msg = 'Unable to connect to TFS Enterprise (%s) with provided token.'
        raise RuntimeError(msg, url)

    return tfs_client
Create a core_client.py client for a Team Foundation Server Enterprise connection instance

    If token is not provided, will attempt to use the TFS_API_TOKEN
    environment variable if present.