示例#1
0
def cable_by_url(url):
    """\
    Returns a cable read from the provided IRI.

    `url`
        The IRI to fetch the cable from.
    """
    page = _fetch_url(url)
    return cable_from_html(page) if page else None
示例#2
0
def cable_by_id(reference_id):
    """\
    Returns a cable by its reference identifier or ``None`` if
    the cable does not exist.

    `reference_id`
        The reference identifier of the cable.
    """
    page = cable_page_by_id(reference_id)
    return cable_from_html(page) if page else None