Skip to content
Snippets Groups Projects
Commit 1fdff793 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

Rename Resource to ResultIterator

parent 15370d9b
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ from requests_oauthlib import OAuth2Session
from requests.compat import urljoin
 
from kosapi import settings
from .resource import Resource
from .resource import ResultIterator
 
 
class KosapiClient:
......@@ -32,7 +32,7 @@ class KosapiClient:
token_saver(resp['access_token'])
 
def resource(self, url, **kwargs):
for entry in Resource(self, url, **kwargs):
for entry in ResultIterator(self, url, **kwargs):
yield entry
 
def get(self, url, **params):
......
from .resource import Resource
from .result_iterator import ResultIterator
from .resource_entity_getter import ResourceEntityGetter
\ No newline at end of file
......@@ -2,7 +2,7 @@ from collections import deque
from .resource_entity_getter import ResourceEntityGetter
 
 
class Resource:
class ResultIterator:
def __init__(self, client, resource_url, **kwargs):
self._resource_getter = ResourceEntityGetter(client, resource_url, **kwargs)
self._buffer = list()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment