Beispiel #1
0
 def format_timespan(
     self, *, seconds: float, context: pb.FormatTimespanIn.Context
 ) -> str:
     input = pb.FormatTimespanIn(seconds=seconds, context=context)
     output = pb.String()
     output.ParseFromString(self._run_command(60, input))
     return output.val
Beispiel #2
0
 def remove_config(self, val: str) -> pb.Empty:
     input = pb.String(val=val)
     output = pb.Empty()
     output.ParseFromString(self._run_command(66, input))
     return output
Beispiel #3
0
 def get_config_json(self, val: str) -> bytes:
     input = pb.String(val=val)
     output = pb.Json()
     output.ParseFromString(self._run_command(64, input))
     return output.json
Beispiel #4
0
 def get_notetype_id_by_name(self, val: str) -> int:
     input = pb.String(val=val)
     output = pb.NoteTypeID()
     output.ParseFromString(self._run_command(51, input))
     return output.ntid
Beispiel #5
0
 def translate_string(self, input: pb.TranslateStringIn) -> str:
     output = pb.String()
     output.ParseFromString(self._run_command(59, input))
     return output.val
Beispiel #6
0
 def get_deck_id_by_name(self, val: str) -> int:
     input = pb.String(val=val)
     output = pb.DeckID()
     output.ParseFromString(self._run_command(24, input))
     return output.did
Beispiel #7
0
 def add_media_file(self, *, desired_name: str, data: bytes) -> str:
     input = pb.AddMediaFileIn(desired_name=desired_name, data=data)
     output = pb.String()
     output.ParseFromString(self._run_command(17, input))
     return output.val
Beispiel #8
0
 def congrats_learn_message(self, *, next_due: float, remaining: int) -> str:
     input = pb.CongratsLearnMessageIn(next_due=next_due, remaining=remaining)
     output = pb.String()
     output.ParseFromString(self._run_command(14, input))
     return output.val
Beispiel #9
0
 def studied_today(self, *, cards: int, seconds: float) -> str:
     input = pb.StudiedTodayIn(cards=cards, seconds=seconds)
     output = pb.String()
     output.ParseFromString(self._run_command(13, input))
     return output.val
Beispiel #10
0
 def strip_av_tags(self, val: str) -> str:
     input = pb.String(val=val)
     output = pb.String()
     output.ParseFromString(self._run_command(6, input))
     return output.val