chiark / gitweb /
register/confirm commands, and tests, and docs
[disorder] / python / disorder.py.in
index 650671d506c818ee248034ae2c5f922e2af49860..36157a0a8dbb39e065f10bca3ba91b5b7bd087ae 100644 (file)
@@ -881,6 +881,15 @@ class client:
     self._simple("users")
     return self._body()
 
+  def register(self, username, password, email):
+    """Register a user"""
+    res, details = self._simple("register", username, password, email)
+    return _split(details)[0]
+
+  def confirm(self, confirmation):
+    """Confirm a user registration"""
+    res, details = self._simple("confirm", confirmation)
+
   ########################################################################
   # I/O infrastructure