https://linen.dev logo
#singer-tap-development
Title
# singer-tap-development
s

sam_edelstein

07/07/2021, 8:40 PM
Hello! I'm in the process of developing my first tap. I have it operational up to the point of dealing with pagination. The API lives here: https://seeclickfix.com/api/v2/issues?page=1&per_page=20 and I can see in the metadata that it provides a URL for the next page, so I assume that I need to capture that URL and essentially loop through until I've pulled data from each page:
Copy code
"metadata": {
"pagination": {
"entries": 1390255,
"page": 1,
"per_page": 20,
"pages": 69513,
"next_page": 2,
"next_page_url": "<https://seeclickfix.com/api/v2/issues?page=2>",
"previous_page": null,
"previous_page_url": null
}
}
I think I'd use
get_next_page_token
but don't really know what it would look like. Is there a straightforward code snippet or example that would get me to step 1 on this? I've looked at some other taps that use pagination, but it is hard to see exactly what is happening, and it looks like everyone takes a different approach.