The next_url string returned by a pixiv list endpoint
Typed cursor parameters; fields absent in the URL are undefined
const page = await client.users.bookmarks.illusts({ userId: client.userId })
if (page.isOk && page.value.nextUrl) {
const cursor = parseNextUrl(page.value.nextUrl)
// Resume later:
const next = await client.users.bookmarks.illusts({
userId: client.userId,
maxBookmarkId: cursor.maxBookmarkId,
})
}
Parses a pixiv
next_urlinto a typed cursor object.Pass the
next_urlfield from any paginated response to extract the cursor parameters needed to resume pagination from a saved position.