Add more explicit constant name for pagination

Co-Authored-By: Ross McFarland <[email protected]>
This commit is contained in:
Shnayder Anton
2019-08-01 13:08:27 +03:00
committed by Anton Shnayder
parent 57c96cf40f
commit 76a9d358e8
+3 -3
View File
@@ -28,7 +28,7 @@ class SelectelProvider(BaseProvider):
MIN_TTL = 60
LIMIT = 50
PAGINATION_LIMIT = 50
API_URL = 'https://api.selectel.ru/domains/v1'
@@ -69,9 +69,9 @@ class SelectelProvider(BaseProvider):
def _request_with_pagination(self, path, total_count):
result = []
for offset in range(0, total_count, self.LIMIT):
for offset in range(0, total_count, self.PAGINATION_LIMIT):
result += self._request('GET', path,
params={'limit': self.LIMIT,
params={'limit': self.PAGINATION_LIMIT,
'offset': offset})
return result