diff options
author | 2012-03-04 16:58:08 +0100 | |
---|---|---|
committer | 2012-03-04 17:18:06 +0100 | |
commit | 14ef05b1ffef24fae97ae3e79567ab612a75ff11 (patch) | |
tree | 9397c561b8b963d9b65dbda1f496f01a0f2d3ab2 /pygithub3/services/base.py | |
parent | Wrap result getter into partial. It's cleaner (diff) | |
download | python-github3-14ef05b1ffef24fae97ae3e79567ab612a75ff11.tar.xz python-github3-14ef05b1ffef24fae97ae3e79567ab612a75ff11.zip |
Refactor result. Now it's a package
result.smart => Paginate iterator with 'page' behaviour.
result.normal => Paginate iterator with 'next' behaviour.
Diffstat (limited to 'pygithub3/services/base.py')
-rw-r--r-- | pygithub3/services/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pygithub3/services/base.py b/pygithub3/services/base.py index 1d33470..1357815 100644 --- a/pygithub3/services/base.py +++ b/pygithub3/services/base.py @@ -2,7 +2,7 @@ # -*- encoding: utf-8 -*- from pygithub3.core.client import Client -from pygithub3.core.result import Result +from pygithub3.core import result from pygithub3.requests.base import Factory from pygithub3.core.errors import NotFound @@ -138,7 +138,8 @@ class Service(object): return request.resource.loads(response.content) def _get_result(self, request, **kwargs): - return Result(self._client, request, **kwargs) + method = result.smart.Method(self._client.get, request, **kwargs) + return result.smart.Result(method) class MimeTypeMixin(object): |