You can now change language and email using diaspy
authorMarek Marecki <marekjm@taistelu.com>
Thu, 8 Aug 2013 17:24:01 +0000 (19:24 +0200)
committerMarek Marecki <marekjm@taistelu.com>
Thu, 8 Aug 2013 17:24:01 +0000 (19:24 +0200)
diaspy/settings.py

index 24dc92fb5757e84ccda9d43786f67a00e520577a..3f0dd60d84d07ec642dc7e5bd22bbf3c208f1711 100644 (file)
@@ -17,3 +17,15 @@ class Settings():
     def downloadxml(self):
         request = self._connection.get('user/export')
         return request.text
+
+    def changeEmail(self, email):
+        """Changes user's email.
+        """
+        data = {'_method': 'put', 'utf-8': '✓', 'user[email]': email, 'authenticity_token': repr(self._connection)}
+        request = self._connection.post('user')
+
+    def changeLanguage(self, lang):
+        """Changes user's email.
+        """
+        data = {'_method': 'put', 'utf-8': '✓', 'user[language]': lang, 'authenticity_token': repr(self._connection)}
+        request = self._connection.post('user')