@@ 2376-2394 (lines=19) @@ | ||
2373 | ||
2374 | return self._send_xml_command(cmd) |
|
2375 | ||
2376 | def delete_group( |
|
2377 | self, group_id: str, *, ultimate: Optional[bool] = False |
|
2378 | ) -> Any: |
|
2379 | """Deletes an existing group |
|
2380 | ||
2381 | Arguments: |
|
2382 | group_id: UUID of the group to be deleted. |
|
2383 | ultimate: Whether to remove entirely, or to the trashcan. |
|
2384 | """ |
|
2385 | if not group_id: |
|
2386 | raise RequiredArgument( |
|
2387 | function=self.delete_group.__name__, argument='group_id' |
|
2388 | ) |
|
2389 | ||
2390 | cmd = XmlCommand("delete_group") |
|
2391 | cmd.set_attribute("group_id", group_id) |
|
2392 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
2393 | ||
2394 | return self._send_xml_command(cmd) |
|
2395 | ||
2396 | def delete_note( |
|
2397 | self, note_id: str, *, ultimate: Optional[bool] = False |
@@ 4285-4303 (lines=19) @@ | ||
4282 | ||
4283 | return self._send_xml_command(cmd) |
|
4284 | ||
4285 | def delete_group( |
|
4286 | self, group_id: str, *, ultimate: Optional[bool] = False |
|
4287 | ) -> Any: |
|
4288 | """Deletes an existing group |
|
4289 | ||
4290 | Arguments: |
|
4291 | group_id: UUID of the group to be deleted. |
|
4292 | ultimate: Whether to remove entirely, or to the trashcan. |
|
4293 | """ |
|
4294 | if not group_id: |
|
4295 | raise RequiredArgument( |
|
4296 | function=self.delete_group.__name__, argument='group_id' |
|
4297 | ) |
|
4298 | ||
4299 | cmd = XmlCommand("delete_group") |
|
4300 | cmd.set_attribute("group_id", group_id) |
|
4301 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
4302 | ||
4303 | return self._send_xml_command(cmd) |
|
4304 | ||
4305 | def delete_note( |
|
4306 | self, note_id: str, *, ultimate: Optional[bool] = False |