Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ac6fc2f

Browse files
Merge pull request #46 from 5am-code/feature/pagination-offset
add cursor-offset (pagination)
2 parents cc4a403 + de7a37b commit ac6fc2f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/Endpoints/Endpoint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ public function limit(int $limit): Endpoint
169169
*/
170170
public function offset(StartCursor $startCursor): Endpoint
171171
{
172-
// toDo
173-
throw HandlingException::instance('Not implemented yet.', compact($startCursor));
172+
$this->startCursor = $startCursor;
173+
return$this;
174174
}
175175

176176
}

‎src/Query/StartCursor.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ public function __construct(string $cursor)
2121
{
2222
$this->cursor = $cursor;
2323
}
24+
25+
public function __toString() {
26+
return $this->cursor;
27+
}
2428
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /