def addUnitRow(self, user_id: str, unit_name: str, unit_url: str,
                   above_or_below: str, row_1_based: str, sandbox: str):
        """Add a new row for a unit.

        The above_or_below parameter needs to be either the string 'above' or 'below'. The row should be in 1-based notation,
        i.e. the first row is row 1, not row 0.
        If sandbox is True, uses a sandbox sheet so that the admin can ensure the results are good before committing to everyone.
        """
        if not AdminUtils.isAdmin(self.spreadsheet_app,
                                  self.access_control_spreadsheet_id, user_id):
            raise ExposableException(
                'You do not have permission to add a unit.')

        target_spreadsheet_id = None
        if sandbox:
            target_spreadsheet_id = self.sandbox_esper_resonance_spreadsheet_id
        else:
            target_spreadsheet_id = self.esper_resonance_spreadsheet_id
        spreadsheet = self.spreadsheet_app.get(
            spreadsheetId=target_spreadsheet_id).execute()

        allRequests = WorksheetUtils.generateRequestsToAddRowToAllSheets(
            spreadsheet,
            int(row_1_based),
            above_or_below,
            True,  # Set a header column...
            'B',  # ... On the second column (A1 notation)
            unit_name,  # With text content being the unit name
            unit_url)  # As a hyperlink to the unit URL
        requestBody = {'requests': [allRequests]}
        # Execute the whole thing as a batch, atomically, so that there is no possibility of partial update.
        self.spreadsheet_app.batchUpdate(spreadsheetId=target_spreadsheet_id,
                                         body=requestBody).execute()
        return
    def addVisionCardRow(self, user_id: str, name: str, url: str, above_or_below: str, row_1_based: str):
        """Add a new row for a Vision Card.

        The above_or_below parameter needs to be either the string 'above' or 'below'. The row should be in 1-based notation,
        i.e. the first row is row 1, not row 0.
        """
        if not AdminUtils.isAdmin(self.spreadsheet_app, self.access_control_spreadsheet_id, user_id):
            raise ExposableException('You do not have permission to add a vision card.')

        spreadsheet = self.spreadsheet_app.get(spreadsheetId=self.vision_card_spreadsheet_id).execute()

        allRequests = WorksheetUtils.generateRequestsToAddRowToAllSheets(
            spreadsheet, int(row_1_based), above_or_below,
            True, # Set a header column...
            'B', # ... On the second column (A1 notation)
            name, # With text content being the vision card name
            url) # As a hyperlink to the url
        requestBody = {
            'requests': [allRequests]
        }
        # Execute the whole thing as a batch, atomically, so that there is no possibility of partial update.
        self.spreadsheet_app.batchUpdate(spreadsheetId=self.vision_card_spreadsheet_id, body=requestBody).execute()
        return