From 14ef05b1ffef24fae97ae3e79567ab612a75ff11 Mon Sep 17 00:00:00 2001 From: David Medina Date: Sun, 4 Mar 2012 16:58:08 +0100 Subject: Refactor result. Now it's a package result.smart => Paginate iterator with 'page' behaviour. result.normal => Paginate iterator with 'next' behaviour. --- pygithub3/services/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pygithub3/services') 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): -- cgit v1.2.3-59-g8ed1b