Exemplo n.º 1
0
    def change_notetype_of_notes(self,
                                 input: ChangeNotetypeRequest) -> OpChanges:
        """Assign a new notetype, optionally altering field/template order.

        To get defaults, use

        input = ChangeNotetypeRequest()
        input.ParseFromString(col.models.change_notetype_info(...))
        input.note_ids.extend([...])

        The new_fields and new_templates lists are relative to the new notetype's
        field/template count. Each value represents the index in the previous
        notetype. -1 indicates the original value will be discarded.
        """
        op_bytes = self.col._backend.change_notetype_raw(
            input.SerializeToString())
        return OpChanges.FromString(op_bytes)
Exemplo n.º 2
0
 def answer_card(self, input: CardAnswer) -> OpChanges:
     "Update card to provided state, and remove it from queue."
     self.reps += 1
     op_bytes = self.col._backend.answer_card_raw(input.SerializeToString())
     return OpChanges.FromString(op_bytes)
Exemplo n.º 3
0
 def update_deck_configs(self, input: UpdateDeckConfigs) -> OpChanges:
     op_bytes = self.col._backend.update_deck_configs_raw(input.SerializeToString())
     return OpChanges.FromString(op_bytes)