Started development of diaspy/settings.py
authorMarek Marecki <triviuss@gmail.com>
Thu, 27 Jun 2013 06:08:43 +0000 (08:08 +0200)
committerMarek Marecki <triviuss@gmail.com>
Thu, 27 Jun 2013 06:08:43 +0000 (08:08 +0200)
diaspy/__init__.py
diaspy/settings.py [new file with mode: 0644]

index 172431a92f052ce29cd3f0bad715b738bb08577c..1050ee89b8b02331a313f924faf55e9405e57527 100644 (file)
@@ -4,3 +4,4 @@ import diaspy.streams as streams
 import diaspy.client as client
 import diaspy.people as people
 import diaspy.notifications as notifications
+import diaspy.settings as settings
diff --git a/diaspy/settings.py b/diaspy/settings.py
new file mode 100644 (file)
index 0000000..a63a801
--- /dev/null
@@ -0,0 +1,20 @@
+import json
+import re
+import urllib
+
+
+"""This module provides access to user's settings on Diaspora*.
+"""
+
+
+class Settings():
+    """This object is used to get access to user's settings on
+    Diaspora* and provides interface for downloading user's stuff.
+    """
+    def __init__(self, connection):
+        self._connection = connection
+    
+    def downloadxml(self):
+        request = self._connection.get('user/export')
+        return request.text
+