From: Marek Marecki Date: Thu, 8 Aug 2013 17:24:01 +0000 (+0200) Subject: You can now change language and email using diaspy X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=76745cf5cc7395178a1f971b4a7a00f38e0b8693;p=diaspy.git You can now change language and email using diaspy --- diff --git a/diaspy/settings.py b/diaspy/settings.py index 24dc92f..3f0dd60 100644 --- a/diaspy/settings.py +++ b/diaspy/settings.py @@ -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')