aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/core/ghrequests/users/user.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-02-05 12:38:00 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-02-05 13:10:44 +0100
commit5cc1ce177fa52b7156dcf72176cb3be00108f58e (patch)
tree4fbf975258506657f2a559c2bc664ac18590b70d /pygithub3/core/ghrequests/users/user.py
parentComplete skeleton of services glueing to requests (diff)
downloadpython-github3-5cc1ce177fa52b7156dcf72176cb3be00108f58e.tar.xz
python-github3-5cc1ce177fa52b7156dcf72176cb3be00108f58e.zip
User service complete
User.emails User.keys User.followers
Diffstat (limited to 'pygithub3/core/ghrequests/users/user.py')
-rw-r--r--pygithub3/core/ghrequests/users/user.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/pygithub3/core/ghrequests/users/user.py b/pygithub3/core/ghrequests/users/user.py
index 18a356e..d4b3667 100644
--- a/pygithub3/core/ghrequests/users/user.py
+++ b/pygithub3/core/ghrequests/users/user.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
-from . import Request
+from . import Request, json
from pygithub3.resources.users import User
__all__ = ('Get', 'Update')
@@ -22,4 +22,15 @@ class Get(Request):
class Update(Request):
- pass
+
+ resource = User
+ valid = ('name', 'email', 'blog', 'company', 'location', 'hireable', 'bio')
+
+ def validate(self):
+ self.update_params = self._parse_simple_dict(self.update_with)
+
+ def get_data(self):
+ return json.dumps(self.update_params)
+
+ def set_uri(self):
+ return 'user'