def METHOD_NAME(rhapi):
    race_classes = rhapi.db.raceclasses
    payload = []
    for race_class in race_classes:
        # payload.append(race_class)
        # expand format id to name
        class_payload = {
            'Name': race_class.name,
            'Description': race_class.description,
            'Race Format': None
        }
        if race_class.format_id:
            class_payload['Race Format'] = rhapi.db.raceformat_by_id(race_class.format_id).name
        payload.append(class_payload)
    return payload