def elink(db: str, dbfrom: str, ids=False, webenv=False, query_key=False, api_key=False, email=False,
          **kwargs) -> Optional[ElinkResult]:
    """Get document summaries using the Entrez ESearch API.

    Parameters
    ----------
    db : str
        Entez database to get ids from.
    dbfrom : str
        Entez database the provided ids are from.
    ids : list or str
        List of IDs to submit to the server.
    webenv : str
        An Entrez WebEnv to use saved history.
    query_key : str
        An Entrez query_key to use saved history.
    api_key : str
        A users API key which allows more requests per second
    email : str
        A users email which is required if not using API.

    Returns
    -------
    list
        A list of ElinkResult with values [id, srx, create_date, update_date]

    """
    url = BASE_URL + f'elink.fcgi?dbfrom={dbfrom}&db={db}&retmode=json&cmd=neighbor_history'
    url = check_webenv(webenv, url)
    url = check_query_key(query_key, url)
    url = check_api_key(api_key, url)
    url = check_email(email, url)

    if ids:
        if isinstance(ids, str):
            id = ids
        else:
            id = ','.join(ids)
        url += f'&id={id}'

    time.sleep(PAUSE)
    resp = requests.get(url)
    if resp.status_code != 200:
        print('There was a server error')
        return

    text = resp.json()
    time.sleep(.5)
    return ElinkResult(
        text['linksets'][0].get('dbfrom', ''),
        text['linksets'][0].get('linksetdbhistories', [{'dbto': ''}])[0].get('dbto', ''),
        text['linksets'][0].get('webenv', ''),
        text['linksets'][0].get('linksetdbhistories', [{'querykey': ''}])[0].get('querykey', ''),
    )
Get document summaries using the Entrez ESearch API.

    Parameters
    ----------
    db : str
        Entez database to get ids from.
    dbfrom : str
        Entez database the provided ids are from.
    ids : list or str
        List of IDs to submit to the server.
    webenv : str
        An Entrez WebEnv to use saved history.
    query_key : str
        An Entrez query_key to use saved history.
    api_key : str
        A users API key which allows more requests per second
    email : str
        A users email which is required if not using API.

    Returns
    -------
    list
        A list of ElinkResult with values [id, srx, create_date, update_date]