src/canvas-extractor/edfi_canvas_extractor/api/courses.py
def request_courses(canvas: Canvas, start_date: str, end_date: str) -> List[Course]:
    """
    Fetch Course API data for all courses

    Parameters
    ----------
    canvas: Canvas
        a Canvas SDK object

    Returns
    -------
    List[Course]
        a list of Courses API objects
    """
    logger.info("Pulling course data")

    results: List = []

    accounts: List[Account] = canvas.get_accounts()
    for account in accounts:
        courses: List[Course] = account.get_courses(
            state=["available", "completed"],
            starts_before=end_date,
            ends_after=start_date,
        )
        results.extend(courses)

    return results

    Fetch Course API data for all courses

    Parameters
    ----------
    canvas: Canvas
        a Canvas SDK object

    Returns
    -------
    List[Course]
        a list of Courses API objects
    
Fetch Course API data for all courses
Parameters

Canvas
a Canvas SDK object

Returns

List[Course]
a list of Courses API objects
Fetch Course API data for all courses Parameters Canvas a Canvas SDK object Returns List [ Course ] a list of Courses API objects
def request_courses(canvas: Canvas, start_date: str, end_date: str) -> List[Course]:
    logger.info("Pulling course data")
    results: List = []
    accounts: List[Account] = canvas.get_accounts()
    for account in accounts:
        courses: List[Course] = account.get_courses(
            state=["available", "completed"],
            starts_before=end_date,
            ends_after=start_date,
        )
        results.extend(courses)
    return results
def request_courses ( canvas : Canvas , start_date : str , end_date : str ) -> List [ Course ] : logger . info ( "Pulling course data" ) results : List = [ ] accounts : List [ Account ] = canvas . get_accounts ( ) for account in accounts : courses : List [ Course ] = account . get_courses ( state = [ "available" , "completed" ] , starts_before = end_date , ends_after = start_date , ) results . extend ( courses ) return results
Fetch Course API data for all courses
Parameters
Fetch Course API data for all courses Parameters
"""
    Fetch Course API data for all courses

    Parameters
    ----------
    canvas: Canvas
        a Canvas SDK object

    Returns
    -------
    List[Course]
        a list of Courses API objects
    """
canvas
Canvas
start_date
str
end_date
str