from typing import List


def post_google_forms_edfi_descriptors(context, school_year: str, load_descriptors: bool) -> List:
    """
    POST payloads to passed in Ed-Fi API endpoint,
    return generated Ed-Fi ids.
    """
    descriptors = [
        {
            "endpoint": "ed-fi/questionFormDescriptors",
            "payload": [{
                    "codeValue": "Linear Scale",
                    "description": "Linear Scale",
                    "namespace": "uri://forms.google.com/QuestionFormDescriptor",
                    "shortDescription": "Linear Scale"
                }
            ]
        }
    ]

    generated_ids = list()
    if load_descriptors:
        for descriptor in descriptors:
            ids = context.resources.edfi_api_client.post_data(
                descriptor["payload"], school_year, descriptor["endpoint"])
            generated_ids.append(ids)

    return generated_ids