SDKs should typically return a lazy iterator in languages which support it, so caller do not even care about pagination and just iterate on it until they don't want any more data; while the SDK fetches new pages when needed.
In pseudo-Python:
def get_stuff():
url = "https://example.org/api.php"
while url:
response = requests.get(url)
yield from response.json()
url = parse_link(response.headers["link"]).next
In pseudo-Python:
and you call it with: