Commit 9c6a5d5d by Евгений

добавил пейджинг

1 parent 0c3d2a64
...@@ -32,7 +32,7 @@ class AdsHandler{ ...@@ -32,7 +32,7 @@ class AdsHandler{
} }
protected function limited($response){ protected function limited($response){
return false; return $response['result']['LimitedBy'] ?? 0;
} }
protected function parse($response){ protected function parse($response){
......
...@@ -31,7 +31,10 @@ class DirectRequest extends APIRequest ...@@ -31,7 +31,10 @@ class DirectRequest extends APIRequest
function next($offset) function next($offset)
{ {
if (!isset($this->params['Page'])) { if (!isset($this->params['Page'])) {
$this->params['Page'] = []; $this->params['Page'] = [
'Limit' => self::MAX_COUNT,
'Offset' => $offset
];
} }
$this->params['Page']['Limit'] = self::MAX_COUNT; $this->params['Page']['Limit'] = self::MAX_COUNT;
$this->params['Page']['Offset'] = $offset; $this->params['Page']['Offset'] = $offset;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!