aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/services
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-02-03 14:45:32 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-02-03 14:46:54 +0100
commitf01bc94a33d8644da65b5fa895c222e9ee057b50 (patch)
tree3bfc837901a54f97a30f1d24431d8322906de192 /pygithub3/services
parentPypi environment by setuptools (diff)
downloadpython-github3-f01bc94a33d8644da65b5fa895c222e9ee057b50.tar.xz
python-github3-f01bc94a33d8644da65b5fa895c222e9ee057b50.zip
Fix imports to new environment
Absolute imports as PEP8 tells
Diffstat (limited to '')
-rw-r--r--pygithub3/services/__init__.py (renamed from github3/models/__init__.py)0
-rw-r--r--pygithub3/services/base.py (renamed from github3/services/base.py)6
-rw-r--r--pygithub3/services/users.py (renamed from github3/services/user.py)15
3 files changed, 10 insertions, 11 deletions
diff --git a/github3/models/__init__.py b/pygithub3/services/__init__.py
index e69de29..e69de29 100644
--- a/github3/models/__init__.py
+++ b/pygithub3/services/__init__.py
diff --git a/github3/services/base.py b/pygithub3/services/base.py
index c74aa2e..303b3a0 100644
--- a/github3/services/base.py
+++ b/pygithub3/services/base.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
-from core.client import Client
+from pygithub3.core.client import Client
+
class Base(object):
@@ -23,11 +24,12 @@ class Base(object):
def _get_result(self, resource, **kwargs):
return Result(self.client.get, resource, **kwargs)
+
class Result(object): # move
def __init__(self, method, resource, **kwargs):
self.method = method
- self.resource= resource
+ self.resource = resource
self.args = kwargs
def __repr__(self):
diff --git a/github3/services/user.py b/pygithub3/services/users.py
index 0a7e740..70826f2 100644
--- a/github3/services/user.py
+++ b/pygithub3/services/users.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
-from base import Base
-from core.resources import Factory
+from .base import Base
+from pygithub3.core.resources import Factory
class Keys(Base):
@@ -14,17 +14,13 @@ class Keys(Base):
class Followers(Base):
def list(self, user):
- user = user or self.client.user
- if user:
- return self.get_resource('users/%s/followers' % user)
- else:
- return self.get_resource('user/followers')
+ pass
class Emails(Base):
def list(self):
- return self.get_resource('user/emails')
+ pass
def add(self):
pass
@@ -32,6 +28,7 @@ class Emails(Base):
def delete(self):
pass
+
class User(Base):
def __init__(self, **kwargs):
@@ -42,7 +39,7 @@ class User(Base):
def get(self, user):
resource = Factory(user=user or self.client.user)
- return self._get_result(resource('user.Get'))
+ return self._get_result(resource('users.get'))
def update(self):
pass