src/google-classroom-extractor/edfi_google_classroom_extractor/api/coursework.py
def request_coursework(
    resource: Optional[Resource], course_id: str
) -> List[Dict[str, str]]:
    """
    Fetch Coursework API data for all coursework for a course,
    and return a list of coursework data

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource

    Returns
    -------
    List[Dict[str, str]]
        a list of Google Classroom Coursework resources,
            see https://developers.google.com/classroom/reference/rest/v1/courses.courseWork
    """

    if resource is None:
        return []

    return call_api(
        cast(ResourceType, resource).courses().courseWork().list,
        {"courseId": course_id},
        "courseWork",
    )

    Fetch Coursework API data for all coursework for a course,
    and return a list of coursework data

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource

    Returns
    -------
    List[Dict[str, str]]
        a list of Google Classroom Coursework resources,
            see https://developers.google.com/classroom/reference/rest/v1/courses.courseWork
    
Fetch Coursework API data for all coursework for a course,
and return a list of coursework data

Parameters

Optional[Resource]
a Google Classroom SDK Resource

Returns


Fetch Coursework API data for all coursework for a course and return a list of coursework data Parameters Optional [ Resource ] a Google Classroom SDK Resource Returns
def request_coursework(
    resource: Optional[Resource], course_id: str
) -> List[Dict[str, str]]:
    if resource is None:
        return []
    return call_api(
        cast(ResourceType, resource).courses().courseWork().list,
        {"courseId": course_id},
        "courseWork",
    )
def request_coursework ( resource : Optional [ Resource ] , course_id : str ) -> List [ Dict [ str , str ] ] : if resource is None : return [ ] return call_api ( cast ( ResourceType , resource ) . courses ( ) . courseWork ( ) . list , { "courseId" : course_id } , "courseWork" , )
Fetch Coursework API data for all coursework for a course,
and return a list of coursework data
Fetch Coursework API data for all coursework for a course and return a list of coursework data
"""
    Fetch Coursework API data for all coursework for a course,
    and return a list of coursework data

    Parameters
    ----------
    resource: Optional[Resource]
        a Google Classroom SDK Resource

    Returns
    -------
    List[Dict[str, str]]
        a list of Google Classroom Coursework resources,
            see https://developers.google.com/classroom/reference/rest/v1/courses.courseWork
    """
resource
Optional[Resource]
course_id
str