aboutsummaryrefslogtreecommitdiffstats
path: root/github3
diff options
context:
space:
mode:
Diffstat (limited to 'github3')
-rw-r--r--github3/api.py2
-rw-r--r--github3/models.py24
2 files changed, 5 insertions, 21 deletions
diff --git a/github3/api.py b/github3/api.py
index e97a699..f87a7b7 100644
--- a/github3/api.py
+++ b/github3/api.py
@@ -114,7 +114,7 @@ class Github(GithubCore):
def get_me(self):
"""Get the authenticated user."""
- return self._get_resource(('user'), User)
+ return self._get_resource(('user'), CurrentUser)
diff --git a/github3/models.py b/github3/models.py
index b661bdd..fcaf184 100644
--- a/github3/models.py
+++ b/github3/models.py
@@ -85,14 +85,14 @@ class User(BaseResource):
_dates = ['created_at',]
_bools = ['hireable', ]
_map = {}
- _writeable = ['name', 'email', 'blog', 'company', 'location', 'hireable', 'bio']
+ _writeable = []
def __repr__(self):
return '<user {0}>'.format(self.login)
-class User(BaseResource):
- """Github User object model."""
+class CurrentUser(BaseResource):
+ """Github Current User object model."""
_strings = [
'login','gravatar_url', 'url', 'name', 'company', 'blog', 'location',
@@ -105,20 +105,4 @@ class User(BaseResource):
_writeable = ['name', 'email', 'blog', 'company', 'location', 'hireable', 'bio']
def __repr__(self):
- return '<user {0}>'.format(self.login)
-
- # def _update(self):
- # """Update the User."""
-
- # args = to_api(
- # dict(
- # favorite=self.favorite,
- # archive=self.archive,
- # read_percent=self.read_percent,
- # ),
- # int_keys=('favorite', 'archive')
- # )
-
- # r = self._rdd._post_resource(('bookmarks', self.id), **args)
-
- # return r \ No newline at end of file
+ return '<current-user {0}>'.format(self.login)